Update telenium_process and comment set_default_address test
This commit is contained in:
parent
a7b14a1e4d
commit
a961398a42
|
@ -73,13 +73,13 @@ class TeleniumTestProcess(TeleniumTestCase):
|
||||||
try:
|
try:
|
||||||
if self.cli.getattr(selector, 'current') == value:
|
if self.cli.getattr(selector, 'current') == value:
|
||||||
self.assertTrue(selector, value)
|
self.assertTrue(selector, value)
|
||||||
break
|
return
|
||||||
except TeleniumHttpException:
|
except TeleniumHttpException:
|
||||||
sleep(0.1)
|
sleep(0.1)
|
||||||
continue
|
continue
|
||||||
finally:
|
finally:
|
||||||
# Finally Sleep is used to make the menu button funcationlly available for the click process.
|
# Finally Sleep is used to make the menu button functionally available for the click process.
|
||||||
# (because Transition is little bit slow)
|
# (because screen transition is little bit slow)
|
||||||
sleep(0.2)
|
sleep(0.2)
|
||||||
raise AssertionError("Timeout")
|
raise AssertionError("Timeout")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
from time import time
|
"""
|
||||||
|
Test for creating new identity
|
||||||
|
"""
|
||||||
|
|
||||||
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
|
from .telenium_process import TeleniumTestProcess
|
||||||
|
from .common import skip_screen_checks
|
||||||
from .common import ordered
|
from .common import ordered
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,15 +25,9 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='login')
|
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='login')
|
||||||
# Click on "Proceed Next" Button to "generate random label for address" screen
|
# Click on "Proceed Next" Button to "generate random label for address" screen
|
||||||
# Some widgets cannot renders suddenly and become not functional so we used loop with a timeout.
|
# Some widgets cannot renders suddenly and become not functional so we used loop with a timeout.
|
||||||
start = time()
|
self.assertExists("//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]", timeout=5)
|
||||||
deadline = start + 2
|
|
||||||
while time() < deadline:
|
|
||||||
try:
|
|
||||||
# Clicking on Proceed Next Button to redirect to "random" screen
|
# Clicking on Proceed Next Button to redirect to "random" screen
|
||||||
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
|
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
|
||||||
except TeleniumHttpException:
|
|
||||||
# Checking Current Screen(Random Screen) after Clicking on "Proceed Next" Button
|
|
||||||
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
|
|
||||||
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
|
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
|
||||||
|
|
||||||
@ordered
|
@ordered
|
||||||
|
@ -57,6 +54,7 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
# Checking the new address is created
|
# Checking the new address is created
|
||||||
self.assertExists('//MDList[0]/CustomTwoLineAvatarIconListItem', timeout=10)
|
self.assertExists('//MDList[0]/CustomTwoLineAvatarIconListItem', timeout=10)
|
||||||
|
|
||||||
|
@skip_screen_checks
|
||||||
@ordered
|
@ordered
|
||||||
def test_set_default_address(self):
|
def test_set_default_address(self):
|
||||||
"""Select First Address From Drawer-Box"""
|
"""Select First Address From Drawer-Box"""
|
||||||
|
|
Reference in New Issue
Block a user