diff --git a/test/appium/support/test_rerun.py b/test/appium/support/test_rerun.py index 418d96fa2e..b016f7a29b 100644 --- a/test/appium/support/test_rerun.py +++ b/test/appium/support/test_rerun.py @@ -13,9 +13,9 @@ RERUN_ERRORS = [ 'ERROR The test with session id' "Message: 'CreateAccountButton' is not found on screen", "503 Service Unavailable", - "AttributeError: 'NoneType' object has no attribute 'find_element'", - "[Errno 104] Connection reset by peer" - "AttributeError: 'NoneType' object has no attribute" + "object has no attribute", + "[Errno 104] Connection reset by peer", + "Sauce could not start your job" ] diff --git a/test/appium/tests/atomic/__init__.py b/test/appium/tests/atomic/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/appium/tests/atomic/account_management/__init__.py b/test/appium/tests/atomic/account_management/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/appium/tests/atomic/account_management/test_create_account.py b/test/appium/tests/atomic/account_management/test_create_account.py index 23f5c323f1..ccaa142985 100644 --- a/test/appium/tests/atomic/account_management/test_create_account.py +++ b/test/appium/tests/atomic/account_management/test_create_account.py @@ -10,6 +10,7 @@ from views.sign_in_view import SignInView class TestCreateAccount(SingleDeviceTestCase): @marks.testrail_id(758) + @marks.smoke_1 def test_create_account(self): if not self.test_fairy_warning_is_shown: self.errors.append('TestFairy warning is not shown') @@ -47,6 +48,7 @@ class TestCreateAccount(SingleDeviceTestCase): pytest.fail('New account was not created') @marks.testrail_id(3692) + @marks.skip def test_home_view(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index 5b321c6dce..de23af1880 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -1,6 +1,7 @@ import pytest from tests import marks, group_chat_users +from tests import marks, group_chat_users, basic_user from tests.base_test_case import SingleDeviceTestCase from views.sign_in_view import SignInView @@ -10,6 +11,7 @@ from views.sign_in_view import SignInView class TestProfileSingleDevice(SingleDeviceTestCase): @marks.testrail_id(760) + @marks.smoke_1 def test_set_profile_picture(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() @@ -22,6 +24,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): pytest.fail('Profile picture was not updated') @marks.testrail_id(1403) + @marks.smoke_1 def test_share_contact_code_and_wallet_address(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() @@ -45,6 +48,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(3704) + @marks.smoke_1 def test_copy_contact_code_and_wallet_address(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() @@ -91,6 +95,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): pytest.fail('Profile picture was not updated') @marks.testrail_id(2374) + @marks.smoke_1 def test_backup_seed_phrase(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() @@ -155,3 +160,33 @@ class TestProfileSingleDevice(SingleDeviceTestCase): seed_phrase = profile_view.backup_seed_phrase() for i in seed_phrase.values(): profile_view.check_no_value_in_logcat(i, 'Passphrase') + + @marks.testrail_id(3751) + def test_need_help_section(self): + sign_in_view = SignInView(self.driver) + sign_in_view.create_user() + profile_view = sign_in_view.profile_button.click() + profile_view.help_button.click() + profile_view.request_feature_button.click() + profile_view.find_full_text('Feature Requests') + profile_view.click_system_back_button() + profile_view.submit_bug_button.click() + profile_view.find_full_text('Report a problem') + profile_view.click_system_back_button() + profile_view.discard_button.click() + base_web_view = profile_view.faq_button.click() + base_web_view.open_in_webview() + profile_view.find_text_part('Questions around beta') + + @marks.testrail_id(1416) + @marks.smoke_1 + def test_contact_profile_view(self): + sign_in_view = SignInView(self.driver) + sign_in_view.create_user() + home_view = sign_in_view.get_home_view() + home_view.add_contact(basic_user['public_key']) + chat_view = home_view.get_chat_view() + chat_view.chat_options.click_until_presence_of_element(chat_view.view_profile_button) + chat_view.view_profile_button.click() + for text in basic_user['username'], 'In contacts', 'Send transaction', 'Send message', 'Contact code': + chat_view.find_full_text(text) diff --git a/test/appium/tests/atomic/account_management/test_recover.py b/test/appium/tests/atomic/account_management/test_recover.py index 1f502bd4c5..0c18cbbe81 100644 --- a/test/appium/tests/atomic/account_management/test_recover.py +++ b/test/appium/tests/atomic/account_management/test_recover.py @@ -10,6 +10,7 @@ from views.sign_in_view import SignInView class TestRecoverAccountSingleDevice(SingleDeviceTestCase): @marks.testrail_id(759) + @marks.smoke_1 def test_recover_account(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/account_management/test_sign_in.py b/test/appium/tests/atomic/account_management/test_sign_in.py index 934d7d8a62..8dc4675fc5 100644 --- a/test/appium/tests/atomic/account_management/test_sign_in.py +++ b/test/appium/tests/atomic/account_management/test_sign_in.py @@ -8,6 +8,7 @@ from views.sign_in_view import SignInView class TestSignIn(SingleDeviceTestCase): @marks.testrail_id(1381) + @marks.smoke_1 def test_login_with_new_account(self): sign_in = SignInView(self.driver) username = 'test_user' diff --git a/test/appium/tests/atomic/account_management/test_wallet.py b/test/appium/tests/atomic/account_management/test_wallet.py index 3321325f25..c66cf285a1 100644 --- a/test/appium/tests/atomic/account_management/test_wallet.py +++ b/test/appium/tests/atomic/account_management/test_wallet.py @@ -11,6 +11,7 @@ from views.web_views.base_web_view import BaseWebView class TestWallet(SingleDeviceTestCase): @marks.testrail_id(3698) + @marks.smoke_1 def test_wallet_set_up(self): sign_in = SignInView(self.driver) sign_in.create_user() @@ -50,9 +51,8 @@ class TestWallet(SingleDeviceTestCase): transaction_hash = transaction_details.get_transaction_hash() transaction_details.options_button.click() transaction_details.open_transaction_on_etherscan_button.click() - base_web_view = BaseWebView(self.driver) - base_web_view.web_view_browser.click() - base_web_view.always_button.click() + base_web_view = wallet_view.get_base_web_view(self.driver) + base_web_view.open_in_webview() base_web_view.find_text_part(transaction_hash) @marks.testrail_id(1450) @@ -75,6 +75,7 @@ class TestWallet(SingleDeviceTestCase): pytest.fail('Transaction hash was not copied') @marks.testrail_id(3713) + @marks.smoke_1 def test_manage_assets(self): sign_in = SignInView(self.driver) sign_in.create_user() @@ -92,3 +93,22 @@ class TestWallet(SingleDeviceTestCase): if wallet.asset_by_name(deselect_asset).is_element_displayed(): self.errors.append('%s asset is shown in wallet but was deselected' % deselect_asset) self.verify_no_errors() + + @marks.testrail_id(3725) + def test_backup_seed_phrase_warning_from_wallet(self): + sign_in = SignInView(self.driver) + sign_in.create_user() + wallet = sign_in.wallet_button.click() + wallet.set_up_wallet() + if wallet.backup_seed_phrase.is_element_present(): + pytest.fail("'Backup your Seed Phrase' option is shown on Wallet for an account with no funds") + wallet.receive_transaction_button.click() + address = wallet.address_text.text[2:] + wallet.get_back_to_home_view() + home = wallet.home_button.click() + self.network_api.get_donate(address) + home.wallet_button.click() + if not wallet.backup_seed_phrase.is_element_present(): + pytest.fail("'Backup your Seed Phrase' option is not shown on Wallet for an account with funds") + profile = wallet.get_profile_view() + profile.backup_seed_phrase() diff --git a/test/appium/tests/atomic/browsing/test_browsing.py b/test/appium/tests/atomic/browsing/test_browsing.py index ad9d84f7e6..2479496563 100644 --- a/test/appium/tests/atomic/browsing/test_browsing.py +++ b/test/appium/tests/atomic/browsing/test_browsing.py @@ -63,6 +63,7 @@ class TestBrowsing(SingleDeviceTestCase): pytest.fail('The browser entry is present after re-login') @marks.testrail_id(1396) + @marks.smoke_1 def test_open_google_com_via_open_dapp(self): sign_in_view = SignInView(self.driver) home = sign_in_view.create_user() @@ -75,6 +76,7 @@ class TestBrowsing(SingleDeviceTestCase): assert browsing_view.element_by_text('Google').is_element_displayed() @marks.testrail_id(1397) + @marks.smoke_1 def test_back_forward_buttons_browsing_website(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/chats/__init__.py b/test/appium/tests/atomic/chats/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/appium/tests/atomic/chats/test_chats_management.py b/test/appium/tests/atomic/chats/test_chats_management.py index c891becbd6..212349b450 100644 --- a/test/appium/tests/atomic/chats/test_chats_management.py +++ b/test/appium/tests/atomic/chats/test_chats_management.py @@ -25,6 +25,7 @@ class TestChatManagement(SingleDeviceTestCase): pytest.fail('Message history is shown after re-login') @marks.testrail_id(1395) + @marks.smoke_1 def test_swipe_to_delete_1_1_chat(self): sign_in = SignInView(self.driver) home = sign_in.create_user() @@ -41,6 +42,7 @@ class TestChatManagement(SingleDeviceTestCase): pytest.fail('Deleted 1-1 chat is present after relaunch app') @marks.testrail_id(3718) + @marks.smoke_1 def test_swipe_to_delete_public_chat(self): sign_in = SignInView(self.driver) home = sign_in.create_user() @@ -63,6 +65,7 @@ class TestChatManagement(SingleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(3694) + @marks.smoke_1 def test_add_contact_from_public_chat(self): sign_in = SignInView(self.driver) home = sign_in.create_user() @@ -95,6 +98,7 @@ class TestChatManagement(SingleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(763) + @marks.smoke_1 def test_add_contact_by_pasting_public_key(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/chats/test_commands.py b/test/appium/tests/atomic/chats/test_commands.py index 3416ad8033..4d2bcdbd71 100644 --- a/test/appium/tests/atomic/chats/test_commands.py +++ b/test/appium/tests/atomic/chats/test_commands.py @@ -11,7 +11,7 @@ from views.sign_in_view import SignInView @marks.transaction class TestCommandsMultipleDevices(MultipleDeviceTestCase): - @marks.testrail_case_id(3742) + @marks.smoke_1 @marks.testrail_id(3697) def test_network_mismatch_for_send_request_commands(self): sender = self.senders['d_user'] = transaction_users['D_USER'] @@ -65,6 +65,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(765) + @marks.smoke_1 def test_send_eth_in_1_1_chat(self): recipient = transaction_users['D_USER'] sender = self.senders['c_user'] = transaction_users['C_USER'] @@ -131,6 +132,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1391) + @marks.smoke_1 def test_request_and_receive_eth_in_1_1_chat(self): recipient = transaction_users['C_USER'] sender = self.senders['d_user'] = transaction_users['D_USER'] @@ -167,6 +169,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1429) + @marks.smoke_1 def test_request_eth_in_wallet(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) @@ -235,6 +238,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.network_api.find_transaction_by_unique_amount(recipient['address'], amount) @marks.testrail_id(3744) + @marks.smoke_1 def test_send_tokens_in_1_1_chat(self): recipient = transaction_users['D_USER'] sender = transaction_users['C_USER'] @@ -267,6 +271,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(3748) + @marks.smoke_1 def test_request_and_receive_tokens_in_1_1_chat(self): recipient = transaction_users['C_USER'] sender = transaction_users['D_USER'] @@ -306,6 +311,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): class TestCommandsSingleDevices(SingleDeviceTestCase): @marks.testrail_id(3745) + @marks.smoke_1 def test_send_request_not_enabled_tokens(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/chats/test_console.py b/test/appium/tests/atomic/chats/test_console.py index 937896813c..cb8430ecbb 100644 --- a/test/appium/tests/atomic/chats/test_console.py +++ b/test/appium/tests/atomic/chats/test_console.py @@ -11,6 +11,7 @@ from views.sign_in_view import SignInView class TestMessagesPublicChat(SingleDeviceTestCase): @marks.testrail_id(1380) + @marks.smoke_1 def test_faucet_console_command(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() @@ -37,6 +38,7 @@ class TestMessagesPublicChat(SingleDeviceTestCase): console_view.chat_element_by_text('Faucet request has been received').wait_for_visibility_of_element() @marks.testrail_id(1400) + @marks.smoke_1 def test_web3_block_number(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() diff --git a/test/appium/tests/atomic/chats/test_one_to_one.py b/test/appium/tests/atomic/chats/test_one_to_one.py index 7a2aac2eff..a1bfda2a3a 100644 --- a/test/appium/tests/atomic/chats/test_one_to_one.py +++ b/test/appium/tests/atomic/chats/test_one_to_one.py @@ -12,6 +12,7 @@ from views.sign_in_view import SignInView class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): @marks.testrail_id(764) + @marks.smoke_1 def test_text_message_1_1_chat(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) @@ -32,6 +33,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): pytest.fail("'Seen' status is not shown under the sent text message") @marks.testrail_id(772) + @marks.smoke_1 def test_offline_messaging_1_1_chat(self): self.create_drivers(2, offline_mode=True) device_1, device_2 = self.drivers[0], self.drivers[1] @@ -71,7 +73,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): chat_1 = chat_element.click() chat_1.chat_element_by_text(message_2).wait_for_visibility_of_element(180) - @marks.testrail_case_id(3741) + @marks.smoke_1 @marks.testrail_id(3701) def test_resend_message_offline(self): self.create_drivers(2, offline_mode=True) @@ -144,6 +146,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): chat_2.chat_element_by_text(message).wait_for_visibility_of_element() @marks.testrail_id(1386) + @marks.smoke_1 def test_send_message_to_newly_added_contact(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) @@ -180,6 +183,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1387) + @marks.smoke_1 def test_add_to_contacts(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) @@ -221,6 +225,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1413) + @marks.smoke_1 def test_send_and_open_links(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) @@ -259,6 +264,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1431) + @marks.smoke_1 def test_offline_status(self): self.create_drivers(1, offline_mode=True) driver = self.drivers[0] @@ -286,6 +292,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): @marks.testrail_id(1390) + @marks.smoke_1 def test_copy_and_paste_messages(self): sign_in = SignInView(self.driver) home = sign_in.create_user() @@ -318,6 +325,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): self.verify_no_errors() @marks.testrail_id(1398) + @marks.smoke_1 def test_delete_cut_and_paste_messages(self): sign_in = SignInView(self.driver) home = sign_in.create_user() @@ -338,6 +346,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): chat.chat_element_by_text(message_text[:-2] + ' ').wait_for_visibility_of_element(2) @marks.testrail_id(2106) + @marks.smoke_1 def test_send_emoji(self): sign_in = SignInView(self.driver) home = sign_in.create_user() diff --git a/test/appium/tests/atomic/chats/test_public.py b/test/appium/tests/atomic/chats/test_public.py index a787ab4339..2f593f257a 100644 --- a/test/appium/tests/atomic/chats/test_public.py +++ b/test/appium/tests/atomic/chats/test_public.py @@ -8,6 +8,7 @@ from views.sign_in_view import SignInView class TestPublicChat(MultipleDeviceTestCase): @marks.testrail_id(1383) + @marks.smoke_1 def test_public_chat_messaging(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) diff --git a/test/appium/tests/atomic/transactions/__init__.py b/test/appium/tests/atomic/transactions/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/appium/tests/atomic/transactions/test_daaps.py b/test/appium/tests/atomic/transactions/test_daaps.py index 446363ac8c..a3476e8ee0 100644 --- a/test/appium/tests/atomic/transactions/test_daaps.py +++ b/test/appium/tests/atomic/transactions/test_daaps.py @@ -6,6 +6,7 @@ from views.sign_in_view import SignInView class TestTransactionDApp(SingleDeviceTestCase): @marks.testrail_id(769) + @marks.smoke_1 def test_send_transaction_from_daap(self): sender = transaction_users['B_USER'] sign_in_view = SignInView(self.driver) @@ -20,6 +21,7 @@ class TestTransactionDApp(SingleDeviceTestCase): self.network_api.verify_balance_is_updated(initial_balance, address) @marks.testrail_id(3716) + @marks.smoke_1 def test_sign_message_from_daap(self): password = 'password_for_daap' sign_in_view = SignInView(self.driver) diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index 8cc42f7e69..6cab8572c3 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -7,6 +7,7 @@ from views.sign_in_view import SignInView class TestTransactionWallet(SingleDeviceTestCase): @marks.testrail_id(766) + @marks.smoke_1 def test_send_eth_from_wallet_to_contact(self): recipient = transaction_users['F_USER'] sender = transaction_users['E_USER'] @@ -35,6 +36,7 @@ class TestTransactionWallet(SingleDeviceTestCase): self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount) @marks.testrail_id(767) + @marks.smoke_1 def test_send_eth_from_wallet_to_address(self): recipient = transaction_users['E_USER'] sender = transaction_users['F_USER'] @@ -60,6 +62,7 @@ class TestTransactionWallet(SingleDeviceTestCase): self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount) @marks.testrail_id(1430) + @marks.smoke_1 def test_send_stt_from_wallet(self): sender = transaction_users_wallet['A_USER'] recipient = transaction_users_wallet['B_USER'] diff --git a/test/appium/tests/marks.py b/test/appium/tests/marks.py index da31f7d70f..04211b7384 100644 --- a/test/appium/tests/marks.py +++ b/test/appium/tests/marks.py @@ -3,6 +3,7 @@ import pytest pr = pytest.mark.pr testrail_case_id = pytest.mark.testrail_case_id testrail_id = pytest.mark.testrail_id # atomic tests +smoke_1 = pytest.mark.smoke_1 account = pytest.mark.account all = pytest.mark.all diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index 985a89a9c7..06d3af9be0 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -176,6 +176,20 @@ class TestFairyWarning(BaseText): self.is_shown = bool() +class OkContinueButton(BaseButton): + + def __init__(self, driver): + super(OkContinueButton, self).__init__(driver) + self.locator = self.Locator.xpath_selector("//*[@text='OK, CONTINUE']") + + +class DiscardButton(BaseButton): + + def __init__(self, driver): + super(DiscardButton, self).__init__(driver) + self.locator = self.Locator.xpath_selector("//*[@text='DISCARD']") + + class BaseView(object): def __init__(self, driver): self.driver = driver @@ -196,6 +210,8 @@ class BaseView(object): self.save_button = SaveButton(self.driver) self.done_button = DoneButton(self.driver) self.delete_button = DeleteButton(self.driver) + self.ok_continue_button = OkContinueButton(self.driver) + self.discard_button = DiscardButton(self.driver) self.connection_status = ConnectionStatusText(self.driver) self.apps_button = AppsButton(self.driver) diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index 3b6e84929f..24a23e6c87 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -172,13 +172,6 @@ class BackupSeedPhraseButton(BaseButton): self.locator = self.Locator.xpath_selector("//*[@text='Backup your Seed Phrase']") -class OkContinueButton(BaseButton): - - def __init__(self, driver): - super(OkContinueButton, self).__init__(driver) - self.locator = self.Locator.xpath_selector("//*[@text='OK, CONTINUE']") - - class SeedPhraseTable(BaseText): def __init__(self, driver): @@ -268,6 +261,38 @@ class CustomNetworkURL(BaseEditBox): "//*[@text='RPC URL']/following-sibling::*[1]/android.widget.EditText") +class HelpButton(BaseButton): + + def __init__(self, driver): + super(HelpButton, self).__init__(driver) + self.locator = self.Locator.accessibility_id("help-button") + + +class RequestFeatureButton(BaseButton): + + def __init__(self, driver): + super(RequestFeatureButton, self).__init__(driver) + self.locator = self.Locator.accessibility_id("request-feature-button") + + +class SubmitBugButton(BaseButton): + + def __init__(self, driver): + super(SubmitBugButton, self).__init__(driver) + self.locator = self.Locator.accessibility_id("submit-bug-button") + + +class FaqButton(BaseButton): + + def __init__(self, driver): + super(FaqButton, self).__init__(driver) + self.locator = self.Locator.accessibility_id("faq-button") + + def navigate(self): + from views.web_views.base_web_view import BaseWebView + return BaseWebView(self.driver) + + class ProfileView(BaseView): def __init__(self, driver): @@ -306,13 +331,17 @@ class ProfileView(BaseView): # Backup seed phrase self.backup_seed_phrase_button = BackupSeedPhraseButton(self.driver) - self.ok_continue_button = OkContinueButton(self.driver) self.seed_phrase_table = SeedPhraseTable(self.driver) self.seed_phrase_word_number = SeedPhraseWordNumberText(self.driver) self.seed_phrase_word_input = SeedPhraseWordInput(self.driver) self.ok_got_it_button = OkGotItButton(self.driver) self.select_from_gallery_button = SelectFromGalleryButton(self.driver) + self.help_button = HelpButton(self.driver) + self.request_feature_button = RequestFeatureButton(self.driver) + self.submit_bug_button = SubmitBugButton(self.driver) + self.faq_button = FaqButton(self.driver) + def switch_network(self, network): self.advanced_button.click() self.debug_mode_toggle.click() diff --git a/test/appium/views/wallet_view.py b/test/appium/views/wallet_view.py index 6a3c3501ac..c09b52bb81 100644 --- a/test/appium/views/wallet_view.py +++ b/test/appium/views/wallet_view.py @@ -158,6 +158,16 @@ class CurrencyText(BaseText): self.locator = self.Locator.accessibility_id('total-amount-currency-text') +class BackupSeedPhrase(BaseButton): + def __init__(self, driver): + super(BackupSeedPhrase, self).__init__(driver) + self.locator = self.Locator.xpath_selector("//*[@text='Backup your Seed Phrase']") + + def navigate(self): + from views.profile_view import ProfileView + return ProfileView(self.driver) + + class WalletView(BaseView): def __init__(self, driver): super(WalletView, self).__init__(driver) @@ -185,6 +195,7 @@ class WalletView(BaseView): self.total_amount_text = TotalAmountText(self.driver) self.currency_text = CurrencyText(self.driver) + self.backup_seed_phrase = BackupSeedPhrase(self.driver) def get_usd_total_value(self): import re diff --git a/test/appium/views/web_views/base_web_view.py b/test/appium/views/web_views/base_web_view.py index 3068a67373..9436ecc645 100644 --- a/test/appium/views/web_views/base_web_view.py +++ b/test/appium/views/web_views/base_web_view.py @@ -81,3 +81,7 @@ class BaseWebView(BaseView): counter += 1 if counter > wait_time: pytest.fail("Page is not loaded during %s seconds" % wait_time) + + def open_in_webview(self): + self.web_view_browser.click() + self.always_button.click()