From 18606f548b39d1ca794483ee559578a4930a97e4 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Fri, 17 Sep 2021 18:20:12 +0200 Subject: [PATCH] e2e: ens ropsten --- .../atomic/account_management/test_profile.py | 111 +++---- .../test_wallet_management.py | 2 +- .../atomic/chats/test_chats_management.py | 52 ++- .../tests/atomic/chats/test_commands.py | 62 ++-- .../tests/atomic/chats/test_group_chat.py | 12 +- .../tests/atomic/chats/test_one_to_one.py | 71 ++-- test/appium/tests/atomic/chats/test_public.py | 1 + .../dapps_and_browsing/test_deep_links.py | 16 +- test/appium/tests/atomic/test_upgrade.py | 2 +- .../transactions/test_dapps_transactions.py | 2 +- .../transactions/test_keycard_wallet.py | 5 +- .../tests/atomic/transactions/test_wallet.py | 5 +- .../test_multiple_driver_tests.py | 308 +++++++++--------- test/appium/tests/users.py | 4 +- test/appium/views/base_view.py | 4 +- test/appium/views/chat_view.py | 9 +- .../views/elements_templates/mentioned.png | Bin 5836 -> 4761 bytes test/appium/views/profile_view.py | 13 +- test/appium/views/send_transaction_view.py | 7 +- 19 files changed, 318 insertions(+), 368 deletions(-) diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index b475726535..f12913cbd5 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -116,31 +116,25 @@ class TestProfileSingleDevice(SingleDeviceTestCase): @marks.testrail_id(5502) @marks.critical - def test_can_add_existing_ens(self): + def test_can_add_existing_ens_on_mainnet(self): home = SignInView(self.driver).recover_access(ens_user['passphrase']) profile = home.profile_button.click() - profile.switch_network('Mainnet with upstream RPC') + + profile.just_fyi('check if your name can be added via "ENS usernames" in Profile') + profile.switch_network() home.profile_button.click() - dapp = profile.ens_usernames_button.click() + profile.connect_existing_ens(ens_user['ens']) - dapp.just_fyi('check if your name can be added via "ENS usernames" in Profile') - dapp.element_by_text('Get started').click() - dapp.ens_name_input.set_value(ens_user['ens']) - dapp.check_ens_name.click_until_absense_of_element(dapp.check_ens_name) - if not dapp.element_by_translation_id('ens-saved-title').is_element_displayed(): - self.errors.append('No message "Username added" after resolving own username') - dapp.element_by_translation_id("ens-got-it").click() - - dapp.just_fyi('check that after adding username is shown in "ENS usernames" and profile') - if not dapp.element_by_text(ens_user['ens']).is_element_displayed(): + profile.just_fyi('check that after adding username is shown in "ENS usernames" and profile') + if not profile.element_by_text(ens_user['ens']).is_element_displayed(): self.errors.append('No ENS name is shown in own "ENS usernames" after adding') - dapp.back_button.click() - if not dapp.element_by_text('@%s' % ens_user['ens']).is_element_displayed(): + profile.back_button.click() + if not profile.element_by_text('@%s' % ens_user['ens']).is_element_displayed(): self.errors.append('No ENS name is shown in own profile after adding') - if not dapp.element_by_text('%s.stateofus.eth' % ens_user['ens']).is_element_displayed(): + if not profile.element_by_text('%s' % ens_user['ens']).is_element_displayed(): self.errors.append('No ENS name is shown in own profile after adding') profile.share_my_profile_button.click() - if profile.ens_name_in_share_chat_key_text.text != '%s.stateofus.eth' % ens_user['ens']: + if profile.ens_name_in_share_chat_key_text.text != '%s' % ens_user['ens']: self.errors.append('No ENS name is shown on tapping on share icon in Profile') profile.close_share_popup() @@ -201,7 +195,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): home.profile_button.click() profile.logout() self.driver.reset() - home.recover_access(recovery_phrase) + SignInView(self.driver).recover_access(recovery_phrase) wallet = home.wallet_button.click() if wallet.get_wallet_address() != address: self.driver.fail("Seed phrase displayed in new accounts for back up does not recover respective address") @@ -233,8 +227,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase): home.just_fyi('Check empty contacts view') profile = home.profile_button.click() - profile.switch_network() - home.profile_button.click() profile.contacts_button.click() if not profile.add_new_contact_button.is_element_displayed(): self.driver.fail('No expected element on contacts view') @@ -253,8 +245,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase): 'username': basic_user['username'], }, 'pasting_ens_another_domain': { - 'contact_code': ens_user['ens_another_domain'], - 'username': '@%s' % ens_user['ens_another_domain'], + 'contact_code': ens_user['ens_another'], + 'username': '@%s' % ens_user['ens_another'], 'nickname': 'my_dear_friend' }, @@ -283,7 +275,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): self.errors.append('In %s case nickname %s not found in contact view after scanning' % (key, users[key]['nickname'])) home.just_fyi('Remove contact and check that it disappeared') - user_to_remove = '@%s' % ens_user['ens_another_domain'] + user_to_remove = '@%s' % ens_user['ens_another'] profile.element_by_text(user_to_remove).click() chat.remove_from_contacts.click() chat.close_button.click() @@ -293,7 +285,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): home.just_fyi('Relogin and open profile view of the contact removed from Contact list to ensure there is no crash') profile.profile_button.click() profile.relogin() - one_to_one_chat = home.add_contact(public_key=ens_user['ens_another_domain'], add_in_contacts=False) + one_to_one_chat = home.add_contact(public_key=ens_user['ens_another'], add_in_contacts=False) one_to_one_chat.chat_options.click() profile = one_to_one_chat.view_profile_button.click() if profile.remove_from_contacts.is_element_displayed(): @@ -550,29 +542,27 @@ class TestProfileSingleDevice(SingleDeviceTestCase): @marks.medium def test_set_primary_ens_custom_domain(self): home = SignInView(self.driver).recover_access(ens_user['passphrase']) - ens_not_stateofus = ens_user['ens_another_domain'] - ens_stateofus = ens_user['ens'] + ens_second, ens_main = ens_user['ens_another'], ens_user['ens'] home.just_fyi('add 2 ENS names in Profile') profile = home.profile_button.click() - dapp = profile.connect_existing_status_ens(ens_stateofus) - profile.element_by_text("Add username").click() - profile.element_by_text_part("another domain").click() - dapp.ens_name_input.set_value(ens_not_stateofus) + dapp = profile.connect_existing_ens(ens_main) + profile.element_by_translation_id("ens-add-username").wait_and_click() + profile.element_by_translation_id("ens-want-custom-domain").wait_and_click() + dapp.ens_name_input.set_value(ens_second) dapp.check_ens_name.click_until_presence_of_element(dapp.element_by_translation_id("ens-got-it")) - dapp.element_by_translation_id("ens-got-it").click() + dapp.element_by_translation_id("ens-got-it").wait_and_click() - home.just_fyi('check that by default %s ENS is set' % ens_stateofus) - dapp.element_by_text('Primary username').click() + home.just_fyi('check that by default %s ENS is set' % ens_main) + dapp.element_by_translation_id("ens-primary-username").click() message_to_check = 'Your messages are displayed to others with' - if not dapp.element_by_text('%s\n@%s.stateofus.eth' % (message_to_check, ens_stateofus)).is_element_displayed(): - self.errors.append('%s ENS username is not set as primary by default' % ens_stateofus) - - home.just_fyi('check view in chat settings ENS from other domain: %s after set new primary ENS' % ens_not_stateofus) - dapp.set_primary_ens_username(ens_user['ens_another_domain']).click() - if profile.username_in_ens_chat_settings_text.text != '@' + ens_not_stateofus: - self.errors.append('ENS username %s is not shown in ENS username Chat Settings after enabling' % ens_not_stateofus) + if not dapp.element_by_text('%s\n@%s' % (message_to_check, ens_main)).is_element_displayed(): + self.errors.append('%s ENS username is not set as primary by default' % ens_main) + home.just_fyi('check view in chat settings ENS from other domain: %s after set new primary ENS' % ens_second) + dapp.set_primary_ens_username(ens_second).click() + if profile.username_in_ens_chat_settings_text.text != '@' + ens_second: + self.errors.append('ENS username %s is not shown in ENS username Chat Settings after enabling' % ens_second) self.errors.verify_no_errors() @@ -651,6 +641,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): one_to_one_chat_2.chat_message_input.click() if not one_to_one_chat_2.user_profile_image_in_mentions_list(default_username_1).is_element_image_similar_to_template('sauce_logo.png'): self.errors.append('Profile picture was not updated in 1-1 chat mentions list') + one_to_one_chat_2.get_back_to_home_view() profile_1.just_fyi('Check profile image is updated in Group chat view') profile_2 = one_to_one_chat_2.profile_button.click() @@ -659,12 +650,11 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): if not profile_2.profile_picture.is_element_image_similar_to_template('sauce_logo.png'): self.errors.append('Profile picture was not updated on user Profile view') profile_2.close_button.click() - one_to_one_chat_2.home_button.click(desired_view='home') + [home.home_button.click() for home in (profile_2, home_1)] if not home_2.get_chat(default_username_1).chat_image.is_element_image_similar_to_template('sauce_logo.png'): self.errors.append('User profile picture was not updated on Chats view') profile_1.just_fyi('Check profile image updated in user profile view in Group chat views 4') - home_1.home_button.click(desired_view='home') group_chat_message = 'Trololo' group_chat_2 = home_2.create_group_chat(user_names_to_add=[default_username_1]) group_chat_2.send_message('Message') @@ -865,7 +855,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): profile_1.confirm_button.click() profile_1.just_fyi('check that popup "Error connecting" will not reappear if tap on "Cancel"') - profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(60) + profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(120) profile_1.cancel_button.click() profile_1.home_button.click() @@ -1056,47 +1046,34 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): user_1 = ens_user home_1 = sign_in_1.recover_access(user_1['passphrase'], enable_notifications=True) home_2 = sign_in_2.create_user() - publuc_key_2, username_2 = home_2.get_public_key_and_username(return_username=True) + public_key_2, username_2 = home_2.get_public_key_and_username(return_username=True) home_2.home_button.double_click() - - home_1.just_fyi('switching to mainnet and add ENS') profile_1 = sign_in_1.profile_button.click() - profile_1.switch_network('Mainnet with upstream RPC') - home_1.profile_button.click() - dapp_1 = profile_1.ens_usernames_button.click() - dapp_1.element_by_text('Get started').click() - dapp_1.ens_name_input.set_value(ens_user['ens']) - expected_text = 'This user name is owned by you and connected with your chat key.' - if not dapp_1.element_by_text_part(expected_text).is_element_displayed(): - dapp_1.click_system_back_button() - dapp_1.wait_for_element_starts_with_text(expected_text) - dapp_1.check_ens_name.click_until_presence_of_element(dapp_1.element_by_text('Ok, got it')) - dapp_1.element_by_text('Ok, got it').click() + profile_1.connect_existing_ens(user_1['ens']) home_1.just_fyi('check ENS name wallet address and public key') profile_1.element_by_text(user_1['ens']).click() - for text in ('10 SNT, deposit unlocked', user_1['address'].lower(), user_1['public_key'] ): + for text in (user_1['address'].lower(), user_1['public_key'] ): if not profile_1.element_by_text_part(text).is_element_displayed(40): self.errors.append('%s text is not shown' % text) profile_1.home_button.click() home_2.just_fyi('joining same public chat, set ENS name and check it in chat from device2') chat_name = home_1.get_random_chat_name() - public_2 = home_2.join_public_chat(chat_name) - public_1 = home_1.join_public_chat(chat_name) - public_1.get_back_to_home_view() - home_1.profile_button.click() + [public_1, public_2] = [home.join_public_chat(chat_name) for home in (home_1, home_2)] + public_1.home_button.double_click() + home_1.profile_button.double_click() ens_name = '@' + user_1['ens'] - profile_1.element_by_text('Your ENS name').click() + profile_1.element_by_translation_id("ens-your-your-name").click() if profile_1.username_in_ens_chat_settings_text.text != ens_name: - self.errors.append('ENS username is not shown in ENS usernames Chat Settings after enabling') + self.errors.append('ENS username is not shown in ENS usernames Chat Settings after enabling') profile_1.back_button.click() profile_1.home_button.click() home_1.get_chat('#' + chat_name).click() message_text_2 = 'message test text 1' public_1.send_message(message_text_2) if not public_2.wait_for_element_starts_with_text(ens_name): - self.errors.append('ENS username is not shown in public chat') + self.errors.append('ENS username is not shown in public chat') home_1.put_app_to_background() home_2.just_fyi('check that can mention user with ENS name') @@ -1112,7 +1089,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): home_1.just_fyi('check that PN is received and after tap you are redirected to public chat, mention is highligted') home_1.open_notification_bar() home_1.element_by_text_part(username_2).click() - if home_1.element_starts_with_text(user_1['ens'] +'.stateofus.eth').is_element_differs_from_template('mentioned.png', 2): + if home_1.element_starts_with_text(user_1['ens']).is_element_differs_from_template('mentioned.png', 2): self.errors.append('Mention is not highlighted!') # Close Device1 driver session since it's not needed anymore @@ -1203,7 +1180,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): if not home_2.mobile_connection_on_icon.is_element_displayed(): self.errors.append('No mobile connection ON icon is shown') home_2.get_chat('#%s'% public_chat_name).click() - if not public_2.chat_element_by_text(public_chat_message).is_element_displayed(90): + if not public_2.chat_element_by_text(public_chat_message).is_element_displayed(180): self.errors.append("Chat history was not fetched with mobile data fetching ON") home_2.just_fyi('check redirect to sync settings by tappin "Sync" in connection status bottom sheet') diff --git a/test/appium/tests/atomic/account_management/test_wallet_management.py b/test/appium/tests/atomic/account_management/test_wallet_management.py index 657cb086fb..a2b5cb99b4 100644 --- a/test/appium/tests/atomic/account_management/test_wallet_management.py +++ b/test/appium/tests/atomic/account_management/test_wallet_management.py @@ -377,7 +377,7 @@ class TestWalletManagement(SingleDeviceTestCase): sign_in = SignInView(self.driver) home = sign_in.create_user() profile = home.profile_button.click() - profile.switch_network('Mainnet with upstream RPC') + profile.switch_network() search_list_assets = { 'ad': ['AdEx', 'Open Trading Network', 'TrueCAD'], 'zs': ['ZSC'] diff --git a/test/appium/tests/atomic/chats/test_chats_management.py b/test/appium/tests/atomic/chats/test_chats_management.py index 6cec86f5ba..89612db153 100644 --- a/test/appium/tests/atomic/chats/test_chats_management.py +++ b/test/appium/tests/atomic/chats/test_chats_management.py @@ -164,11 +164,9 @@ class TestChatManagement(SingleDeviceTestCase): def test_can_start_chat_from_suggestions_using_search_chat(self): sign_in = SignInView(self.driver) home = sign_in.create_user() - profile = home.profile_button.click() - profile.switch_network() - chat_view = ChatView(self.driver) + chat = ChatView(self.driver) ens_name_status, ens_name_another_domain, public_chat_name = ens_user_ropsten['ens'], \ - ens_user['ens_another_domain'], 'some-pub-chat' + ens_user['ens_another'], 'some-pub-chat' search_list = { ens_name_status: { 'home': { @@ -178,10 +176,10 @@ class TestChatManagement(SingleDeviceTestCase): '#%s' % ens_name_status }, 'navigate_to': '%s.stateofus.eth' % ens_name_status, - 'chat_view': { - chat_view.add_to_contacts, - chat_view.element_by_text('@%s' % ens_name_status), - chat_view.chat_message_input + 'chat': { + chat.add_to_contacts, + chat.element_by_text('@%s' % ens_name_status), + chat.chat_message_input } }, ens_name_another_domain: { @@ -190,10 +188,10 @@ class TestChatManagement(SingleDeviceTestCase): }, 'home_not_shown': 'Join a public chat', 'navigate_to': 'Start a new private chat', - 'chat_view': { - chat_view.add_to_contacts, - chat_view.element_by_text('@%s' % ens_name_another_domain), - chat_view.chat_message_input + 'chat': { + chat.add_to_contacts, + chat.element_by_text('@%s' % ens_name_another_domain), + chat.chat_message_input }, }, public_chat_name: { @@ -202,9 +200,9 @@ class TestChatManagement(SingleDeviceTestCase): }, 'home_not_shown': 'Start a new private chat', 'navigate_to': '#%s' % public_chat_name, - 'chat_view': { - chat_view.element_by_text('#%s' % public_chat_name), - chat_view.chat_message_input + 'chat': { + chat.element_by_text('#%s' % public_chat_name), + chat.chat_message_input }, }, @@ -229,7 +227,7 @@ class TestChatManagement(SingleDeviceTestCase): if not home.element_by_text(text).is_element_displayed(): self.errors.append('%s is not shown on home view while searching for %s' % (text, keyword)) home.element_by_text(search_list[keyword]['navigate_to']).click() - for element in search_list[keyword]['chat_view']: + for element in search_list[keyword]['chat']: if not element.is_element_displayed(): self.errors.append( 'Requested %s element is not shown on chat view after navigating from suggestion ' @@ -534,6 +532,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase): chat_1.send_message_button.click() if not chat_1.chat_element_by_text('%s %s' % (nickname, additional_text)).is_element_displayed(): self.errors.append("Nickname is not resolved on send message") + chat_1.get_back_to_home_view() device_1.just_fyi('check contact list in Profile after setting nickname') profile_1 = chat_1.profile_button.click() @@ -956,28 +955,15 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase): def test_mention_users_not_in_chats_if_not_in_contacts(self): self.create_drivers(2) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) - sender = ens_user_message_sender + sender = ens_user home_1, home_2 = device_1.create_user(), device_2.recover_access(passphrase=sender['passphrase']) - profile_2 = home_2.profile_button.click() - profile_2.switch_network() - - home_2.profile_button.click() - - home_2.just_fyi('Set ENS name so its visible in chats') - dapp_view = profile_2.ens_usernames_button.click() - dapp_view.element_by_text('Get started').click() - dapp_view.ens_name_input.set_value(sender['ens']) - dapp_view.check_ens_name.click_until_presence_of_element(dapp_view.element_by_translation_id("ens-got-it")) - dapp_view.element_by_translation_id("ens-got-it").click() + profile_2.connect_existing_ens(sender['ens']) + profile_2.home_button.double_click() device_1.just_fyi('Both devices joining the same public chat and send messages') chat_name = device_1.get_random_chat_name() - own_default_username = home_1.get_public_key_and_username(return_username=True) - home_1.home_button.click() - chat_1 = home_1.join_public_chat(chat_name) - profile_2.home_button.click() - chat_2 = home_2.join_public_chat(chat_name) + [chat_1, chat_2] = [home.join_public_chat(chat_name) for home in (home_1, home_2)] message = 'From ' + sender['ens'] + ' message' chat_2.send_message(message) username_value = '@' + sender['ens'] diff --git a/test/appium/tests/atomic/chats/test_commands.py b/test/appium/tests/atomic/chats/test_commands.py index b528c0b0c9..fec4f4d816 100644 --- a/test/appium/tests/atomic/chats/test_commands.py +++ b/test/appium/tests/atomic/chats/test_commands.py @@ -1,8 +1,8 @@ import time from tests import marks -from tests.users import transaction_senders, transaction_recipients, ens_user_ropsten -from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase +from tests.users import transaction_senders, ens_user +from tests.base_test_case import MultipleDeviceTestCase from views.sign_in_view import SignInView @@ -224,14 +224,14 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): def test_network_mismatch_for_send_request_in_1_1_chat(self): sender = transaction_senders['D'] self.create_drivers(2) - device_1_sign_in, device_2_sign_in = SignInView(self.drivers[0]), SignInView(self.drivers[1]) - device_1_sign_in.recover_access(passphrase=sender['passphrase']) - device_2_sign_in.create_user() - home_1, home_2 = device_1_sign_in.get_home_view(), device_2_sign_in.get_home_view() + sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) + sign_in_1.recover_access(passphrase=sender['passphrase']) + sign_in_2.create_user() + home_1, home_2 = sign_in_1.get_home_view(), sign_in_2.get_home_view() wallet_1 = home_1.wallet_button.click() wallet_1.home_button.click() profile_2 = home_2.profile_button.click() - device_2_username = profile_2.default_username_text.text + username_2 = profile_2.default_username_text.text profile_2.switch_network() chat_2 = home_2.add_contact(sender['public_key']) @@ -249,7 +249,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): if chat_2.reply_message_button.is_element_displayed(): self.errors.append('Reply is available on long-tap on Incoming transaction message!') - chat_1 = home_1.get_chat(device_2_username).click() + chat_1 = home_1.get_chat(username_2).click() chat_1_sender_message = chat_1.get_outgoing_transaction() chat_1_sender_message.long_press_element() if chat_1.reply_message_button.is_element_displayed(): @@ -267,32 +267,44 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase): self.errors.append("Transaction is shown as confirmed on mainnet, but was sent on ropsten!") self.errors.verify_no_errors() - -class TestCommandsSingleDevices(SingleDeviceTestCase): - @marks.testrail_id(6279) @marks.high @marks.transaction def test_send_eth_to_ens_in_chat(self): - sign_in = SignInView(self.driver) - sender = transaction_senders['E'] - home = sign_in.recover_access(sender['passphrase']) - wallet = home.wallet_button.click() - wallet.wait_balance_is_changed() - wallet.home_button.click() - chat = home.add_contact(ens_user_ropsten['ens']) - chat.commands_button.click() - amount = chat.get_unique_amount() + self.create_drivers(2) + sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) + sender, reciever = transaction_senders['E'], ens_user + home_1, home_2 = sign_in_1.recover_access(sender['passphrase']), sign_in_2.recover_access(reciever['passphrase']) - send_message = chat.send_command.click() + home_2.just_fyi("Start chat with sender") + profile_2 = home_2.profile_button.click() + profile_2.connect_existing_ens(reciever['ens']) + profile_2.home_button.click() + chat_2 = home_2.add_contact(sender['public_key']) + message_1, message_2 = 'hello', 'hey' + chat_2.send_message(message_1) + + wallet_1 = home_1.wallet_button.click() + wallet_1.wait_balance_is_changed() + wallet_1.home_button.click() + chat_1 = home_1.add_contact(reciever['ens']) + chat_1.send_message(message_2) + chat_1.commands_button.click() + amount = chat_1.get_unique_amount() + + chat_1.just_fyi("Check sending assets to ENS name from sender side") + send_message = chat_1.send_command.click() send_message.amount_edit_box.set_value(amount) send_message.confirm() send_message.next_button.click() - from views.send_transaction_view import SendTransactionView - send_transaction = SendTransactionView(self.driver) + send_transaction = SendTransactionView(self.drivers[0]) send_transaction.ok_got_it_button.click() send_transaction.sign_transaction() - chat_sender_message = chat.get_outgoing_transaction() + chat_1_sender_message = chat_1.get_outgoing_transaction(transaction_value=amount) self.network_api.wait_for_confirmation_of_transaction(sender['address'], amount) - chat_sender_message.transaction_status.wait_for_element_text(chat_sender_message.confirmed) + chat_1_sender_message.transaction_status.wait_for_element_text(chat_1_sender_message.confirmed) + + chat_2.just_fyi("Check that message is fetched for receiver") + chat_2_reciever_message = chat_2.get_incoming_transaction(transaction_value=amount) + chat_2_reciever_message.transaction_status.wait_for_element_text(chat_2_reciever_message.confirmed) diff --git a/test/appium/tests/atomic/chats/test_group_chat.py b/test/appium/tests/atomic/chats/test_group_chat.py index c2cb6715c5..c0bd6237d5 100644 --- a/test/appium/tests/atomic/chats/test_group_chat.py +++ b/test/appium/tests/atomic/chats/test_group_chat.py @@ -236,16 +236,8 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): profile_1, profile_2 = [home.profile_button.click() for home in (home_1, home_2)] key_1, username_1 = profile_1.get_public_key_and_username(return_username=True) ens, full_ens, username_2 = ens_user['ens'], '@%s' % ens_user['ens'], ens_user['username'] - [profile.switch_network() for profile in (profile_1, profile_2)] - - home_2.just_fyi('Set ENS') - profile_2 = home_2.profile_button.click() - dapp_view = profile_2.ens_usernames_button.click() - dapp_view.element_by_text('Get started').click() - dapp_view.ens_name_input.set_value(ens) - dapp_view.check_ens_name.click_until_presence_of_element(dapp_view.element_by_translation_id("ens-got-it")) - dapp_view.element_by_translation_id("ens-got-it").click() - home_2.home_button.click() + profile_2.connect_existing_ens(ens) + [profile.home_button.click() for profile in (profile_1, profile_2)] home_1.just_fyi('Set nickname, using emojis, special chars and cyrrilic chars without adding to contact') emoji_message = random.choice(list(emoji.EMOJI_UNICODE)) 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 8d0447e284..94eed2a7fb 100644 --- a/test/appium/tests/atomic/chats/test_one_to_one.py +++ b/test/appium/tests/atomic/chats/test_one_to_one.py @@ -270,30 +270,23 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) home_1, home_2 = device_1.create_user(), device_2.create_user() - home_1.just_fyi('join public chat and check that stickers are not available on Ropsten') + home_1.just_fyi('Join public chat and check that stickers are not available on Ropsten') chat_name = home_1.get_random_chat_name() home_1.join_public_chat(chat_name) public_chat_1 = home_1.get_chat_view() if public_chat_1.show_stickers_button.is_element_displayed(): self.errors.append('Sticker button is shown while on Ropsten') - home_1.just_fyi('switch to mainnet') + home_1.just_fyi('Switch to mainnet on both devices') public_chat_1.get_back_to_home_view() - device_1_profile, device_2_profile = home_1.profile_button.click(), home_2.profile_button.click() - device_2_public_key = device_2_profile.get_public_key_and_username() - device_1_public_key, device_1_username = device_1_profile.get_public_key_and_username(return_username=True) - - for device in device_2_profile, device_1_profile: - device.switch_network('Mainnet with upstream RPC') + profile_1, profile_2 = home_1.profile_button.click(), home_2.profile_button.click() + public_key_2 = profile_2.get_public_key_and_username() + public_key_1, username_1 = profile_1.get_public_key_and_username(return_username=True) + [profile.switch_network() for profile in (profile_2, profile_1)] home_1.get_chat('#' + chat_name).click() - home_1.just_fyi('install free sticker pack and use it in public chat') - public_chat_1.show_stickers_button.click() - public_chat_1.get_stickers.click() - public_chat_1.install_sticker_pack_by_name('Status Cat') - public_chat_1.back_button.click() - time.sleep(2) - public_chat_1.swipe_left() + home_1.just_fyi('Install free sticker pack and use it in public chat') + public_chat_1.install_sticker_pack_by_name() public_chat_1.sticker_icon.click() if not public_chat_1.sticker_message.is_element_displayed(): self.errors.append('Sticker was not sent') @@ -302,15 +295,15 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): self.errors.append('Sticker is not shown in recently used list') public_chat_1.get_back_to_home_view() - home_1.just_fyi('send stickers in 1-1 chat from Recent') - private_chat_1 = home_1.add_contact(device_2_public_key) + home_1.just_fyi('Send stickers in 1-1 chat from Recent') + private_chat_1 = home_1.add_contact(public_key_2) private_chat_1.show_stickers_button.click() private_chat_1.sticker_icon.click() if not private_chat_1.chat_item.is_element_displayed(): self.errors.append('Sticker was not sent from Recent') - home_2.just_fyi('check that can install stickers by tapping on sticker message') - private_chat_2 = home_2.get_chat(device_1_username).click() + home_2.just_fyi('Check that can install stickers by tapping on sticker message') + private_chat_2 = home_2.get_chat(username_1).click() private_chat_2.chat_item.click() if not private_chat_2.element_by_text_part('Status Cat').is_element_displayed(): self.errors.append('Stickerpack is not available for installation after tapping on sticker message') @@ -318,7 +311,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): if private_chat_2.element_by_text_part('Free').is_element_displayed(): self.errors.append('Stickerpack was not installed') - home_2.just_fyi('check that can navigate to another user profile via long tap on sticker message') + home_2.just_fyi('Check that can navigate to another user profile via long tap on sticker message') private_chat_2.close_sticker_view_icon.click() private_chat_2.chat_item.long_press_element() private_chat_2.element_by_text('View Details').click() @@ -690,12 +683,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): chat_2 = home_2.add_contact(public_key_1) home_2.just_fyi('Install free sticker pack and use it in 1-1 chat') - chat_2.show_stickers_button.click() - chat_2.get_stickers.click() - chat_2.install_sticker_pack_by_name('Status Cat') - chat_2.back_button.click() - time.sleep(2) - chat_2.swipe_left() + chat_2.install_sticker_pack_by_name() chat_1 = home_1.add_contact(public_key_2) # methods with steps to use later in loop @@ -900,21 +888,14 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): def test_can_use_purchased_stickers_on_recovered_account(self): sign_in = SignInView(self.driver) home_view = sign_in.recover_access(ens_user['passphrase']) - - sign_in.just_fyi('switch to Mainnet') profile = home_view.profile_button.click() - profile.switch_network('Mainnet with upstream RPC') + profile.switch_network() sign_in.just_fyi('join to public chat, buy and install stickers') chat = home_view.join_public_chat(home_view.get_random_chat_name()) - chat.show_stickers_button.click() - chat.get_stickers.click() chat.install_sticker_pack_by_name('Tozemoon') - chat.back_button.click() sign_in.just_fyi('check that can use installed pack') - time.sleep(2) - chat.swipe_left() chat.sticker_icon.click() if not chat.chat_item.is_element_displayed(): self.driver.fail('Sticker was not sent') @@ -975,20 +956,18 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): def test_can_scan_qr_with_chat_key_from_home_start_chat(self): sign_in = SignInView(self.driver) home = sign_in.recover_access(basic_user['passphrase']) - profile = home.profile_button.click() - profile.switch_network() url_data = { 'ens_with_stateofus_domain_deep_link': { - 'url': 'https://join.status.im/u/%s.stateofus.eth' % ens_user['ens'], - 'username': ens_user['username'] + 'url': 'https://join.status.im/u/%s.stateofus.eth' % ens_user_ropsten['ens'], + 'username': ens_user_ropsten['username'] }, 'ens_without_stateofus_domain_deep_link': { 'url': 'https://join.status.im/u/%s' % ens_user['ens'], 'username': ens_user['username'] }, 'ens_another_domain_deep_link': { - 'url': 'status-im://u/%s' % ens_user['ens_another_domain'], + 'url': 'status-im://u/%s' % ens_user['ens_another'], 'username': ens_user['username'] }, 'own_profile_key_deep_link': { @@ -1005,7 +984,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): }, # TODO: comment until clarification case with scanning QR with ENS names only # 'ens_another_domain':{ - # 'url': ens_user['ens_another_domain'], + # 'url': ens_user['ens_another'], # 'username': ens_user['username'] # }, 'own_profile_key': { @@ -1035,18 +1014,18 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase): contacts.allow_button.click() contacts.enter_qr_edit_box.scan_qr(url_data[key]['url']) from views.chat_view import ChatView - chat_view = ChatView(self.driver) + chat = ChatView(self.driver) if url_data[key].get('error'): - if not chat_view.element_by_text_part(url_data[key]['error']).is_element_displayed(): + if not chat.element_by_text_part(url_data[key]['error']).is_element_displayed(): self.errors.append('Expected error %s is not shown' % url_data[key]['error']) - chat_view.ok_button.click() + chat.ok_button.click() if url_data[key].get('username'): - if not chat_view.chat_message_input.is_element_displayed(): + if not chat.chat_message_input.is_element_displayed(): self.errors.append( 'In "%s" case chat input is not found after scanning, so no redirect to 1-1' % key) - if not chat_view.element_by_text(url_data[key]['username']).is_element_displayed(): + if not chat.element_by_text(url_data[key]['username']).is_element_displayed(): self.errors.append('In "%s" case "%s" not found after scanning' % (key, url_data[key]['username'])) - chat_view.get_back_to_home_view() + chat.get_back_to_home_view() self.errors.verify_no_errors() @marks.testrail_id(6322) diff --git a/test/appium/tests/atomic/chats/test_public.py b/test/appium/tests/atomic/chats/test_public.py index 60fa4b8e13..592dfdb56b 100644 --- a/test/appium/tests/atomic/chats/test_public.py +++ b/test/appium/tests/atomic/chats/test_public.py @@ -340,6 +340,7 @@ class TestPublicChatSingleDevice(SingleDeviceTestCase): self.errors.append("'Quiet here for %s' is not shown after fetching more history" % times[period]) else: variants = times[period] + chat.element_by_text_part(fetch_more).wait_for_invisibility_of_element(120) res = any(profile.element_by_text_part(variant).is_element_displayed(30) for variant in variants) if not res: self.errors.append("History is not fetched for one month!" ) diff --git a/test/appium/tests/atomic/dapps_and_browsing/test_deep_links.py b/test/appium/tests/atomic/dapps_and_browsing/test_deep_links.py index 645df67e80..192caba36d 100644 --- a/test/appium/tests/atomic/dapps_and_browsing/test_deep_links.py +++ b/test/appium/tests/atomic/dapps_and_browsing/test_deep_links.py @@ -26,17 +26,15 @@ class TestDeepLinks(SingleDeviceTestCase): @marks.testrail_id(5441) @marks.medium def test_open_user_profile_using_deep_link(self): - sign_in_view = SignInView(self.driver) - sign_in_view.create_user() - profile = sign_in_view.profile_button.click() - profile.switch_network('Mainnet with upstream RPC') - for user_ident in ens_user['ens'], ens_user['ens_another_domain'], ens_user['public_key'],: + sign_in = SignInView(self.driver) + sign_in.create_user() + for user_ident in ens_user['ens'], ens_user['ens_another'], ens_user['public_key'],: self.driver.close_app() deep_link = 'status-im://u/%s' % user_ident - sign_in_view.open_weblink_and_login(deep_link) - chat_view = sign_in_view.get_chat_view() - for text in ens_user['username'], 'Add to contacts': - if not chat_view.element_by_text(text).scroll_to_element(10): + sign_in.open_weblink_and_login(deep_link) + chat = sign_in.get_chat_view() + for text in ens_user['username'], sign_in.get_translation_by_key("add-to-contacts"): + if not chat.element_by_text(text).scroll_to_element(10): self.driver.fail("User profile screen is not opened") @marks.testrail_id(5442) diff --git a/test/appium/tests/atomic/test_upgrade.py b/test/appium/tests/atomic/test_upgrade.py index eb5c5c1821..3b45837a28 100644 --- a/test/appium/tests/atomic/test_upgrade.py +++ b/test/appium/tests/atomic/test_upgrade.py @@ -508,7 +508,7 @@ class TestUpgradeMultipleApplication(MultipleDeviceTestCase): device_1.just_fyi("Check profile settings") profile_1 = device_1.profile_button.click() profile_1.element_by_translation_id("ens-your-your-name").click() - for ens in user['ens'], user['ens_another_domain']: + for ens in user['ens'], user['ens_another']: if not profile_1.element_by_text(ens).is_element_displayed(): self.errors.append("ENS name %s is not shown after upgrade" % ens) profile_1.profile_button.click() diff --git a/test/appium/tests/atomic/transactions/test_dapps_transactions.py b/test/appium/tests/atomic/transactions/test_dapps_transactions.py index ab012a77ab..f8245c00e2 100644 --- a/test/appium/tests/atomic/transactions/test_dapps_transactions.py +++ b/test/appium/tests/atomic/transactions/test_dapps_transactions.py @@ -119,7 +119,7 @@ class TestTransactionDApp(SingleDeviceTestCase): home.just_fyi("Checking deploy simple contract") send_transaction = status_test_dapp.deploy_contract_button.click() - send_transaction.sign_transaction(default_gas_price=True) + send_transaction.sign_transaction() if not status_test_dapp.element_by_text('Contract deployed at: ').is_element_displayed(180): self.errors.append('Contract was not created') for text in ['Call contract get function', diff --git a/test/appium/tests/atomic/transactions/test_keycard_wallet.py b/test/appium/tests/atomic/transactions/test_keycard_wallet.py index 933c63eff5..1146d6c3b6 100644 --- a/test/appium/tests/atomic/transactions/test_keycard_wallet.py +++ b/test/appium/tests/atomic/transactions/test_keycard_wallet.py @@ -115,8 +115,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): wallet.get_account_by_name(account_name).click() send_transaction = wallet.send_transaction(account_name=wallet.status_account_name, amount=transaction_amount_1, - keycard=True, - default_gas_price=True) + keycard=True) wallet.close_button.click() sub_account_address = wallet.get_wallet_address(account_name)[2:] self.network_api.wait_for_confirmation_of_transaction(sub_account_address, transaction_amount_1) @@ -153,6 +152,6 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): send_transaction.accounts_button.click() send_transaction.element_by_text(wallet.status_account_name).click() send_transaction.sign_transaction_button.click() - send_transaction.sign_transaction(keycard=True, default_gas_price=True) + send_transaction.sign_transaction(keycard=True) wallet.element_by_text('Assets').click() wallet.wait_balance_is_equal_expected_amount(asset='ETH', expected_balance=0) diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index ab2e6b8781..6d60b682ef 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -261,8 +261,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): updated_balance = self.network_api.get_balance(status_account_address) transaction_amount_1 = round(float(transaction_amount) * 0.2, 12) wallet.send_transaction(account_name=wallet.status_account_name, - amount=transaction_amount_1, - default_gas_price=True) + amount=transaction_amount_1) wallet.close_button.click() sub_account_address = wallet.get_wallet_address(account_name)[2:] self.network_api.wait_for_confirmation_of_transaction(status_account_address, transaction_amount) @@ -541,7 +540,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): self.errors.append('ENS from contact is not resolved as recipient') send_tr.just_fyi('Set different ENS options') - send_tr.set_recipient_address(ens_other['ens_another_domain']) + send_tr.set_recipient_address(ens_other['ens_another']) if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address(ens_other['address']): self.errors.append('ENS address on another domain is not resolved as recipient') send_tr.set_recipient_address('%s.stateofus.eth' % ens_status['ens']) diff --git a/test/appium/tests/atomic/zzz_multiple_drivers_tests/test_multiple_driver_tests.py b/test/appium/tests/atomic/zzz_multiple_drivers_tests/test_multiple_driver_tests.py index fbb9bc0e50..6625ba3705 100644 --- a/test/appium/tests/atomic/zzz_multiple_drivers_tests/test_multiple_driver_tests.py +++ b/test/appium/tests/atomic/zzz_multiple_drivers_tests/test_multiple_driver_tests.py @@ -14,56 +14,52 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): message_before_adding = 'message before adding new user' message_after_adding = 'message from new member' message_from_old_member_after_adding = 'message from old member' - self.create_drivers(3) - devices_home, devices_key, devices_username, devices_chat = {}, {}, {}, {} + homes, public_keys, usernames, chats = {}, {}, {}, {} for key in self.drivers: sign_in_view = SignInView(self.drivers[key]) - devices_home[key] = sign_in_view.create_user() - devices_key[key], devices_username[key] = sign_in_view.get_public_key_and_username(True) + homes[key] = sign_in_view.create_user() + public_keys[key], usernames[key] = sign_in_view.get_public_key_and_username(True) sign_in_view.home_button.click() - - chat_name = devices_home[0].get_random_chat_name() + chat_name = homes[0].get_random_chat_name() for i in range(1, 3): - devices_home[0].add_contact(devices_key[i]) - devices_home[0].get_back_to_home_view() - devices_chat[0] = devices_home[0].create_group_chat([devices_username[1]], chat_name) - devices_chat[0].send_message(message_before_adding) + homes[0].add_contact(public_keys[i]) + homes[0].get_back_to_home_view() + chats[0] = homes[0].create_group_chat([usernames[1]], chat_name) + chats[0].send_message(message_before_adding) - devices_home[1].just_fyi('Join to chat as chat member') - devices_chat[1] = devices_home[1].get_chat(chat_name).click() - devices_chat[1].join_chat_button.click() + homes[1].just_fyi('Join to chat as chat member') + chats[1] = homes[1].get_chat(chat_name).click() + chats[1].join_chat_button.click() - devices_home[2].just_fyi('Put not added member device to offline and check that invite will be fetched') - invite_system_message = devices_chat[0].invite_system_message(devices_username[0], devices_username[1]) - devices_home[2].toggle_airplane_mode() - devices_chat[0].add_members_to_group_chat([devices_username[2]]) - devices_home[2].toggle_airplane_mode() - devices_home[2].connection_offline_icon.wait_for_invisibility_of_element(60) + homes[2].just_fyi('Put not added member device to offline and check that invite will be fetched') + invite_system_message = chats[0].invite_system_message(usernames[0], usernames[1]) + homes[2].toggle_airplane_mode() + chats[0].add_members_to_group_chat([usernames[2]]) + homes[2].toggle_airplane_mode() + homes[2].connection_offline_icon.wait_for_invisibility_of_element(60) - if not devices_home[2].get_chat(chat_name).is_element_displayed(): + if not homes[2].get_chat(chat_name).is_element_displayed(): self.drivers[0].fail('Invite to group chat was not fetched from offline') - devices_chat[2] = devices_home[2].get_chat(chat_name).click() - if not devices_chat[2].element_by_text(invite_system_message).is_element_displayed(): + chats[2] = homes[2].get_chat(chat_name).click() + if not chats[2].element_by_text(invite_system_message).is_element_displayed(): self.errors.append('Message about adding first chat member is not shown for new added member') - if devices_chat[2].element_by_text(message_before_adding).is_element_displayed(): + if chats[2].element_by_text(message_before_adding).is_element_displayed(): self.errors.append('Message sent before adding user is shown') - devices_chat[0].just_fyi('Put admin device to offline and check that message from new member will be fetched') - devices_chat[0].toggle_airplane_mode() - devices_chat[2].join_chat_button.click() - devices_chat[2].send_message(message_after_adding) - devices_chat[0].toggle_airplane_mode() - for key in devices_chat: - if not devices_chat[key].chat_element_by_text(message_after_adding).is_element_displayed( - 40): + chats[0].just_fyi('Put admin device to offline and check that message from new member will be fetched') + chats[0].toggle_airplane_mode() + chats[2].join_chat_button.click() + chats[2].send_message(message_after_adding) + chats[0].toggle_airplane_mode() + for key in chats: + if not chats[key].chat_element_by_text(message_after_adding).is_element_displayed(40): self.errors.append("Message with text '%s' was not received" % message_after_adding) - devices_chat[0].just_fyi('Send message from old member and check that it is fetched') - devices_chat[1].send_message(message_from_old_member_after_adding) - for key in devices_chat: - if not devices_chat[key].chat_element_by_text(message_from_old_member_after_adding).is_element_displayed( - 20): + chats[0].just_fyi('Send message from old member and check that it is fetched') + chats[1].send_message(message_from_old_member_after_adding) + for key in chats: + if not chats[key].chat_element_by_text(message_from_old_member_after_adding).is_element_displayed(20): self.errors.append("Message with text '%s' was not received" % message_from_old_member_after_adding) self.errors.verify_no_errors() @@ -73,58 +69,64 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): @marks.medium def test_invite_to_group_chat_handling(self): self.create_drivers(3) - devices_sign_in, devices_home, devices_key, devices_username, devices_chat = {}, {}, {}, {}, {} + sign_ins, homes, public_keys, usernames, chats = {}, {}, {}, {}, {} for key in self.drivers: - devices_sign_in[key] = SignInView(self.drivers[key]) - devices_home[key] = devices_sign_in[key].create_user() - devices_key[key], devices_username[key] = devices_sign_in[key].get_public_key_and_username(True) - devices_sign_in[key].home_button.click() + sign_ins[key] = SignInView(self.drivers[key]) + homes[key] = sign_ins[key].create_user() + public_keys[key], usernames[key] = sign_ins[key].get_public_key_and_username(True) + sign_ins[key].home_button.click() [driver.close_app() for driver in (self.drivers[1], self.drivers[2])] - chat_name = devices_home[0].get_random_chat_name() - devices_home[0].just_fyi('Create group chats without members') - devices_chat[0] = devices_home[0].create_group_chat([], chat_name) - link = devices_chat[0].get_group_invite_via_group_info() - devices_chat[0].get_back_to_home_view() - devices_chat[0].just_fyi('Member_1, member_2: both users send requests to join group chat') - [sign_in.open_weblink_and_login(link) for sign_in in (devices_sign_in[1], devices_sign_in[2])] + chat_name = homes[0].get_random_chat_name() + + homes[0].just_fyi('Create group chats without members') + chats[0] = homes[0].create_group_chat([], chat_name) + link = chats[0].get_group_invite_via_group_info() + chats[0].get_back_to_home_view() + chats[0].just_fyi('Member_1, member_2: both users send requests to join group chat') + [sign_in.open_weblink_and_login(link) for sign_in in (sign_ins[1], sign_ins[2])] introduction_messages = ['message for retrying'] for i in range(1,3): - devices_home[i].element_by_text_part(chat_name).click() - devices_chat[i] = ChatView(self.drivers[i]) + homes[i].element_by_text_part(chat_name).click() + chats[i] = ChatView(self.drivers[i]) introduction_messages.append('Please add me, member_%s to your gorgeous group chat' % str(i)) - devices_chat[i].request_membership_for_group_chat(introduction_messages[i]) - devices_chat[0].just_fyi('Admin: accept request for Member_1 and decline for Member_2') - devices_home[0].get_chat(chat_name).click() - devices_chat[0].group_membership_request_button.wait_and_click() - devices_chat[0].element_by_text(devices_username[1]).click() - if not devices_chat[0].element_by_text_part(introduction_messages[1]).is_element_displayed(): + chats[i].request_membership_for_group_chat(introduction_messages[i]) + + chats[0].just_fyi('Admin: accept request for Member_1 and decline for Member_2') + homes[0].get_chat(chat_name).click() + chats[0].group_membership_request_button.wait_and_click() + chats[0].element_by_text(usernames[1]).click() + if not chats[0].element_by_text_part(introduction_messages[1]).is_element_displayed(): self.errors.append('Introduction message is not shown!') - devices_chat[0].accept_group_invitation_button.wait_and_click() - devices_chat[0].accept_membership_for_group_chat_via_chat_view(devices_username[2], accept=False) - devices_chat[0].click_system_back_button() - devices_chat[2].just_fyi('Member_2: retry request') - devices_chat[2].retry_group_invite_button.wait_and_click() - devices_chat[2].request_membership_for_group_chat(introduction_messages[0]) - devices_chat[2].just_fyi('Admin: decline request for Member_2') - devices_chat[0].group_membership_request_button.wait_and_click() - devices_chat[0].element_by_text(devices_username[2]).click() - if not devices_chat[0].element_by_text_part(introduction_messages[0]).is_element_displayed(): + chats[0].accept_group_invitation_button.wait_and_click() + chats[0].accept_membership_for_group_chat_via_chat_view(usernames[2], accept=False) + chats[0].click_system_back_button() + + chats[2].just_fyi('Member_2: retry request') + chats[2].retry_group_invite_button.wait_and_click() + chats[2].request_membership_for_group_chat(introduction_messages[0]) + + chats[2].just_fyi('Admin: decline request for Member_2') + chats[0].group_membership_request_button.wait_and_click() + chats[0].element_by_text(usernames[2]).click() + if not chats[0].element_by_text_part(introduction_messages[0]).is_element_displayed(): self.errors.append('Introduction message that was set after retrying attempt is not shown for admin!') - devices_chat[0].decline_group_invitation_button.wait_and_click() - devices_chat[0].click_system_back_button() - devices_chat[2].just_fyi('Member_2: remove chat') - devices_chat[2].remove_group_invite_button.wait_and_click() - devices_chat[2].just_fyi('Double check after relogin') - if devices_chat[0].group_membership_request_button.is_element_displayed(): + chats[0].decline_group_invitation_button.wait_and_click() + chats[0].click_system_back_button() + + chats[2].just_fyi('Member_2: remove chat') + chats[2].remove_group_invite_button.wait_and_click() + + chats[2].just_fyi('Double check after relogin') + if chats[0].group_membership_request_button.is_element_displayed(): self.errors.append('Group membership request is still shown when there are no pending requests anymore') - [devices_home[i].relogin() for i in range(0,3)] - if devices_home[2].element_by_text_part(chat_name).is_element_displayed(): + [homes[i].relogin() for i in range(0,3)] + if homes[2].element_by_text_part(chat_name).is_element_displayed(): self.errors.append('Group chat was not removed when removing after declining group invite') - [home.get_chat(chat_name).click() for home in (devices_home[0], devices_home[1])] - if devices_chat[0].group_membership_request_button.is_element_displayed(): + [home.get_chat(chat_name).click() for home in (homes[0], homes[1])] + if chats[0].group_membership_request_button.is_element_displayed(): self.errors.append('Group membership request is shown after relogin when there are no pending requests anymore') - join_system_message = devices_chat[0].join_system_message(devices_username[1]) - for chat in (devices_chat[1], devices_chat[0]): + join_system_message = chats[0].join_system_message(usernames[1]) + for chat in (chats[1], chats[0]): if not chat.chat_element_by_text(join_system_message).is_element_displayed(): self.errors.append('%s is not shown after joining to group chat via invite' % join_system_message) self.errors.verify_no_errors() @@ -133,39 +135,40 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): @marks.medium def test_remove_member_from_group_chat(self): self.create_drivers(3) - devices_home, devices_key, devices_username, devices_chat = {}, {}, {}, {} + homes, public_keys, usernames, chats = {}, {}, {}, {} for key in self.drivers: sign_in_view = SignInView(self.drivers[key]) - devices_home[key] = sign_in_view.create_user() - devices_key[key], devices_username[key] = sign_in_view.get_public_key_and_username(True) + homes[key] = sign_in_view.create_user() + public_keys[key], usernames[key] = sign_in_view.get_public_key_and_username(True) sign_in_view.home_button.click() - chat_name = devices_home[0].get_random_chat_name() + chat_name = homes[0].get_random_chat_name() for i in range(1,3): - devices_home[0].add_contact(devices_key[i]) - devices_home[0].get_back_to_home_view() - devices_chat[0] = devices_home[0].create_group_chat([devices_username[1], - devices_username[2]], chat_name) - devices_chat[0].just_fyi('Member_1, member_2: both users join to group chat') + homes[0].add_contact(public_keys[i]) + homes[0].get_back_to_home_view() + chats[0] = homes[0].create_group_chat([usernames[1], + usernames[2]], chat_name) + chats[0].just_fyi('Member_1, member_2: both users join to group chat') for i in range(1,3): - devices_chat[i] = devices_home[i].get_chat(chat_name).click() - devices_chat[i].join_chat_button.click() - devices_chat[0].just_fyi("Admin: get options for device 2 in group chat and remove him") - options = devices_chat[0].get_user_options(devices_username[1]) + chats[i] = homes[i].get_chat(chat_name).click() + chats[i].join_chat_button.click() + chats[0].just_fyi("Admin: get options for device 2 in group chat and remove him") + options = chats[0].get_user_options(usernames[1]) options.remove_user_button.click() - left_message = devices_chat[0].leave_system_message(devices_username[1]) - for key in devices_chat: - if not devices_chat[key].chat_element_by_text(left_message).is_element_displayed(): + left_message = chats[0].leave_system_message(usernames[1]) + for key in chats: + if not chats[key].chat_element_by_text(left_message).is_element_displayed(): self.errors.append("Message with text '%s' was not received" % left_message) - devices_chat[0].just_fyi("Check that input field is not available after removing") - if devices_chat[1].chat_message_input.is_element_displayed(): + + chats[0].just_fyi("Check that input field is not available after removing") + if chats[1].chat_message_input.is_element_displayed(): self.errors.append("Message input is still available for removed user") - devices_chat[0].just_fyi("Send message and check that it is available only for remaining users") + chats[0].just_fyi("Send message and check that it is available only for remaining users") message = 'after removing member' - devices_chat[0].send_message(message) - for chat in (devices_chat[0], devices_chat[2]): + chats[0].send_message(message) + for chat in (chats[0], chats[2]): if not chat.chat_element_by_text(message).is_element_displayed(): self.errors.append("Message '%s' was not received after removing member" % message) - if devices_chat[1].chat_element_by_text(message).is_element_displayed(): + if chats[1].chat_element_by_text(message).is_element_displayed(): self.errors.append("Message '%s' was received by removed member" % message) self.errors.verify_no_errors() @@ -174,79 +177,80 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): def test_pair_devices_group_chat_different_messages_nicknames(self): self.create_drivers(3) device_1, device_2, device_3 = SignInView(self.drivers[0]), SignInView(self.drivers[1]), SignInView(self.drivers[2]) - device_1_home = device_1.create_user() - device_1_profile = device_1_home.profile_button.click() - device_1_profile.privacy_and_security_button.click() - device_1_profile.backup_recovery_phrase_button.click() - device_1_profile.ok_continue_button.click() - recovery_phrase = device_1_profile.get_recovery_phrase() - device_1_profile.close_button.click() - device_1_profile.home_button.click() - device_3_home = device_3.create_user() - device_3_chat_key, device_3_username = device_3_home.get_public_key_and_username(return_username=True) + home_1 = device_1.create_user() + profile_1 = home_1.profile_button.click() + profile_1.privacy_and_security_button.click() + profile_1.backup_recovery_phrase_button.click() + profile_1.ok_continue_button.click() + recovery_phrase = profile_1.get_recovery_phrase() + profile_1.close_button.click() + profile_1.home_button.click() + home_3 = device_3.create_user() + public_key_3, username_3 = home_3.get_public_key_and_username(return_username=True) device_3.home_button.click() device_1_name, device_2_name, group_chat_name = 'creator', 'paired', 'some group chat' device_1.just_fyi('Add contact, start group chat') nickname = 'my_tester' - device_1_home.add_contact(device_3_chat_key,nickname=nickname) - device_1_home.get_back_to_home_view() - device_1_chat = device_1_home.create_group_chat([device_3_username], group_chat_name) - device_3_chat = device_3_home.get_chat(group_chat_name).click() - device_3_chat.join_chat_button.click() + home_1.add_contact(public_key_3,nickname=nickname) + home_1.get_back_to_home_view() + chat_1 = home_1.create_group_chat([username_3], group_chat_name) + chat_3 = home_3.get_chat(group_chat_name).click() + chat_3.join_chat_button.click() + device_2.just_fyi('Go to profile > Devices, set device name, discover device 2 to device 1') - device_2_home = device_2.recover_access(passphrase=' '.join(recovery_phrase.values())) - device_2_profile = device_2_home.profile_button.click() - device_2_profile.discover_and_advertise_device(device_2_name) + home_2 = device_2.recover_access(passphrase=' '.join(recovery_phrase.values())) + profile_2 = home_2.profile_button.click() + profile_2.discover_and_advertise_device(device_2_name) device_1.profile_button.click() - device_1_profile.discover_and_advertise_device(device_1_name) - device_1_profile.get_toggle_device_by_name(device_2_name).click() - device_1_profile.sync_all_button.click() - device_1_profile.sync_all_button.wait_for_visibility_of_element(15) - device_1_profile.click_system_back_button(2) + profile_1.discover_and_advertise_device(device_1_name) + profile_1.get_toggle_device_by_name(device_2_name).click() + profile_1.sync_all_button.click() + profile_1.sync_all_button.wait_for_visibility_of_element(15) + profile_1.click_system_back_button(2) + device_1.just_fyi('Send message to group chat and verify it on all devices') text_message = 'some text' - device_1_profile.home_button.click(desired_view='chat') - device_2_profile.home_button.click() - device_1_chat.send_message(text_message) - device_2_chat = device_2_home.get_chat(group_chat_name).click() - for chat in device_1_chat, device_2_chat, device_3_chat: + profile_1.home_button.click(desired_view='chat') + profile_2.home_button.click() + chat_1.send_message(text_message) + chat_2 = home_2.get_chat(group_chat_name).click() + for chat in chat_1, chat_2, chat_3: if not chat.chat_element_by_text(text_message).is_element_displayed(): self.errors.append('Message was sent, but it is not shown') + device_3.just_fyi('Send message to group chat as member and verify nickname on it') message_from_member = 'member1' - device_3_chat.send_message(message_from_member) - device_1_chat.chat_element_by_text(message_from_member).wait_for_visibility_of_element(20) - for chat in device_1_chat, device_2_chat: - if not chat.chat_element_by_text(message_from_member).username != '%s %s' % (nickname, device_3_username): + chat_3.send_message(message_from_member) + chat_1.chat_element_by_text(message_from_member).wait_for_visibility_of_element(20) + for chat in chat_1, chat_2: + if not chat.chat_element_by_text(message_from_member).username != '%s %s' % (nickname, username_3): self.errors.append('Nickname is not shown in group chat') + device_1.just_fyi('Send image to group chat and verify it on all devices') - device_1_chat.show_images_button.click() - device_1_chat.allow_button.click() - device_1_chat.first_image_from_gallery.click() - device_1_chat.send_message_button.click() - device_1_chat.chat_message_input.click() - for chat in device_1_chat, device_2_chat, device_3_chat: + chat_1.show_images_button.click() + chat_1.allow_button.click() + chat_1.first_image_from_gallery.click() + chat_1.send_message_button.click() + chat_1.chat_message_input.click() + for chat in chat_1, chat_2, chat_3: if not chat.image_message_in_chat.is_element_displayed(60): self.errors.append('Image is not shown in chat after sending for %s' % chat.driver.number) + device_1.just_fyi('Send audio message to group chat and verify it on all devices') - device_1_chat.record_audio_message(message_length_in_seconds=3) + chat_1.record_audio_message(message_length_in_seconds=3) device_1.send_message_button.click() - device_1_chat.chat_message_input.click() - for chat in device_1_chat, device_2_chat, device_3_chat: + chat_1.chat_message_input.click() + for chat in chat_1, chat_2, chat_3: if not chat.play_pause_audio_message_button.is_element_displayed(30): self.errors.append('Audio message is not shown in chat after sending!') + device_1.just_fyi('Send sticker to group chat and verify it on all devices') - device_1_chat.profile_button.click() - device_1_profile.switch_network() - device_1_home.get_chat(group_chat_name).click() - device_1_chat.show_stickers_button.click() - device_1_chat.get_stickers.click() - device_1_chat.install_sticker_pack_by_name('Status Cat') - device_1_chat.back_button.click() - time.sleep(2) - device_1_chat.swipe_left() - device_1_chat.sticker_icon.click() - if not device_1_chat.sticker_message.is_element_displayed(30): + chat_1.profile_button.click() + profile_1.switch_network() + home_1.get_chat(group_chat_name).click() + chat_1.install_sticker_pack_by_name() + chat_1.sticker_icon.click() + if not chat_1.sticker_message.is_element_displayed(30): self.errors.append('Sticker was not sent') self.errors.verify_no_errors() diff --git a/test/appium/tests/users.py b/test/appium/tests/users.py index f044a4a4e8..3e288ba821 100644 --- a/test/appium/tests/users.py +++ b/test/appium/tests/users.py @@ -11,8 +11,8 @@ ens_user['passphrase'] = "fashion quality know robust copy neck stand embody ent ens_user['username'] = "Legal Vibrant Indianabat" ens_user['public_key'] = "0x04359bb3e73cba0b815d71e562670ad00bb5d2db0d16cd1c4c92c668b61fde2274d6e487fcdffe66f913b3fea2a" \ "3058f53ce7946c2b501aa61a9ca8a883df72dc9" -ens_user['ens'] = 'statuse2e' -ens_user['ens_another_domain'] = 'statuse2e.eth' +ens_user['ens'] = 'statuse2e.eth' +ens_user['ens_another'] = 'status-another-ens-e2e.eth' ens_user['address'] = '0x1eE3058Bd300246B4B20E687Efc9Eba81FF7814b' ens_user_ropsten = dict() diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index eaa94daa80..41a0f98ae2 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -553,8 +553,8 @@ class BaseView(object): def share_via_messenger(self): self.driver.info("**Sharing via messenger**") self.element_by_text_part("Direct share").wait_for_element() - self.element_by_text('Messages').click() - self.element_by_text('New message').click() + self.element_by_text('Messages').wait_and_click() + self.element_by_text('New message').wait_and_click() self.send_as_keyevent('+0100100101') self.confirm() diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 19f08e2896..cf60bf5266 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -816,7 +816,6 @@ class ChatView(BaseView): def wait_ens_name_resolved_in_chat(self, message = str, username_value = str): self.driver.info("**Waiting ENS name '%s' is resolved in chat**" % username_value) - # self.view_profile_by_avatar_button.click() counter = 0 while True: if counter >= 120: @@ -826,19 +825,23 @@ class ChatView(BaseView): time.sleep(5) else: return - # self.profile_block_contact.wait_for_visibility_of_element(5) def move_to_messages_by_time_marker(self, marker='Today'): self.driver.info("**Moving to messages by time marker: '%s'**" % marker) Button(self.driver, xpath="//*[@text='%s'']" % marker).scroll_to_element(depth=50, direction='up') - def install_sticker_pack_by_name(self, pack_name: str): + def install_sticker_pack_by_name(self, pack_name='Status Cat'): self.driver.info("**Installing '%s' stickerpack**" % pack_name) + self.show_stickers_button.click() + self.get_stickers.click() element = Button(self.driver, xpath="//*[@content-desc='sticker-pack-name'][@text='%s']/..//*[@content-desc='sticker-pack-price']" % pack_name) element.scroll_to_element() element.click() element.wait_for_invisibility_of_element() + self.back_button.click() + time.sleep(2) + self.swipe_left() def scroll_to_start_of_history(self, depth=20): self.driver.info('*Scrolling th the start of chat history*') diff --git a/test/appium/views/elements_templates/mentioned.png b/test/appium/views/elements_templates/mentioned.png index 90416c37c5de9b97f9ab8cba662fd41a493e3c15..67f613a7dbeb994a1499f7351ef5737df33068cb 100644 GIT binary patch literal 4761 zcmai&Wmr^Sw8jSnX=wy$X;4y9N}8d&6bTu+K~gD$AqEGj0R{zxp}V_t0Fmw(Vdxqe zK*Br!=eghRhx=ilXMfo1oW1t*Tkm=I0vqaUQjk6(1pojP+FEMH0015fZvKS$KJM9g zMRWxK(Aa6Ky)X^VK7@z(FweakR06z+VwIlY>dl#^E`%=`E%9@qh++C``#UR z{R5ET6DUV_zp>GTJ4@N#l-ahU*8<`(gom|$xxZ@QsS zr~qTl`q0o29l4dyn>TMrKRuBV7Z)c~WnjTAiRL7OBqZo|e<9S=&?vMUivBNN^nb%j z+z%rYkfGrbLmFx+MN?WuBBK6mUKWa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nGL*$ z0v+|pi=WTrGhubVz64M$&H6$Pv!An6RoTCiW)yaD?5~UEffk9eo-PA|tfF2f`M40! zKzdrmzU+3iU(5~O1r)|{EZM<406&@IO?p`dE>^%Mt_J6*@`ge{3iYo-%=&o|j^7JLZyY2t?S^P?R!N$wM`lc?wIJ2s6f zSoun1Jmsyp>w4N0W82qhua)&PHI}Z z&UYeOnmUxoGh3cF>=YEk_jmw|OY4kiFQYjD?=w62lEz03(ITb7*RgBafpH#C`d14& zl(DF-9#uTZ1Qi`}I=bw^%(JtZ?}}JYKpf=%Jt_~MnbrUio^IJ&@}Ge;S2OtOmmG?U3JrDiG~QfPwWdu^Eydj2`hLd+mJB_d zc{naAIbid!R<6VgRBN5L{}<6lM5$*;uy5^i%94KlCtq5!k>P{A#MXmOR<6%07S`C| zSJ0MX55u)0Q>wjx<7fr{@dAE4?xk+F>bGJ2xTVQMYwD!cd;3)L15V|DK&lAlK$DpY z6%5Xeyz}-uA3|XVCCLlV2Y{@?{-s}fTWC`rK|#7H6d&ly6Ej^U^=)#gmzRC9Aq^H* zlwR2;^~Z4sXSG2~+7sfD-+$)zxiJcd*`z*3v9xR!2as-HU}}wB$AiV%@C`aRTqm) zf3rE`0gIt|{5Y~Giq)VxR>7}V_J`hP$q<)fIc|@s42Q+~;WyZ}(vn2~$H??Q0}-I? zm(m*gqsZaP13bF)#s!-|ZKZo?o9~A*PiVS1cib z^BqM&DT9`jIv-T0erkt54u`a+1r$4Ucjt|%8s>z-9m%)C124+%aTWgaJ*6@}!$K{8 zVCN8q(^F(UOT(ZDcHq|3Ceq#%&f{hN_P)AP8I?QnAVf8Bz)rAjLRJ4i<}7a8+OpEr mCeJ^g_Uy&~Y~1$W;f>ZQZL(`vj$vJDfTEn5Y?<`iFaHPVMwQh7 diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index 56d22f3b86..0c0fe85793 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -452,15 +452,18 @@ class ProfileView(BaseView): if i == 5: self.driver.fail("Failed to connect after %s attempts" % i) - def connect_existing_status_ens(self, name): + def connect_existing_ens(self, name, is_stateofus=False): self.driver.info("**Connect existing ENS: %s**" % name) - profile = self.profile_button.click() - profile.switch_network('Mainnet with upstream RPC') - self.profile_button.click() dapp_view = self.ens_usernames_button.click() dapp_view.element_by_translation_id("get-started").click() + if not is_stateofus: + dapp_view.element_by_translation_id("ens-want-custom-domain").click() dapp_view.ens_name_input.set_value(name) - dapp_view.check_ens_name.click_until_presence_of_element(self.element_by_translation_id("ens-got-it")) + expected_text = dapp_view.get_translation_by_key("ens-username-connected") + if not dapp_view.element_by_text_part(expected_text).is_element_displayed(): + dapp_view.click_system_back_button() + dapp_view.element_by_text_part(expected_text).wait_for_element(30) + dapp_view.check_ens_name.click_until_presence_of_element(dapp_view.element_by_translation_id("ens-got-it")) dapp_view.element_by_translation_id("ens-got-it").click() return dapp_view diff --git a/test/appium/views/send_transaction_view.py b/test/appium/views/send_transaction_view.py index 0f3c8c40ef..695a6ee228 100644 --- a/test/appium/views/send_transaction_view.py +++ b/test/appium/views/send_transaction_view.py @@ -124,13 +124,10 @@ class SendTransactionView(BaseView): self.enter_recipient_address_input.click() self.done_button.click_until_absense_of_element(self.done_button) - def sign_transaction(self, sender_password: str = common_password, keycard=False, default_gas_price=True): - self.driver.info("**Signing transaction (keycard:%s, default gas price:%s)**" % (str(keycard), str(default_gas_price))) + def sign_transaction(self, sender_password: str = common_password, keycard=False): + self.driver.info("**Signing transaction (keycard:%s)**" % str(keycard)) if self.sign_in_phrase.is_element_displayed(30): self.set_up_wallet_when_sending_tx() - if not default_gas_price: - self.network_fee_button.click() - # to be updated with new fast/slow/normal fee if keycard: keycard_view = self.sign_with_keycard_button.click() keycard_view.enter_default_pin()