fixed swap to delete feature
This commit is contained in:
parent
86b772865b
commit
496ec73e34
|
@ -13,12 +13,11 @@ class AllMailMessage(TeleniumTestProcess):
|
||||||
# this is for opening Nav drawer
|
# this is for opening Nav drawer
|
||||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
|
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
|
||||||
# checking state of Nav drawer
|
# checking state of Nav drawer
|
||||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=5)
|
||||||
# this is for opening All Mail screen
|
# this is for opening All Mail screen
|
||||||
self.cli.wait_click('//NavigationItem[@text=\"All Mails\"]', timeout=2)
|
self.cli.wait_click('//NavigationItem[@text=\"All Mails\"]', timeout=5)
|
||||||
self.cli.sleep(3)
|
|
||||||
# Assert for checking Current Screen(All mail)
|
# Assert for checking Current Screen(All mail)
|
||||||
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=2)
|
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=5)
|
||||||
|
|
||||||
@ordered
|
@ordered
|
||||||
def test_delete_message_from_allmail_list(self):
|
def test_delete_message_from_allmail_list(self):
|
||||||
|
@ -28,10 +27,12 @@ class AllMailMessage(TeleniumTestProcess):
|
||||||
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=2)
|
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=2)
|
||||||
# click on a Message to get message details screen
|
# click on a Message to get message details screen
|
||||||
self.cli.wait_click(
|
self.cli.wait_click(
|
||||||
'//MDList[0]/CutsomSwipeToDeleteItem[0]', timeout=2)
|
'//MDList[0]/CutsomSwipeToDeleteItem[0]', timeout=3)
|
||||||
# Assert for checking Current Screen(Mail Detail)
|
# Assert for checking Current Screen(Mail Detail)
|
||||||
self.assertExists("//MailDetail[@name~=\"mailDetail\"]", timeout=2)
|
self.assertExists("//MailDetail[@name~=\"mailDetail\"]", timeout=3)
|
||||||
# CLicking on Trash-Can icon to delete Message
|
# CLicking on Trash-Can icon to delete Message
|
||||||
self.cli.wait_click('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]', timeout=2)
|
self.cli.wait_click('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[@icon=\"delete-forever\"]', timeout=5)
|
||||||
# After deleting msg, screen is redirected to All mail screen
|
# After deleting msg, screen is redirected to All mail screen
|
||||||
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=0)
|
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=5)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,6 @@ class NetwrokStatusScreen(TeleniumTestProcess):
|
||||||
# Checking for current screen (Network Status)
|
# Checking for current screen (Network Status)
|
||||||
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
||||||
# Clicking on Processes Tab
|
# Clicking on Processes Tab
|
||||||
self.cli.wait_click('//NetworkStat/MDTabs[0]//MDTabsLabel[1]', timeout=1)
|
self.cli.wait_click('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"]', timeout=1)
|
||||||
# Checking for current screen (Network Status)
|
# Checking for current screen (Network Status)
|
||||||
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
from kivy.core.window import Animation
|
||||||
from .telenium_process import TeleniumTestProcess
|
from .telenium_process import TeleniumTestProcess
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,12 +32,10 @@ class PaymentScreen(TeleniumTestProcess):
|
||||||
self.assertCheckScrollDown('//Payment//ScrollView[0]', timeout=3)
|
self.assertCheckScrollDown('//Payment//ScrollView[0]', timeout=3)
|
||||||
# Click on BUY Button
|
# Click on BUY Button
|
||||||
self.cli.wait_click('//MDRaisedButton[@text=\"BUY\"]', timeout=2)
|
self.cli.wait_click('//MDRaisedButton[@text=\"BUY\"]', timeout=2)
|
||||||
# Checking the pop up opend by clicking on BUY button
|
|
||||||
# self.assertExists('//PaymentMethodLayout/BoxLayout[0]/MDLabel[@text=\"Select Payment Method\"]', timeout=2)
|
|
||||||
# CLick on the Payment Method
|
# CLick on the Payment Method
|
||||||
self.cli.click_on('//ScrollView[0]/ListItemWithLabel[0]')
|
self.cli.click_on('//ScrollView[0]/ListItemWithLabel[0]')
|
||||||
# Click checked
|
# Check pop up is opened
|
||||||
# self.assertExists('//PaymentMethodLayout/BoxLayout[0]/MDLabel[@text=\"Select Payment Method\"]', timeout=2)
|
self.assertEqual(self.cli.getattr('//PaymentMethodLayout/BoxLayout[0]/MDLabel[0]', 'text'), 'Select Payment Method')
|
||||||
# Click out side to dismiss the popup
|
# Click out side to dismiss the popup
|
||||||
self.cli.wait_click('//MDRaisedButton[3]', timeout=2)
|
self.cli.wait_click('//MDRaisedButton[3]', timeout=2)
|
||||||
# Checking Current screen(Payment screen)
|
# Checking Current screen(Payment screen)
|
||||||
|
|
|
@ -28,12 +28,17 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
self.cli.wait_click('//NavigationItem[@text=\"Trash\"]', timeout=2)
|
self.cli.wait_click('//NavigationItem[@text=\"Trash\"]', timeout=2)
|
||||||
# self.cli.click_on('//NavigationItem[4]')
|
# self.cli.click_on('//NavigationItem[4]')
|
||||||
# Checking Trash Screen
|
# Checking Trash Screen
|
||||||
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
self.assertExists("//Trash[@name~=\"trash\"]", timeout=5)
|
||||||
self.cli.sleep(4)
|
# Transition Effect taking time, so halt is required
|
||||||
|
self.cli.sleep(2)
|
||||||
|
# Checking Popup is closed
|
||||||
|
self.assertEqual(self.cli.getattr('//MDList[0]/CutsomSwipeToDeleteItem[0]', '_opens_process'), False)
|
||||||
# This is for swiping message to activate delete icon.
|
# This is for swiping message to activate delete icon.
|
||||||
self.drag(
|
self.drag(
|
||||||
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||||
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
||||||
|
# Checking Popup is Opened
|
||||||
|
self.assertEqual(self.cli.getattr('//MDList[0]/CutsomSwipeToDeleteItem[0]', '_opens_process'), True)
|
||||||
self.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]', seconds=1)
|
self.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]', seconds=1)
|
||||||
# Checking the Trash Icon after swipe.
|
# Checking the Trash Icon after swipe.
|
||||||
self.assertExists("//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[@icon~=\"trash-can\"]", timeout=2)
|
self.assertExists("//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[@icon~=\"trash-can\"]", timeout=2)
|
||||||
|
@ -42,7 +47,9 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
# Checking the popup box screen.
|
# Checking the popup box screen.
|
||||||
self.assertExists("//MDDialog//MDFlatButton[@text=\"Yes\"]", timeout=2)
|
self.assertExists("//MDDialog//MDFlatButton[@text=\"Yes\"]", timeout=2)
|
||||||
# Clicking on 'Yes' Button on Popup to confirm delete.
|
# Clicking on 'Yes' Button on Popup to confirm delete.
|
||||||
self.click_on('//MDDialog//MDFlatButton[@text=\"Yes\"]', seconds=1.1)
|
self.click_on('//MDFlatButton[@text=\"Yes\"]', seconds=1.1)
|
||||||
|
# Checking Pop is closed
|
||||||
|
self.assertEqual(self.cli.getattr('//MDList[0]/CutsomSwipeToDeleteItem[0]', '_opens_process'), False)
|
||||||
# Checking Trash Screen
|
# Checking Trash Screen
|
||||||
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
||||||
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
||||||
|
|
Reference in New Issue
Block a user