Fixed code quality issues
This commit is contained in:
parent
8218df95c7
commit
01ada595f9
|
@ -1,10 +1,9 @@
|
||||||
import os
|
import os
|
||||||
import pdb
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from .telenium_process import TeleniumTestProcess, cleanup
|
|
||||||
from .common import ordered
|
|
||||||
from random import choice
|
from random import choice
|
||||||
from string import ascii_lowercase
|
from string import ascii_lowercase
|
||||||
|
from telenium.client import TeleniumHttpException
|
||||||
|
from .telenium_process import TeleniumTestProcess, cleanup
|
||||||
from .common import skip_screen_checks
|
from .common import skip_screen_checks
|
||||||
from .common import ordered
|
from .common import ordered
|
||||||
|
|
||||||
|
@ -32,9 +31,8 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
# self.assertExists("//Random[@name~=\"random\"]", timeout=2)
|
# self.assertExists("//Random[@name~=\"random\"]", timeout=2)
|
||||||
try:
|
try:
|
||||||
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=2)
|
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=2)
|
||||||
except:
|
except TeleniumHttpException:
|
||||||
self.cli.wait_click(
|
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
|
||||||
'//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
|
|
||||||
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=2)
|
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=2)
|
||||||
|
|
||||||
@skip_screen_checks
|
@skip_screen_checks
|
||||||
|
@ -73,13 +71,10 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
self.cli.wait_click('//NavigationItem[@text=\"New address\"]', timeout=3)
|
self.cli.wait_click('//NavigationItem[@text=\"New address\"]', timeout=3)
|
||||||
self.cli.sleep(1)
|
self.cli.sleep(1)
|
||||||
# Checking current Screen(Login screen)
|
# Checking current Screen(Login screen)
|
||||||
# self.assertExists("//Login[@name~=\"login\"]", timeout=3)
|
|
||||||
self.assertExists("//ScreenManager[@current=\"login\"]", timeout=5)
|
self.assertExists("//ScreenManager[@current=\"login\"]", timeout=5)
|
||||||
# Click on Proceed Next button to enter 'Random' Screen
|
# Click on Proceed Next button to enter 'Random' Screen
|
||||||
self.cli.wait_click(
|
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=2)
|
||||||
'//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=2)
|
|
||||||
# Checking Current Screen(Random Screen) after Clicking on Proceed Next Button
|
# Checking Current Screen(Random Screen) after Clicking on Proceed Next Button
|
||||||
# self.assertExists("//Random[@name~=\"random\"]", timeout=1)
|
|
||||||
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
|
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
|
||||||
# Executing above function to create new address
|
# Executing above function to create new address
|
||||||
self.test_random_screen()
|
self.test_random_screen()
|
||||||
|
@ -109,6 +104,6 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
self.cli.wait_click('//MySpinnerOption[0]', timeout=5)
|
self.cli.wait_click('//MySpinnerOption[0]', timeout=5)
|
||||||
# Checking current screen
|
# Checking current screen
|
||||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
||||||
except:
|
except TeleniumHttpException:
|
||||||
self.cli.wait_click('//MySpinnerOption[0]', timeout=5)
|
self.cli.wait_click('//MySpinnerOption[0]', timeout=5)
|
||||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
||||||
|
|
Reference in New Issue
Block a user