added test sign_typed_message

Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
Anton Danchenko 2019-03-26 14:09:29 +02:00
parent b06ef9cf6c
commit 0944cedc80
No known key found for this signature in database
GPG Key ID: C2D4819B698627E4
2 changed files with 28 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import pytest
from tests import marks, unique_password
from tests import marks, unique_password, common_password
from tests.base_test_case import SingleDeviceTestCase
from tests.users import transaction_senders, transaction_recipients, basic_user
from views.send_transaction_view import SendTransactionView
@ -62,6 +62,23 @@ class TestTransactionDApp(SingleDeviceTestCase):
if not status_test_dapp.element_by_text(text).is_element_displayed(120):
pytest.fail('Contract was not created')
@marks.testrail_id(5784)
@marks.critical
def test_sign_typed_message(self):
sender = transaction_senders['W']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(sender['passphrase'])
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
status_test_dapp = home_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_typed_message_button.click()
send_transaction_view.enter_password_input.send_keys(common_password)
send_transaction_view.sign_transaction_button.click()
status_test_dapp.find_text_part('0xde3048417e5881acc9ca8466ab0b3e2f9f965a70acabbda2d140e95a28b13d2d'
'2d38eba6c0a5bfdc50e5d59e0ed3226c749732fd4a9374b57f34121eaff2a5081c')
@marks.testrail_id(5743)
@marks.high
def test_send_two_transactions_in_batch_in_dapp(self):
@ -82,7 +99,6 @@ class TestTransactionDApp(SingleDeviceTestCase):
send_transaction_view.sign_transaction()
@marks.testrail_id(5744)
@marks.critical
def test_send_two_transactions_one_after_another_in_dapp(self):
@ -103,7 +119,6 @@ class TestTransactionDApp(SingleDeviceTestCase):
send_transaction_view.sign_transaction()
@marks.logcat
@marks.testrail_id(5418)
@marks.critical

View File

@ -37,6 +37,15 @@ class TransactionsButton(BaseButton):
from views.send_transaction_view import SendTransactionView
return SendTransactionView(self.driver)
class SignTypedMessageButton(BaseButton):
def __init__(self, driver):
super(TransactionsButton.SignTypedMessageButton, self).__init__(driver)
self.locator = self.Locator.text_selector('Sign Typed Message')
def navigate(self):
from views.send_transaction_view import SendTransactionView
return SendTransactionView(self.driver)
class DeployContractButton(BaseButton):
def __init__(self, driver):
super(TransactionsButton.DeployContractButton, self).__init__(driver)
@ -109,6 +118,7 @@ class StatusTestDAppView(BaseWebView):
self.send_two_tx_one_by_one_button = TransactionsButton.SendTwoTxOneByOneButton(self.driver)
self.send_two_tx_in_batch_button = TransactionsButton.SendTwoTxInBatchButton(self.driver)
self.test_filters_button = TransactionsButton.TestFiltersButton(self.driver)
self.sign_typed_message_button = TransactionsButton.SignTypedMessageButton(self.driver)
self.status_api_button = StatusAPIButton(self.driver)
self.request_contact_code_button = StatusAPIButton.RequestContactCodeButton(self.driver)