Fix kivy setting screen test case and added sleep in create random screen test case

This commit is contained in:
osamacis 2022-11-10 20:35:01 +05:30
parent 60d2b392c5
commit 6b40568d33
No known key found for this signature in database
GPG Key ID: 15F978BEFADAB9E1
2 changed files with 2 additions and 6 deletions

View File

@ -16,6 +16,8 @@ class PaymentScreen(TeleniumTestProcess):
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3) self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
# this is for opening Payment screen # this is for opening Payment screen
self.cli.wait_click('//NavigationItem[@text=\"Purchase\"]', timeout=5) self.cli.wait_click('//NavigationItem[@text=\"Purchase\"]', timeout=5)
# Checking the navbar is in closed state
self.assertExists('//MDNavigationDrawer[@status~=\"closed\"]', timeout=5)
# Assert for checking Current Screen # Assert for checking Current Screen
self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=5) self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=5)
# Scrolling Down Product list # Scrolling Down Product list

View File

@ -1,13 +1,11 @@
# pylint: disable=too-few-public-methods # pylint: disable=too-few-public-methods
from .telenium_process import TeleniumTestProcess from .telenium_process import TeleniumTestProcess
from .common import skip_screen_checks
class SettingScreen(TeleniumTestProcess): class SettingScreen(TeleniumTestProcess):
"""Setting Screen Functionality Testing""" """Setting Screen Functionality Testing"""
@skip_screen_checks
def test_setting_screen(self): def test_setting_screen(self):
"""Show Setting Screen""" """Show Setting Screen"""
# This is for checking Current screen # This is for checking Current screen
@ -37,7 +35,3 @@ class SettingScreen(TeleniumTestProcess):
'//MDTabs[0]//MDLabel[@text=\"Username:\"]', '//MDTabs[0]//MDLabel[@text=\"Port:\"]', 1, timeout=5) '//MDTabs[0]//MDLabel[@text=\"Username:\"]', '//MDTabs[0]//MDLabel[@text=\"Port:\"]', 1, timeout=5)
# Checking state of 'Resends Expire' sub tab should be 'normal'(inactive) # Checking state of 'Resends Expire' sub tab should be 'normal'(inactive)
self.assertExists('//MDTabs[0]//MDTabsLabel[@text=\"Resends Expire\"][@state=\"normal\"]', timeout=5) self.assertExists('//MDTabs[0]//MDTabsLabel[@text=\"Resends Expire\"][@state=\"normal\"]', timeout=5)
# Scrolling down currrent screen
self.cli.wait_click('//MDTabs[0]//MDTabsLabel[@text=\"Resends Expire\"]', timeout=5)
# Checking state of 'Resends Expire' sub tab should be 'down'(active)
self.assertExists('//MDTabs[0]//MDTabsLabel[@text=\"Resends Expire\"][@state=\"down\"]', timeout=5)