Fixed Side Navbar

This commit is contained in:
osamacis 2022-11-07 20:36:35 +05:30
parent 98ad4abc2f
commit 52d272065b
No known key found for this signature in database
GPG Key ID: 15F978BEFADAB9E1
2 changed files with 3 additions and 4 deletions

View File

@ -119,6 +119,7 @@ class TeleniumTestProcess(TeleniumTestCase):
def open_side_navbar(self):
"""Common method for opening Side navbar (Side Drawer)"""
# Checking the drawer is in 'closed' state
self.cli.execute('app.ContentNavigationDrawer.MDNavigationDrawer.opening_time=0')
self.assertExists('//MDNavigationDrawer[@status~=\"closed\"]', timeout=5)
# This is for checking the menu button is appeared
self.assertExists('//ActionTopAppBarButton[@icon~=\"menu\"]', timeout=5)

View File

@ -3,7 +3,6 @@
Kivy Networkstat UI test
"""
from time import sleep
from .telenium_process import TeleniumTestProcess
@ -15,8 +14,7 @@ class NetworkStatusScreen(TeleniumTestProcess):
# This is for checking Current screen
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='login')
# Method to open side navbar
if self.cli.wait('//ActionTopAppBarButton[@icon~=\"menu\"]', timeout=5):
sleep(0.2) # due to rapid transition effect, it doesn't click on menu-bar
# due to rapid transition effect, it doesn't click on menu-bar
self.open_side_navbar()
# this is for scrolling Nav drawer
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")