removed assert customised method

This commit is contained in:
shekhar-cis 2021-08-25 13:14:49 +05:30
parent 0f6db9d023
commit 242056c1fb
Signed by untrusted user: shekhar-cis
GPG Key ID: 8B2A6C8D5F7F1635

View File

@ -23,13 +23,16 @@ class PaymentScreen(TeleniumTestProcess):
# assert for checking scroll function # assert for checking scroll function
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3) self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
# this is for opening Payment screen # this is for opening Payment screen
self.cli.wait_click('//NavigationItem[@text=\"Purchase\"]', timeout=2) self.cli.wait_click('//NavigationItem[@text=\"Purchase\"]', timeout=5)
# Assert for checking Current Screen # Assert for checking Current Screen
# self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=3) self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=5)
self.assert_wait_no_except('//ScreenManager[@current]', timeout=2, value='Payment')
# Scrolling Down Product list # Scrolling Down Product list
self.cli.wait_click('//ProductCategoryLayout[0]/ProductLayout[1]', timeout=3) self.drag(
# self.click_on('//ProductCategoryLayout[0]/ProductLayout[1]', seconds=1) '//ProductCategoryLayout[0]/ProductLayout[0]',
'//ProductCategoryLayout[0]/ProductLayout[1]')
# assert for checking scroll function
self.assertCheckScrollDown('//Payment//ScrollView[0]', timeout=3)
# Scrolling Up Product list
self.drag( self.drag(
'//ProductCategoryLayout[0]/ProductLayout[1]', '//ProductCategoryLayout[0]/ProductLayout[1]',
'//ProductCategoryLayout[0]/ProductLayout[0]') '//ProductCategoryLayout[0]/ProductLayout[0]')
@ -37,12 +40,11 @@ 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)
self.assert_wait_no_except('//ScreenManager[@current]', timeout=2, value='payment') # self.assertEqual('//PaymentMethodLayout[@disabled]', 'True') #Returns None when condition True
# 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]')
# Check pop up is opened # Check pop up is opened
self.assertEqual(self.cli.getattr('//PaymentMethodLayout/BoxLayout[0]/MDLabel[0]', 'text'), self.assertTrue('//PaymentMethodLayout[@disabled]', 'False')
'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)