Refactor Kivy payment test case

This commit is contained in:
shekhar-cis 2022-11-25 18:19:07 +05:30
parent 39a5c9c92f
commit 9fa6b2ec2f
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7

View File

@ -34,11 +34,8 @@ 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.assertEqual('//PaymentMethodLayout[@disabled]', 'True') #Returns None when condition True # assert check the buying option popup is closed
# CLick on the Payment Method self.assertExists('//PaymentMethodLayout[@disabled=false]', timeout=5)
self.cli.click_on('//ScrollView[0]/ListItemWithLabel[0]')
# Check pop up is opened
self.assertTrue('//PaymentMethodLayout[@disabled]', 'False')
# 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)