WIP trash box
This commit is contained in:
parent
99f7ba0177
commit
fe341795c9
|
@ -34,35 +34,17 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
# Checking current screen
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
|
||||
@ordered
|
||||
def test_show_Qrcode(self):
|
||||
"""Show the Qr code of selected address"""
|
||||
# Checking current screen
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
# Click on Address to open popup
|
||||
self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# Check the Popup is opened
|
||||
self.assertExists('//MyaddDetailPopup//MDLabel[@text=\"Show QR code\"]', timeout=2)
|
||||
# Cick on 'Show QR code' button to view QR Code
|
||||
self.cli.wait_click('//MyaddDetailPopup//MDLabel[@text=\"Show QR code\"]')
|
||||
# Check Current screen is QR Code screen
|
||||
self.assertExists("//ScreenManager[@current=\"showqrcode\"]", timeout=2)
|
||||
# Click on BACK button
|
||||
self.cli.wait_click('//MDToolbar//MDActionTopAppBarButton[@icon=\"arrow-left\"]', timeout=2)
|
||||
# Checking current screen(My Address) after BACK press
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
|
||||
@ordered
|
||||
def test_send_message_from(self):
|
||||
"""Send Message From send Button"""
|
||||
# This is for checking Current screen
|
||||
self.assert_wait_no_except('//ScreenManager[@current]', timeout=5, value='myaddress')
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
# Click on Address to open popup
|
||||
self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# Checking Popup Opened
|
||||
self.assertExists('//MyaddDetailPopup//MDLabel[@text=\"Send message from\"]', timeout=2)
|
||||
# Click on Send Message Button to redirect Create Screen
|
||||
self.cli.wait_click('//MyaddDetailPopup//MDRaisedButton[0]/MDLabel[0]', timeout=2)
|
||||
self.cli.wait_click('//MyaddDetailPopup//MDRaisedButton[0]/MDLabel[@text=\"Send message from\"]', timeout=2)
|
||||
# Checking Current screen(Create)
|
||||
self.assertExists("//ScreenManager[@current=\"create\"]", timeout=2)
|
||||
# Entering Receiver Address
|
||||
|
@ -85,12 +67,38 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
# Check for redirected screen (Inbox Screen)
|
||||
self.assertExists("//ScreenManager[@current=\"inbox\"]", timeout=7)
|
||||
|
||||
@ordered
|
||||
def test_show_Qrcode(self):
|
||||
"""Show the Qr code of selected address"""
|
||||
# This is for checking the Side nav Bar is closed
|
||||
self.assertExists('//MDNavigationDrawer[@status~=\"closed\"]', timeout=5)
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# Clicking on Sent Tab
|
||||
self.cli.wait_click('//NavigationItem[@text=\"My addresses\"]', timeout=3)
|
||||
# Checking current screen
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
# Click on Address to open popup
|
||||
self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# Check the Popup is opened
|
||||
self.assertExists('//MyaddDetailPopup//MDLabel[@text=\"Show QR code\"]', timeout=2)
|
||||
# Cick on 'Show QR code' button to view QR Code
|
||||
self.cli.wait_click('//MyaddDetailPopup//MDLabel[@text=\"Show QR code\"]')
|
||||
# Check Current screen is QR Code screen
|
||||
self.assertExists("//ScreenManager[@current=\"showqrcode\"]", timeout=2)
|
||||
# Click on BACK button
|
||||
self.cli.wait_click('//MDToolbar//MDActionTopAppBarButton[@icon=\"arrow-left\"]', timeout=2)
|
||||
# Checking current screen(My Address) after BACK press
|
||||
self.assertExists("//ScreenManager[@current=\"myaddress\"]", timeout=3)
|
||||
|
||||
@ordered
|
||||
def test_sent_box(self):
|
||||
"""
|
||||
Checking Message in Sent Screen after sending a Message.
|
||||
"""
|
||||
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='inbox')
|
||||
# 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
|
||||
|
@ -105,4 +113,4 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
self.assertExists("//ScreenManager[@current=\"sent\"]", timeout=3)
|
||||
# Checking number of Sent messages
|
||||
total_sent_msgs = len(self.cli.select("//SwipeToDeleteItem"))
|
||||
self.assertEqual(total_sent_msgs, 2)
|
||||
self.assertEqual(total_sent_msgs, 1)
|
||||
|
|
|
@ -27,4 +27,4 @@ class NetworkStatusScreen(TeleniumTestProcess):
|
|||
# Clicking on Processes Tab
|
||||
self.cli.wait_click('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"]', timeout=3)
|
||||
# this is for checking current screen
|
||||
self.assertTrue('//NetworkStat/MDTabs[@disabled]', 'False')
|
||||
self.assertTrue('//NetworkStat/RelativeLayout[1]/Tab[@disabled]', 'False')
|
||||
|
|
Reference in New Issue
Block a user