WIP[myaddress enable/disable]

This commit is contained in:
shekhar-cis 2021-10-18 19:41:28 +05:30
parent de0bc59b18
commit 4e4e2c8f6d
Signed by untrusted user: shekhar-cis
GPG Key ID: 8B2A6C8D5F7F1635

View File

@ -65,10 +65,10 @@ class MyAddressScreen(TeleniumTestProcess):
# Checking Message body is Entered # Checking Message body is Entered
# self.assertNotEqual('//DropDownWidget/ScrollView[0]//ScrollView[0]/MDTextField[@text]', '') # self.assertNotEqual('//DropDownWidget/ScrollView[0]//ScrollView[0]/MDTextField[@text]', '')
self.assertExists('//DropDownWidget/ScrollView[0]//ScrollView[0]/MDTextField[@text=\"{}\"]'.format(self.body), timeout=5) self.assertExists('//DropDownWidget/ScrollView[0]//ScrollView[0]/MDTextField[@text=\"{}\"]'.format(self.body), timeout=5)
# Click on Send Icon # Click on BACK button
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"send\"]', timeout=5) self.cli.wait_click('//MDToolbar//MDActionTopAppBarButton[@icon=\"arrow-left\"]', timeout=2)
# Check for redirected screen (Inbox Screen) # Checking current screen(My Address) after BACK press
self.assertExists("//ScreenManager[@current=\"inbox\"]", timeout=7) self.assertExists("//ScreenManager[@current=\"inbox\"]", timeout=3)
@ordered @ordered
def test_show_qrcode(self): def test_show_qrcode(self):
@ -96,26 +96,5 @@ class MyAddressScreen(TeleniumTestProcess):
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3) self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
@ordered @ordered
def test_sent_box(self): def test_enable_disable_address(self):
""" pass
Checking Message in Sent Screen after sending a Message.
"""
# Checking current screen
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
# this is for opening Nav drawer
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
# checking state of Nav drawer
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
# this is for scrolling Nav drawer
self.drag("//NavigationItem[@text=\"Purchase\"]", "//NavigationItem[@text=\"My addresses\"]")
# assert for checking scroll function
self.assertCheckScrollUp('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
# Clicking on Sent Tab
self.cli.wait_click('//NavigationItem[@text=\"Sent\"]', timeout=3)
# Checking current screen; Sent
self.assertExists("//ScreenManager[@current=\"sent\"]", timeout=3)
# Checking the message is rendered in sent box screen
self.assertExists('//SwipeToDeleteItem', timeout=5)
# Checking messages count in sent box
total_sent_msgs = len(self.cli.select("//SwipeToDeleteItem"))
self.assertEqual(total_sent_msgs, 1)