Refactor draft screen test

This commit is contained in:
shekhar-cis 2021-10-22 17:03:42 +05:30
parent b3577a09e5
commit 47dffae19e
Signed by untrusted user: shekhar-cis
GPG Key ID: 8B2A6C8D5F7F1635

View File

@ -86,16 +86,7 @@ class DraftMessage(TeleniumTestProcess):
"""Click on a Drafted message to send message""" """Click on a Drafted message to send message"""
# OPEN NAVIGATION-DRAWER # OPEN NAVIGATION-DRAWER
# this is for opening Nav drawer # this is for opening Nav drawer
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=5) self.open_side_navbar()
# checking state of Nav drawer
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=5)
# Click to open Draft Screen
self.cli.wait_click('//NavigationItem[@text=\"Draft\"]', timeout=5)
# checking state of Nav drawer
self.assertExists("//MDNavigationDrawer[@state~=\"close\"]", timeout=5)
# Checking Draft Screen
self.assertExists("//ScreenManager[@current=\"draft\"]", timeout=5)
# Checking messages in draft box # Checking messages in draft box
self.assertEqual(len(self.cli.select('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem')), 1) self.assertEqual(len(self.cli.select('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem')), 1)
# Wait to render the widget # Wait to render the widget