This repository has been archived on 2025-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2025-02-03/src/bitmessagekivy/tests/test_payment_subscription.py

30 lines
1.4 KiB
Python
Raw Normal View History

from .telenium_process import TeleniumTestProcess
2021-03-06 00:14:43 +01:00
class PaymentScreen(TeleniumTestProcess):
"""SubscriptionPayment Screen Functionality Testing"""
def test_select_subscripton(self):
"""Select Subscripton From List of Subscriptons"""
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
2021-07-13 09:53:53 +02:00
self.cli.sleep(10)
# this is for opening Nav drawer
self.click_on('//MDActionTopAppBarButton[@icon=\"menu\"]')
# Dragging from sent to inbox to get Payment tab.
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
# this is for opening Payment screen
self.click_on('//NavigationItem[@text=\"Purchase\"]', seconds=1)
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
2021-05-19 10:27:10 +02:00
self.cli.drag(
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
2021-03-06 00:14:43 +01:00
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[0]', 1)
self.cli.sleep(2)
2021-07-13 09:53:53 +02:00
self.click_on('//MDRaisedButton[3]')
self.cli.sleep(2)
2021-03-06 00:14:43 +01:00
self.cli.click_on('//ListItemWithLabel[0]')
self.cli.sleep(2)
2021-03-06 00:14:43 +01:00
self.cli.click_on('//MDRaisedButton[3]')
self.cli.sleep(2)
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)