From eb00df147dec631c88b0dc8d4855e7849ced39ce Mon Sep 17 00:00:00 2001 From: Serhy Date: Mon, 28 Oct 2019 10:00:03 +0200 Subject: [PATCH] E2E transaction appears in history Signed-off-by: Serhy --- .../ui/screens/profile/components/sheets.cljs | 1 + .../ui/screens/wallet/accounts/sheets.cljs | 1 + .../tests/atomic/transactions/test_wallet.py | 33 ++++++------------- test/appium/views/chat_view.py | 2 +- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/status_im/ui/screens/profile/components/sheets.cljs b/src/status_im/ui/screens/profile/components/sheets.cljs index f45fc1a0da..2ceafb8faa 100644 --- a/src/status_im/ui/screens/profile/components/sheets.cljs +++ b/src/status_im/ui/screens/profile/components/sheets.cljs @@ -40,5 +40,6 @@ (i18n/label :t/block-contact-details)] [list-item/list-item {:theme :action-destructive + :accessibility-label :block-contact-confirm :title :t/block-contact :on-press #(hide-sheet-and-dispatch [:contact.ui/block-contact-confirmed public-key])}]])) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/accounts/sheets.cljs b/src/status_im/ui/screens/wallet/accounts/sheets.cljs index 8e9498e9a0..b028543ae8 100644 --- a/src/status_im/ui/screens/wallet/accounts/sheets.cljs +++ b/src/status_im/ui/screens/wallet/accounts/sheets.cljs @@ -68,6 +68,7 @@ [list-item/list-item {:theme :action :title :t/account-settings + :accessibility-label :account-settings-bottom-sheet :icon :main-icons/info :on-press #(hide-sheet-and-dispatch [:navigate-to :account-settings])}] ;; Commented out for v1 diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index dee415a4f0..7f16d65fa5 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -120,34 +120,21 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): if send_transaction.element_by_text_part('Transaction sent').is_element_displayed(): self.driver.fail('Transaction was sent with a wrong password') - @marks.testrail_id(1452) - + @marks.testrail_id(6236) + @marks.medium def test_transaction_appears_in_history(self): - recipient = basic_user sign_in_view = SignInView(self.driver) - sign_in_view.create_user() - home_view = sign_in_view.get_home_view() - transaction_amount = home_view.get_unique_amount() - sender_public_key = home_view.get_public_key() - sender_address = home_view.public_key_to_address(sender_public_key) - home_view.home_button.click() - self.network_api.get_donate(sender_address) + home_view = sign_in_view.create_user() wallet_view = home_view.wallet_button.click() wallet_view.set_up_wallet() - wallet_view.wait_balance_changed_on_wallet_screen() - send_transaction = wallet_view.send_transaction_button.click() - send_transaction.amount_edit_box.click() - send_transaction.amount_edit_box.set_value(transaction_amount) - send_transaction.confirm() - send_transaction.chose_recipient_button.click() - send_transaction.enter_recipient_address_button.click() - send_transaction.enter_recipient_address_input.set_value(recipient['address']) - send_transaction.done_button.click() - send_transaction.sign_transaction_button.click() - send_transaction.sign_transaction() - self.network_api.find_transaction_by_unique_amount(recipient['address'], transaction_amount) + address = wallet_view.get_wallet_address()[2:] + self.network_api.get_donate(address) + recipient = "0x"+basic_user['address'] + sending_amount = "0.08" + wallet_view.send_transaction(asset_name='ETHro', amount=sending_amount, recipient=recipient, sign_transaction=True) transactions_view = wallet_view.transaction_history_button.click() - transactions_view.transactions_table.find_transaction(amount=transaction_amount) + transactions_view.transactions_table.find_transaction(amount=sending_amount) + transactions_view.transactions_table.find_transaction(amount="0.1") @marks.testrail_id(5461) @marks.medium diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 42f495ba09..9762c52c3b 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -125,7 +125,7 @@ class ClearButton(BaseButton): class BlockContactButton(BaseButton): def __init__(self, driver): super(BlockContactButton, self).__init__(driver) - self.locator = self.Locator.accessibility_id('block-contact') + self.locator = self.Locator.accessibility_id('block-contact-confirm') class UnblockContactButton(BaseButton):