diff --git a/test/appium/tests/atomic/transactions/test_daaps_transactions.py b/test/appium/tests/atomic/transactions/test_daaps_transactions.py index f1de1ec6f1..e05622f45d 100644 --- a/test/appium/tests/atomic/transactions/test_daaps_transactions.py +++ b/test/appium/tests/atomic/transactions/test_daaps_transactions.py @@ -311,6 +311,7 @@ class TestTransactionDApp(SingleDeviceTestCase): if send_transaction_view.enter_password_input.is_element_displayed(): self.errors.append(sign_button_warning.format('sending 0 ETH with an empty ETH balance')) + send_transaction_view.cancel_button.click() asset_button = send_transaction_view.asset_by_name('STT') send_transaction_view.select_asset_button.click_until_presence_of_element(asset_button) asset_button.click() @@ -326,6 +327,7 @@ class TestTransactionDApp(SingleDeviceTestCase): if send_transaction_view.enter_password_input.is_element_displayed(): self.errors.append(sign_button_warning.format('sending 0 STT with an empty ETH balance')) + send_transaction_view.cancel_button.click() home_view = send_transaction_view.get_back_to_home_view() # Requesting test ETH and waiting till the balance updates self.network_api.faucet(wallet_address[2:]) diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index c42af4f02a..b534f495b9 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -108,6 +108,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): send_transaction.enter_recipient_address_input.set_value(recipient['address']) send_transaction.done_button.click() send_transaction.sign_transaction_button.click() + send_transaction.sign_with_password.click() send_transaction.enter_password_input.click() send_transaction.enter_password_input.send_keys('wrong_password') send_transaction.sign_transaction_button.click() diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index de3505bf02..f761169dc8 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -445,10 +445,12 @@ class BaseView(object): return element def swipe_down(self): - self.driver.swipe(500, 500, 500, 1000) + size = self.driver.get_window_size() + self.driver.swipe(size["width"]*0.5, size["height"]*0.8, size["width"]*0.5, size["height"]*0.2) - def swipe_left(self, y=1700): - self.driver.swipe(1000, y, 100, y) + def swipe_left(self): + size = self.driver.get_window_size() + self.driver.swipe(size["width"]*0.8, size["height"]*0.8, size["width"]*0.2, size["height"]*0.8) def get_status_test_dapp_view(self): from views.web_views.status_test_dapp import StatusTestDAppView diff --git a/test/appium/views/send_transaction_view.py b/test/appium/views/send_transaction_view.py index 4b9019bdaa..fed9f81c51 100644 --- a/test/appium/views/send_transaction_view.py +++ b/test/appium/views/send_transaction_view.py @@ -13,7 +13,7 @@ class FirstRecipient(BaseButton): class CancelButton(BaseButton): def __init__(self, driver): super(CancelButton, self).__init__(driver) - self.locator = self.Locator.accessibility_id('cancel-button') + self.locator = self.Locator.xpath_selector("//*[@text='Cancel']") class SignTransactionButton(BaseButton): diff --git a/test/appium/views/wallet_view.py b/test/appium/views/wallet_view.py index 10b760fb53..b3d7084c29 100644 --- a/test/appium/views/wallet_view.py +++ b/test/appium/views/wallet_view.py @@ -303,6 +303,7 @@ class WalletView(BaseView): send_transaction_view.recent_recipients_button.click_until_presence_of_element(recent_recipient) recent_recipient.click() if kwargs.get('sign_transaction', True): + send_transaction_view.sign_transaction_button.click() send_transaction_view.sign_transaction() def receive_transaction(self, **kwargs):