diff --git a/src/bitmessagekivy/tests/test_payment_subscription.py b/src/bitmessagekivy/tests/test_payment_subscription.py index e76101b4..04f926c7 100644 --- a/src/bitmessagekivy/tests/test_payment_subscription.py +++ b/src/bitmessagekivy/tests/test_payment_subscription.py @@ -23,13 +23,16 @@ class PaymentScreen(TeleniumTestProcess): # assert for checking scroll function self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3) # 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 - # self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=3) - self.assert_wait_no_except('//ScreenManager[@current]', timeout=2, value='Payment') + self.assertExists("//ScreenManager[@current=\"payment\"]", timeout=5) # Scrolling Down Product list - self.cli.wait_click('//ProductCategoryLayout[0]/ProductLayout[1]', timeout=3) - # self.click_on('//ProductCategoryLayout[0]/ProductLayout[1]', seconds=1) + self.drag( + '//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( '//ProductCategoryLayout[0]/ProductLayout[1]', '//ProductCategoryLayout[0]/ProductLayout[0]') @@ -37,12 +40,11 @@ class PaymentScreen(TeleniumTestProcess): self.assertCheckScrollDown('//Payment//ScrollView[0]', timeout=3) # Click on BUY Button 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 self.cli.click_on('//ScrollView[0]/ListItemWithLabel[0]') # Check pop up is opened - self.assertEqual(self.cli.getattr('//PaymentMethodLayout/BoxLayout[0]/MDLabel[0]', 'text'), - 'Select Payment Method') + self.assertTrue('//PaymentMethodLayout[@disabled]', 'False') # Click out side to dismiss the popup self.cli.wait_click('//MDRaisedButton[3]', timeout=2) # Checking Current screen(Payment screen)