e2e: nightly navigation fixes

This commit is contained in:
Churikova Tetiana 2022-04-01 17:16:13 +02:00
parent 346574a494
commit 784cb491ab
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
6 changed files with 28 additions and 22 deletions

View File

@ -690,7 +690,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
sign_in_1.sign_in_button.click()
profile_1.just_fyi('Remove user from contact and check there is no profile image displayed')
group_chat_2.profile_button.click()
group_chat_2.profile_button.double_click()
profile_2.contacts_button.click()
profile_2.element_by_text(default_username_1).click()
one_to_one_chat_2.remove_from_contacts.click()
@ -698,12 +698,12 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
group_chat_1 = home_1.get_chat('new_group_chat').click()
group_chat_1.send_message(group_chat_message)
one_to_one_chat_2.close_button.click()
one_to_one_chat_2.home_button.click(desired_view='home')
one_to_one_chat_2.home_button.double_click()
if home_2.get_chat(default_username_1).chat_image.is_element_image_similar_to_template(logo_default):
self.errors.append('User profile picture is not default to default after user removed from Contacts')
profile_2.just_fyi('Enable to see profile image from "Everyone" setting')
home_2.profile_button.click()
home_2.profile_button.double_click()
profile_2.privacy_and_security_button.click()
profile_2.show_profile_pictures_of.scroll_and_click()
profile_2.element_by_translation_id("everyone").click()
@ -1162,7 +1162,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
group_chat_1 = home_1.create_group_chat([basic_user['username']], group_chat_name)
group_chat_1.home_button.click()
# Editing profile picture
home_1.profile_button.click()
home_1.profile_button.double_click()
profile_1.edit_profile_picture('sauce_logo.png')
device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1')
@ -1175,7 +1175,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
profile_1.get_toggle_device_by_name(name_2).wait_and_click()
profile_1.sync_all_button.click()
profile_1.sync_all_button.wait_for_visibility_of_element(15)
[device.profile_button.click() for device in (profile_1, profile_2)]
[device.profile_button.double_click() for device in (profile_1, profile_2)]
device_2.just_fyi('check that created/joined community and profile details are updated')
home_2 = profile_2.home_button.click()

View File

@ -485,7 +485,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
self.errors.append('"Add to contacts" button is shown in 1-1 after adding user to contacts from profile')
device_1.just_fyi('Remove user from contacts')
chat_1.profile_button.click()
chat_1.profile_button.double_click()
userprofile = profile_1.open_contact_from_profile(nickname)
userprofile.remove_from_contacts.click()
if userprofile.remove_from_contacts.is_element_displayed():

View File

@ -25,6 +25,7 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
cls.wallet_1, cls.wallet_2 = cls.home_1.wallet_button.click(), cls.home_2.wallet_button.click()
[wallet.home_button.click() for wallet in (cls.wallet_1, cls.wallet_2)]
cls.chat_1 = cls.home_1.add_contact(cls.recipient_public_key)
cls.chat_1.send_message("hello!")
cls.account_name_1 = cls.wallet_1.status_account_name
@marks.testrail_id(6253)
@ -77,11 +78,16 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
self.wallet_1.find_transaction_in_history(amount=amount)
[wallet.put_app_to_background() for wallet in (self.wallet_1, self.wallet_2)]
self.network_api.wait_for_confirmation_of_transaction(self.sender['address'], amount)
self.device_1.open_notification_bar()
self.device_1.element_by_text_part('You sent %s ETH' % amount).click()
self.network_api.wait_for_confirmation_of_transaction(self.sender['address'], amount)
pn = self.home_1.get_pn('You sent %s ETH' % amount)
if pn:
pn.click()
if not self.wallet_1.transaction_history_button.is_element_displayed():
self.errors.append('Was not redirected to transaction history after tapping on PN')
else:
self.home_1.click_system_back_button()
self.home_1.status_in_background_button.click_if_shown()
self.wallet_1.home_button.click(desired_view="chat")
self.home_1.just_fyi("Check 'Confirmed' state for sender and receiver(use pull-to-refresh to update history)")
@ -99,7 +105,7 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(6265)
def test_1_1_chat_command_decline_eth_push_changing_state(self):
[chat.status_in_background_button.click_if_shown() for chat in (self.home_1, self.home_2)]
[home.driver.background_app(3) for home in (self.home_1, self.home_2)]
self.home_1.home_button.double_click()
self.home_1.get_chat(username=self.recipient_username).click()
@ -141,9 +147,7 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(6263)
@marks.transaction
def test_1_1_chat_command_request_and_receive_stt_in_1_1_chat_offline(self):
for home in self.home_1, self.home_2:
home.status_in_background_button.click_if_shown()
[home.driver.background_app(2) for home in (self.home_1, self.home_2)]
asset_name = 'STT'
amount = self.device_1.get_unique_amount()
@ -152,11 +156,9 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
self.home_2.wallet_button.click()
self.wallet_2.select_asset(asset_name)
self.wallet_2.home_button.click()
self.home_1.wallet_button.click()
self.home_1.wallet_button.double_click()
initial_amount_stt = self.wallet_1.get_asset_amount_by_name('STT')
self.wallet_1.home_button.click()
profile_1 = self.home_1.profile_button.click()
profile_1.logout()
self.home_1.driver.close_app()
self.home_2.just_fyi('Request %s STT in 1-1 chat and check it is visible for sender and receiver' % amount)
chat_2 = self.home_2.get_chat(username=self.sender['username']).click()
@ -173,6 +175,7 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
self.drivers[1].fail('No incoming transaction in 1-1 chat is shown for recipient after requesting STT')
self.home_1.just_fyi('Check that transaction message is fetched from offline and sign transaction')
self.device_1.driver.launch_app()
self.device_1.sign_in()
self.home_1.connection_offline_icon.wait_for_invisibility_of_element(30)
self.home_1.get_chat(self.recipient_username).click()
@ -297,3 +300,4 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
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)

View File

@ -160,7 +160,7 @@ class TestPublicChatMultipleDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(700737)
def test_public_chat_links_with_previews_github_youtube_twitter_gif_send_enable(self):
[chat.get_back_to_home_view() for chat in (self.chat_1, self.chat_2)]
[chat.home_button.double_click() for chat in (self.chat_1, self.chat_2)]
[home.get_chat('#' + self.public_chat_name).click() for home in (self.home_1, self.home_2)]
giphy_url = 'https://giphy.com/gifs/this-is-fine-QMHoU66sBXqqLqYvGO'
preview_urls = {'github_pr': {'url': 'https://github.com/status-im/status-react/pull/11707',

View File

@ -1,3 +1,5 @@
import time
import pytest
from support.utilities import get_merged_txs_list
from tests import marks, pin, puk, pair_code

View File

@ -313,7 +313,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.append('"%s" is not found in Contacts after adding when devices are paired' % name)
device_1.just_fyi('Contacts (main device): set nickname, (secondary device): check that synced')
home_1.profile_button.click()
home_1.profile_button.double_click()
profile_1.contacts_button.scroll_to_element(9, 'up')
profile_1.open_contact_from_profile(transaction_senders['A']['username'])
nickname_after_sync = 'my_transaction sender'
@ -348,7 +348,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
'"%s" public chat is not synced after adding when devices are paired' % public_chat_after_sync)
home_1.just_fyi('Contacts (main device): remove and block contact')
home_1.profile_button.click()
home_1.profile_button.double_click()
profile_1.contacts_button.scroll_to_element(9, 'up')
profile_1.open_contact_from_profile(nickname)
chat_1.block_contact()
@ -364,7 +364,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
device_1.just_fyi('Chats (main device):delete added public chat, (secondary device): check that synced')
for profile in (profile_1, profile_2):
profile.get_back_to_home_view()
profile.home_button.click()
profile.home_button.double_click()
home_1.delete_chat_long_press('#%s' % public_chat_after_sync)
home_2.element_by_text('#%s' % public_chat_after_sync).wait_for_invisibility_of_element(60)