updated: setting screen test, clicks and scrolling screens
This commit is contained in:
parent
dca200a559
commit
157a3bbdb0
|
@ -12,14 +12,8 @@ class SettingScreen(TeleniumTestProcess):
|
|||
"""Show Setting Screen"""
|
||||
# This is for checking Current screen
|
||||
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='inbox')
|
||||
# This is for checking the Side nav Bar is closed
|
||||
self.assertExists('//MDNavigationDrawer[@status~=\"closed\"]', timeout=5)
|
||||
# This is for checking the menu button is appeared
|
||||
self.assertExists('//MDActionTopAppBarButton[@icon~=\"menu\"]', timeout=5)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=5)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=5)
|
||||
# Method to open side navbar
|
||||
self.open_side_navbar()
|
||||
# this is for scrolling Nav drawer
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# assert for checking scroll function
|
||||
|
@ -27,4 +21,23 @@ class SettingScreen(TeleniumTestProcess):
|
|||
# this is for opening setting screen
|
||||
self.cli.wait_click('//NavigationItem[@text=\"Settings\"]', timeout=3)
|
||||
# Checking current screen
|
||||
self.assertExists("//ScreenManager[@current=\"set\"]", timeout=2)
|
||||
self.assertExists("//ScreenManager[@current=\"set\"]", timeout=3)
|
||||
# Scrolling down currrent screen
|
||||
self.cli.wait_drag(
|
||||
'//MDTabs[0]//MDLabel[@text=\"Close to tray\"]',
|
||||
'//MDTabs[0]//MDLabel[@text=\"Minimize to tray\"]', 1, timeout=5)
|
||||
# Checking state of 'Network Settings' sub tab should be 'normal'(inactive)
|
||||
self.assertExists('//MDTabs[0]//MDTabsLabel[@text=\"Network Settings\"][@state=\"normal\"]', timeout=5)
|
||||
# Click on "Network Settings" subtab
|
||||
self.cli.wait_click('//MDTabs[0]//MDTabsLabel[@text=\"Network Settings\"]', timeout=5)
|
||||
# Checking state of 'Network Settings' sub tab should be 'down'(active)
|
||||
self.assertExists('//MDTabs[0]//MDTabsLabel[@text=\"Network Settings\"][@state=\"down\"]', timeout=5)
|
||||
# Scrolling down currrent screen
|
||||
self.cli.wait_drag(
|
||||
'//MDTabs[0]//MDLabel[@text=\"Username:\"]', '//MDTabs[0]//MDLabel[@text=\"Port:\"]', 1, timeout=5)
|
||||
# Checking state of 'Resends Expire' sub tab should be 'normal'(inactive)
|
||||
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)
|
||||
|
|
Reference in New Issue
Block a user