moved open_navbar() to telenium_process.py

This commit is contained in:
shekhar-cis 2021-10-22 15:07:03 +05:30
parent 894309677e
commit 5af7bcce99
Signed by untrusted user: shekhar-cis
GPG Key ID: 8B2A6C8D5F7F1635
2 changed files with 10 additions and 11 deletions

View File

@ -118,3 +118,13 @@ class TeleniumTestProcess(TeleniumTestCase):
# Finally Sleep is used to make the menu button funcationlly available for the click process.
# (because Transition is little bit slow)
sleep(0.2)
def open_side_navbar(self):
"""Common method for opening side navbar (Side Drawer)"""
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)

View File

@ -178,14 +178,3 @@ class MyAddressScreen(TeleniumTestProcess):
# Checking the disabled address should not be in dropdown
self.assertNotExists('//MySpinnerOption[@text="{}"]'.format(disabled_address), timeout=5)
def open_side_navbar(self):
"""Common method for opening navbar"""
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)