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

34 lines
1.7 KiB
Python
Raw Normal View History

from time import time
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-19 10:21:48 +02:00
self.cli.sleep(10)
2021-07-13 09:53:53 +02:00
# this is for opening Nav drawer
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
# checking state of Nav drawer
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
2021-07-13 09:53:53 +02:00
# Dragging from sent to inbox to get Payment tab.
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
2021-07-16 14:59:04 +02:00
# assert for checking scroll function
2021-07-19 10:21:48 +02:00
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
self.assertExists('//NavigationItem[@text=\"Purchase\"]', timeout=3)
2021-07-13 09:53:53 +02:00
# this is for opening Payment screen
self.click_on('//NavigationItem[@text=\"Purchase\"]', seconds=2)
# Assert for checking Current Screen
self.assertExists("//Payment[@name~=\"payment\"]", timeout=4)
self.drag(
'//ProductCategoryLayout[0]/ProductLayout[1]',
'//ProductCategoryLayout[0]/ProductLayout[0]')
2021-07-16 14:59:04 +02:00
# assert for checking scroll function
self.assertExists('//MDRaisedButton[3]', timeout=3)
self.cli.wait_click('//MDRaisedButton[@text=\"BUY\"]', timeout=2)
self.click_on('//ScrollView[0]/ListItemWithLabel[0]', seconds=1)
self.click_on('//MDRaisedButton[3]', seconds=1)
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
2021-07-16 14:59:04 +02:00