Skip to content

Commit a961398

Browse files
committed
Update telenium_process and comment set_default_address test
1 parent a7b14a1 commit a961398

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

src/bitmessagekivy/tests/telenium_process.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ def assert_wait_no_except(self, selector, timeout=-1, value='inbox'):
7373
try:
7474
if self.cli.getattr(selector, 'current') == value:
7575
self.assertTrue(selector, value)
76-
break
76+
return
7777
except TeleniumHttpException:
7878
sleep(0.1)
7979
continue
8080
finally:
81-
# Finally Sleep is used to make the menu button funcationlly available for the click process.
82-
# (because Transition is little bit slow)
81+
# Finally Sleep is used to make the menu button functionally available for the click process.
82+
# (because screen transition is little bit slow)
8383
sleep(0.2)
8484
raise AssertionError("Timeout")
8585

src/bitmessagekivy/tests/test_create_random_address.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
from time import time
1+
"""
2+
Test for creating new identity
3+
"""
4+
25
from random import choice
36
from string import ascii_lowercase
4-
from telenium.client import TeleniumHttpException
57
from .telenium_process import TeleniumTestProcess
8+
from .common import skip_screen_checks
69
from .common import ordered
710

811

@@ -22,15 +25,9 @@ def test_landing_screen(self):
2225
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='login')
2326
# Click on "Proceed Next" Button to "generate random label for address" screen
2427
# Some widgets cannot renders suddenly and become not functional so we used loop with a timeout.
25-
start = time()
26-
deadline = start + 2
27-
while time() < deadline:
28-
try:
29-
# Clicking on Proceed Next Button to redirect to "random" screen
30-
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
31-
except TeleniumHttpException:
32-
# Checking Current Screen(Random Screen) after Clicking on "Proceed Next" Button
33-
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
28+
self.assertExists("//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]", timeout=5)
29+
# Clicking on Proceed Next Button to redirect to "random" screen
30+
self.cli.wait_click('//Screen[0]//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]', timeout=5)
3431
self.assertExists("//ScreenManager[@current=\"random\"]", timeout=5)
3532

3633
@ordered
@@ -57,6 +54,7 @@ def test_generate_random_address_label(self):
5754
# Checking the new address is created
5855
self.assertExists('//MDList[0]/CustomTwoLineAvatarIconListItem', timeout=10)
5956

57+
@skip_screen_checks
6058
@ordered
6159
def test_set_default_address(self):
6260
"""Select First Address From Drawer-Box"""

0 commit comments

Comments
 (0)