e2e: fix failures

This commit is contained in:
Churikova Tetiana 2022-06-03 10:38:43 +02:00
parent f402f67b09
commit b18547c16e
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
5 changed files with 18 additions and 20 deletions

View File

@ -705,6 +705,7 @@ class TestContactBlockMigrateKeycardMultipleSharedDevices(MultipleSharedDeviceTe
wallet_1 = self.chat_1.wallet_button.click() wallet_1 = self.chat_1.wallet_button.click()
wallet_1.find_transaction_in_history(amount=amount) wallet_1.find_transaction_in_history(amount=amount)
self.home_2.put_app_to_background_and_back()
self.network_api.wait_for_confirmation_of_transaction(self.sender['address'], amount, confirmations=3) self.network_api.wait_for_confirmation_of_transaction(self.sender['address'], amount, confirmations=3)
wallet_1.home_button.click(desired_view='chat') wallet_1.home_button.click(desired_view='chat')
@ -1110,7 +1111,7 @@ class TestEnsStickersMultipleDevicesMerged(MultipleSharedDeviceTestCase):
else: else:
self.errors.append('No PN on mention in public chat! ') self.errors.append('No PN on mention in public chat! ')
self.home_2.click_system_back_button(2) self.home_2.click_system_back_button(2)
if self.home_2.element_starts_with_text(self.reciever['ens']).is_element_differs_from_template('ment_new.png'): if self.home_2.element_starts_with_text(self.reciever['ens']).is_element_differs_from_template('ment_new.png', 2):
self.errors.append('Mention is not highlighted!') self.errors.append('Mention is not highlighted!')
self.errors.verify_no_errors() self.errors.verify_no_errors()
@ -1118,17 +1119,17 @@ class TestEnsStickersMultipleDevicesMerged(MultipleSharedDeviceTestCase):
def test_sticker_1_1_public_chat(self): def test_sticker_1_1_public_chat(self):
self.home_2.status_in_background_button.click_if_shown() self.home_2.status_in_background_button.click_if_shown()
[home.home_button.double_click() for home in (self.home_1, self.home_2)] [home.home_button.double_click() for home in (self.home_1, self.home_2)]
(profile_1, profile_2) = (home.profile_button.click() for home in (self.home_1, self.home_2)) profile_2 = self.home_2.profile_button.click()
[profile.switch_network() for profile in (profile_1, profile_2)] profile_2.switch_network()
self.home_2.just_fyi('Check that can use purchased stickerpack') self.home_2.just_fyi('Check that can use purchased stickerpack on Mainnet')
self.home_2.get_chat('#%s' % self.pub_chat_name).click() self.home_2.get_chat('#%s' % self.pub_chat_name).click()
self.chat_2.install_sticker_pack_by_name('Tozemoon') self.chat_2.install_sticker_pack_by_name('Tozemoon')
self.chat_2.sticker_icon.click() self.chat_2.sticker_icon.click()
if not self.chat_2.chat_item.is_element_displayed(): if not self.chat_2.chat_item.is_element_displayed():
self.errors.append('Cannot use purchased stickers') self.errors.append('Cannot use purchased stickers')
self.home_1.just_fyi('Install free sticker pack and use it in 1-1 chat') self.home_1.just_fyi('Install free sticker pack and use it in 1-1 chat on Ropsten')
self.home_1.get_chat(self.ens).click() self.home_1.get_chat(self.ens).click()
self.chat_1.install_sticker_pack_by_name('Status Cat') self.chat_1.install_sticker_pack_by_name('Status Cat')
self.chat_1.sticker_icon.click() self.chat_1.sticker_icon.click()
@ -1150,9 +1151,7 @@ class TestEnsStickersMultipleDevicesMerged(MultipleSharedDeviceTestCase):
self.home_2.home_button.double_click() self.home_2.home_button.double_click()
self.home_2.get_chat(self.sender['username']).click() self.home_2.get_chat(self.sender['username']).click()
self.chat_2.chat_item.click() self.chat_2.chat_item.click()
if not self.chat_2.element_by_text_part('Status Cat').is_element_displayed(): self.chat_2.element_by_text_part('Free').wait_and_click(40)
self.errors.append('Stickerpack is not available for installation after tapping on sticker message')
self.chat_2.element_by_text_part('Free').click()
if self.chat_2.element_by_text_part('Free').is_element_displayed(): if self.chat_2.element_by_text_part('Free').is_element_displayed():
self.errors.append('Stickerpack was not installed') self.errors.append('Stickerpack was not installed')

View File

@ -143,14 +143,12 @@ class TestGroupChatMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.homes[0].just_fyi("Put admin device to online and check that messages and PNs will be fetched") self.homes[0].just_fyi("Put admin device to online and check that messages and PNs will be fetched")
self.homes[0].toggle_airplane_mode() self.homes[0].toggle_airplane_mode()
self.homes[0].connection_offline_icon.wait_for_invisibility_of_element(60) self.homes[0].connection_offline_icon.wait_for_invisibility_of_element(60)
unread_group = self.homes[0].get_chat(chat_name)
unread_group.new_messages_counter.wait_for_element_text('2', 60)
self.homes[0].open_notification_bar() self.homes[0].open_notification_bar()
for message in (message_1, message_2): for message in (message_1, message_2):
if not self.homes[0].get_pn(message): if not self.homes[0].element_by_text(message).is_element_displayed(30):
self.errors.append('%s PN was not fetched from offline' % message) self.errors.append('%s PN was not fetched from offline' % message)
self.homes[0].click_system_back_button() self.homes[0].click_system_back_button()
unread_group.click() self.homes[0].get_chat(chat_name).click()
self.homes[0].just_fyi("check that messages are shown for every member") self.homes[0].just_fyi("check that messages are shown for every member")
for i in range(3): for i in range(3):

View File

@ -95,8 +95,8 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
self.home.just_fyi('Opening url containing ipns name') self.home.just_fyi('Opening url containing ipns name')
dapp = self.home.dapp_tab_button.click() dapp = self.home.dapp_tab_button.click()
web_page = dapp.open_url(ipns_url) web_page = dapp.open_url(ipns_url)
if not dapp.allow_button.is_element_displayed(30): if not dapp.allow_button.is_element_displayed(60):
self.driver.fail('No permission is asked for dapp, so IPNS name is not resolved') self.home.driver.fail('No permission is asked for dapp, so IPNS name is not resolved')
dapp.allow_button.click() dapp.allow_button.click()
# Switching back to ropsten # Switching back to ropsten
@ -129,7 +129,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
browsing.allow_button.click() browsing.allow_button.click()
browsing.options_button.click() browsing.options_button.click()
if not browsing.connected_account_button.is_element_displayed(): if not browsing.connected_account_button.is_element_displayed():
self.driver.fail("Account is not connected") self.home.driver.fail("Account is not connected")
browsing.click_system_back_button() browsing.click_system_back_button()
profile = browsing.profile_button.click() profile = browsing.profile_button.click()
profile.privacy_and_security_button.click() profile.privacy_and_security_button.click()
@ -161,7 +161,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
browsing.open_chat_from_dapp_button.click() browsing.open_chat_from_dapp_button.click()
public_chat = browsing.get_chat_view() public_chat = browsing.get_chat_view()
if not public_chat.element_by_text('#wikipedia-org').is_element_displayed(): if not public_chat.element_by_text('#wikipedia-org').is_element_displayed():
self.driver.fail("No redirect to public chat") self.home.driver.fail("No redirect to public chat")
message = public_chat.get_random_message() message = public_chat.get_random_message()
public_chat.send_message(message) public_chat.send_message(message)
public_chat.dapp_tab_button.click(desired_element_text=self.wiki_texts[0]) public_chat.dapp_tab_button.click(desired_element_text=self.wiki_texts[0])
@ -212,7 +212,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
self.home.profile_button.click() self.home.profile_button.click()
profile.contacts_button.click() profile.contacts_button.click()
if not profile.add_new_contact_button.is_element_displayed(): if not profile.add_new_contact_button.is_element_displayed():
self.driver.fail('No expected element on contacts view') self.home.driver.fail('No expected element on contacts view')
users = { users = {
'scanning_ens_with_stateofus_domain_deep_link': { 'scanning_ens_with_stateofus_domain_deep_link': {
@ -280,8 +280,8 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702166) @marks.testrail_id(702166)
def test_profile_add_custom_network(self): def test_profile_add_custom_network(self):
profile = self.home.profile_button.click()
self.home.get_back_to_home_view() self.home.get_back_to_home_view()
profile = self.home.profile_button.click()
profile.add_custom_network() profile.add_custom_network()
self.sign_in.sign_in() self.sign_in.sign_in()
self.home.profile_button.click() self.home.profile_button.click()

View File

@ -696,7 +696,7 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
@pytest.mark.xdist_group(name="one_3") @pytest.mark.xdist_group(name="one_3")
@marks.medium @marks.medium
class TestGroupChatMultipleDevice(MultipleSharedDeviceTestCase): class TestGroupChatMultipleDeviceMediumMerged(MultipleSharedDeviceTestCase):
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
cls.drivers, cls.loop = create_shared_drivers(3) cls.drivers, cls.loop = create_shared_drivers(3)
@ -712,10 +712,10 @@ class TestGroupChatMultipleDevice(MultipleSharedDeviceTestCase):
for member in (cls.public_keys[1], cls.public_keys[2]): for member in (cls.public_keys[1], cls.public_keys[2]):
cls.homes[0].add_contact(member) cls.homes[0].add_contact(member)
cls.homes[0].home_button.click() cls.homes[0].home_button.click()
[SignInView(cls.drivers[i]).put_app_to_background_and_back() for i in range(1, 3)]
cls.chat_name = cls.homes[0].get_random_chat_name() cls.chat_name = cls.homes[0].get_random_chat_name()
cls.invite_chat_name = '%s_invite' % cls.homes[0].get_random_chat_name() cls.invite_chat_name = '%s_invite' % cls.homes[0].get_random_chat_name()
cls.chats[0] = cls.homes[0].create_group_chat([], cls.invite_chat_name) cls.chats[0] = cls.homes[0].create_group_chat([], cls.invite_chat_name)
[SignInView(cls.drivers[i]).put_app_to_background_and_back() for i in range(1, 3)]
cls.link = cls.chats[0].get_group_invite_via_group_info() cls.link = cls.chats[0].get_group_invite_via_group_info()
cls.chats[0].home_button.double_click() cls.chats[0].home_button.double_click()

View File

@ -36,6 +36,7 @@ class TestPairingSyncMediumMultipleDevicesMerged(MultipleSharedDeviceTestCase):
cls.channel_before_1 = cls.comm_before_1.add_channel(cls.channel) cls.channel_before_1 = cls.comm_before_1.add_channel(cls.channel)
cls.channel_before_1.send_message(cls.message) cls.channel_before_1.send_message(cls.message)
cls.home_1.home_button.double_click() cls.home_1.home_button.double_click()
cls.device_3.put_app_to_background_and_back()
cls.device_1.just_fyi('Edit profile picture') cls.device_1.just_fyi('Edit profile picture')
cls.home_1.profile_button.double_click() cls.home_1.profile_button.double_click()