36 lines
1.7 KiB
Python
36 lines
1.7 KiB
Python
from tests import transaction_users, marks
|
|
from tests.base_test_case import SingleDeviceTestCase
|
|
from views.sign_in_view import SignInView
|
|
|
|
|
|
class TestTransactionDApp(SingleDeviceTestCase):
|
|
|
|
@marks.testrail_id(769)
|
|
def test_send_transaction_from_daap(self):
|
|
sender = transaction_users['B_USER']
|
|
sign_in_view = SignInView(self.driver)
|
|
sign_in_view.recover_access(sender['passphrase'], sender['password'])
|
|
address = transaction_users['B_USER']['address']
|
|
initial_balance = self.network_api.get_balance(address)
|
|
status_test_dapp = sign_in_view.open_status_test_dapp()
|
|
status_test_dapp.wait_for_d_aap_to_load()
|
|
status_test_dapp.assets_button.click()
|
|
send_transaction_view = status_test_dapp.request_stt_button.click()
|
|
send_transaction_view.sign_transaction(sender['password'])
|
|
self.network_api.verify_balance_is_updated(initial_balance, address)
|
|
|
|
@marks.testrail_id(3716)
|
|
def test_sign_message_from_daap(self):
|
|
password = 'password_for_daap'
|
|
sign_in_view = SignInView(self.driver)
|
|
sign_in_view.create_user(password)
|
|
status_test_dapp = sign_in_view.open_status_test_dapp()
|
|
status_test_dapp.wait_for_d_aap_to_load()
|
|
status_test_dapp.transactions_button.click()
|
|
send_transaction_view = status_test_dapp.sign_message_button.click()
|
|
send_transaction_view.find_full_text('Test message')
|
|
send_transaction_view.sign_transaction_button.click_until_presence_of_element(
|
|
send_transaction_view.enter_password_input)
|
|
send_transaction_view.enter_password_input.send_keys(password)
|
|
send_transaction_view.sign_transaction_button.click()
|