e2e: nav fixes

This commit is contained in:
Churikova Tetiana 2022-05-30 13:49:30 +02:00
parent a4b169efa3
commit bc91512b71
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
13 changed files with 37 additions and 46 deletions

View File

@ -1120,7 +1120,6 @@ class TestEnsStickersMultipleDevicesMerged(MultipleSharedDeviceTestCase):
[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_1, profile_2) = (home.profile_button.click() for home in (self.home_1, self.home_2))
[profile.switch_network() for profile in (profile_1, profile_2)] [profile.switch_network() for profile in (profile_1, profile_2)]
# TODO: no check there is no stickers on ropsten due to transfer stickers to status-go
self.home_2.just_fyi('Check that can use purchased stickerpack') self.home_2.just_fyi('Check that can use purchased stickerpack')
self.home_2.get_chat('#%s' % self.pub_chat_name).click() self.home_2.get_chat('#%s' % self.pub_chat_name).click()

View File

@ -143,14 +143,13 @@ 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].get_pn(message):
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 = self.homes[0].get_chat(chat_name)
if not unread_group.new_messages_counter.text == '2':
self.errors.append('%s does not match unread messages' % unread_group.new_messages_counter.text)
unread_group.click() unread_group.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")

View File

@ -126,7 +126,7 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
self.home.just_fyi( self.home.just_fyi(
"Try to restore same account from seed phrase (should be possible only to unlock existing account)") "Try to restore same account from seed phrase (should be possible only to unlock existing account)")
self.profile.logout() self.profile.logout()
self.sign_in.back_button.click() self.sign_in.navigate_up_button.click()
self.sign_in.access_key_button.click() self.sign_in.access_key_button.click()
self.sign_in.enter_seed_phrase_button.click() self.sign_in.enter_seed_phrase_button.click()
self.sign_in.seedphrase_input.click() self.sign_in.seedphrase_input.click()
@ -143,7 +143,7 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(700746) @marks.testrail_id(700746)
def test_onboarding_cant_sign_in_with_invalid_password_logcat(self): def test_onboarding_cant_sign_in_with_invalid_password_logcat(self):
self.home.profile_button.click() self.home.profile_button.double_click()
self.profile.logout() self.profile.logout()
self.sign_in.just_fyi('Check that cannot login with incorrect password, and can login with valid data') self.sign_in.just_fyi('Check that cannot login with incorrect password, and can login with valid data')
@ -166,13 +166,13 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(700747) @marks.testrail_id(700747)
def test_onboarding_add_new_multiaccount_username_by_position_pass_validation(self): def test_onboarding_add_new_multiaccount_username_by_position_pass_validation(self):
self.home.profile_button.click() self.home.profile_button.double_click()
self.profile.logout() self.profile.logout()
self.sign_in.just_fyi('Create another multiaccount') self.sign_in.just_fyi('Create another multiaccount')
if self.sign_in.ok_button.is_element_displayed(): if self.sign_in.ok_button.is_element_displayed():
self.sign_in.ok_button.click() self.sign_in.ok_button.click()
self.sign_in.back_button.click() self.sign_in.navigate_up_button.click()
self.sign_in.your_keys_more_icon.click() self.sign_in.your_keys_more_icon.click()
self.sign_in.generate_new_key_button.click() self.sign_in.generate_new_key_button.click()
from views.sign_in_view import MultiAccountButton from views.sign_in_view import MultiAccountButton
@ -331,7 +331,7 @@ class TestRestoreOneDeviceMerged(MultipleSharedDeviceTestCase):
self.home.driver.launch_app() self.home.driver.launch_app()
if self.sign_in.ok_button.is_element_displayed(): if self.sign_in.ok_button.is_element_displayed():
self.sign_in.ok_button.click() self.sign_in.ok_button.click()
self.sign_in.back_button.click() self.sign_in.navigate_up_button.click()
self.sign_in.access_key_button.click() self.sign_in.access_key_button.click()
self.sign_in.element_by_translation_id("recover-with-seed-phrase").click() self.sign_in.element_by_translation_id("recover-with-seed-phrase").click()
@ -393,7 +393,7 @@ class TestRestoreOneDeviceMerged(MultipleSharedDeviceTestCase):
self.home.just_fyi("Checking keycard banner and starting migrate multiaccount to keycard: no db saved") self.home.just_fyi("Checking keycard banner and starting migrate multiaccount to keycard: no db saved")
self.sign_in.close_button.click() self.sign_in.close_button.click()
self.sign_in.back_button.click() self.sign_in.navigate_up_button.click()
self.sign_in.multi_account_on_login_button.wait_for_visibility_of_element(30) self.sign_in.multi_account_on_login_button.wait_for_visibility_of_element(30)
self.sign_in.get_multiaccount_by_position(1).click() self.sign_in.get_multiaccount_by_position(1).click()
if not self.sign_in.get_keycard_banner.is_element_displayed(): if not self.sign_in.get_keycard_banner.is_element_displayed():

View File

@ -135,10 +135,11 @@ class TestPairingSyncMultipleDevicesMerged(MultipleSharedDeviceTestCase):
cls.profile_1, cls.profile_2 = cls.home_1.profile_button.click(), cls.home_2.profile_button.click() cls.profile_1, cls.profile_2 = cls.home_1.profile_button.click(), cls.home_2.profile_button.click()
cls.device_2.just_fyi('Nicknames (main device): set nickname for contact') cls.device_2.just_fyi('Nicknames (main device): set nickname for contact')
cls.profile_1.profile_button.click()
cls.profile_1.open_contact_from_profile(cls.contact_before_sync['username']) cls.profile_1.open_contact_from_profile(cls.contact_before_sync['username'])
cls.nickname = 'my_basic_user' cls.nickname = 'my_basic_user'
cls.chat_1.set_nickname(cls.nickname) cls.chat_1.set_nickname(cls.nickname)
cls.device_1.back_button.click() cls.device_1.get_back_to_home_view()
cls.device_2.just_fyi('Pair main and secondary devices') cls.device_2.just_fyi('Pair main and secondary devices')
cls.profile_2.discover_and_advertise_device(cls.name_2) cls.profile_2.discover_and_advertise_device(cls.name_2)

View File

@ -498,7 +498,7 @@ class TestPublicChatBrowserOneDeviceMerged(MultipleSharedDeviceTestCase):
profile.just_fyi('revoke access and check that they are asked second time') profile.just_fyi('revoke access and check that they are asked second time')
profile.revoke_access_button.click() profile.revoke_access_button.click()
profile.back_button.click() profile.get_back_to_home_view()
profile.dapp_tab_button.click() profile.dapp_tab_button.click()
web_view.open_tabs_button.click() web_view.open_tabs_button.click()
web_view.empty_tab_button.click() web_view.empty_tab_button.click()

View File

@ -76,6 +76,7 @@ class TestWalletManagementDeviceMerged(MultipleSharedDeviceTestCase):
public_chat.chat_message_input.paste_text_from_clipboard() public_chat.chat_message_input.paste_text_from_clipboard()
if public_chat.chat_message_input.text != transaction_hash: if public_chat.chat_message_input.text != transaction_hash:
self.errors.append('Transaction hash was not copied') self.errors.append('Transaction hash was not copied')
public_chat.back_button.click()
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(700759) @marks.testrail_id(700759)

View File

@ -174,7 +174,6 @@ class TestActivityCenterMultipleDeviceMedium(MultipleSharedDeviceTestCase):
self.home_1.just_fyi("Device1 checks unread indicator on Activity center bell") self.home_1.just_fyi("Device1 checks unread indicator on Activity center bell")
if not self.home_1.notifications_unread_badge.is_element_displayed(): if not self.home_1.notifications_unread_badge.is_element_displayed():
self.errors.append("Unread badge is NOT shown after receiving mentions from Group") self.errors.append("Unread badge is NOT shown after receiving mentions from Group")
self.home_1.notifications_unread_badge.wait_for_element(30)
self.home_1.notifications_unread_badge.click_until_absense_of_element(self.home_1.plus_button) self.home_1.notifications_unread_badge.click_until_absense_of_element(self.home_1.plus_button)
self.home_1.just_fyi("Check that notification from group is presented in Activity Center") self.home_1.just_fyi("Check that notification from group is presented in Activity Center")

View File

@ -207,9 +207,9 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702160) @marks.testrail_id(702160)
def test_profile_add_remove_contact_via_contacts_view(self): def test_profile_add_remove_contact_via_contacts_view(self):
self.home.just_fyi('Check empty contacts view') self.home.just_fyi('Check empty contacts view')
profile = self.home.profile_button.click() profile = 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.driver.fail('No expected element on contacts view')
@ -280,9 +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):
self.home.get_back_to_home_view()
profile = self.home.profile_button.click() profile = self.home.profile_button.click()
self.home.get_back_to_home_view()
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()
@ -298,7 +297,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702164) @marks.testrail_id(702164)
def test_profile_backup_of_contacts(self): def test_profile_backup_of_contacts(self):
self.home.get_back_to_home_view()
self.home.just_fyi('Add user to contacts') self.home.just_fyi('Add user to contacts')
chat = self.home.add_contact(basic_user['public_key']) chat = self.home.add_contact(basic_user['public_key'])
@ -334,7 +333,7 @@ class TestBrowserProfileOneDevice(MultipleSharedDeviceTestCase):
profile.perform_backup_button.click() profile.perform_backup_button.click()
profile.just_fyi('Backup seed phrase') profile.just_fyi('Backup seed phrase')
profile.back_button.click(2) profile.get_back_to_home_view()
profile.privacy_and_security_button.click() profile.privacy_and_security_button.click()
profile.backup_recovery_phrase_button.click() profile.backup_recovery_phrase_button.click()
profile.ok_continue_button.click() profile.ok_continue_button.click()

View File

@ -194,7 +194,7 @@ class TestTimelineHistoryNodesBootnodesMultipleDeviceMergedMedium(MultipleShared
self.profile_1.just_fyi( self.profile_1.just_fyi(
'disable use_history_node and check that no history is fetched but you can still send messages') 'disable use_history_node and check that no history is fetched but you can still send messages')
self.home_1.profile_button.click() self.home_1.profile_button.double_click()
self.profile_1.sync_settings_button.click() self.profile_1.sync_settings_button.click()
self.profile_1.mail_server_button.click() self.profile_1.mail_server_button.click()
self.profile_1.use_history_node_button.click() self.profile_1.use_history_node_button.click()
@ -212,7 +212,7 @@ class TestTimelineHistoryNodesBootnodesMultipleDeviceMergedMedium(MultipleShared
self.errors.append('History was fetched after relogin when use_history_node is disabled') self.errors.append('History was fetched after relogin when use_history_node is disabled')
self.home_1.just_fyi('enable use_history_node and check that history is fetched') self.home_1.just_fyi('enable use_history_node and check that history is fetched')
self.home_1.profile_button.click() self.home_1.profile_button.double_click()
self.profile_1.sync_settings_button.click() self.profile_1.sync_settings_button.click()
self.profile_1.mail_server_button.click() self.profile_1.mail_server_button.click()
self.profile_1.use_history_node_button.click() self.profile_1.use_history_node_button.click()
@ -301,8 +301,6 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
cls.home_1, cls.home_2 = cls.device_1.create_user(enable_notifications=True), cls.device_2.create_user() cls.home_1, cls.home_2 = cls.device_1.create_user(enable_notifications=True), cls.device_2.create_user()
cls.public_key_1, cls.default_username_1 = cls.home_1.get_public_key_and_username(return_username=True) cls.public_key_1, cls.default_username_1 = cls.home_1.get_public_key_and_username(return_username=True)
cls.public_key_2, cls.default_username_2 = cls.home_2.get_public_key_and_username(return_username=True) cls.public_key_2, cls.default_username_2 = cls.home_2.get_public_key_and_username(return_username=True)
profile_2 = cls.home_2.profile_button.click()
profile_2.switch_network()
[home.home_button.click() for home in (cls.home_1, cls.home_2)] [home.home_button.click() for home in (cls.home_1, cls.home_2)]
cls.home_1.just_fyi("Creating 1-1 chats") cls.home_1.just_fyi("Creating 1-1 chats")

View File

@ -145,8 +145,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702248) @marks.testrail_id(702248)
def test_chat_can_start_and_find_from_suggestions_using_search(self): def test_chat_can_start_and_find_from_suggestions_using_search(self):
self.home.home_button.double_click()
self.home.home_button.click()
self.home.just_fyi('Start 1-1 with username and with ENS') self.home.just_fyi('Start 1-1 with username and with ENS')
for public_key in (basic_user['public_key'], dummy_user['public_key']): for public_key in (basic_user['public_key'], dummy_user['public_key']):
@ -240,6 +239,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702253) @marks.testrail_id(702253)
def test_chat_no_suggestions_invalid_data_search(self): def test_chat_no_suggestions_invalid_data_search(self):
self.home.just_fyi('No suggestion at attempt to search for invalid data') self.home.just_fyi('No suggestion at attempt to search for invalid data')
self.home.home_button.double_click()
invalid_data = [' ', 'ab;', '.6', '@ana'] invalid_data = [' ', 'ab;', '.6', '@ana']
for text in invalid_data: for text in invalid_data:
self.home.search_by_keyword(text) self.home.search_by_keyword(text)
@ -251,9 +251,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
@marks.testrail_id(702249) @marks.testrail_id(702249)
def test_chat_input_delete_cut_and_paste_messages(self): def test_chat_input_delete_cut_and_paste_messages(self):
chat = self.home.add_contact(transaction_senders['N']['public_key']) chat = self.home.add_contact(transaction_senders['N']['public_key'])
message_text = 'test' message_text = 'test'
message_input = chat.chat_message_input message_input = chat.chat_message_input
message_input.send_keys(message_text) message_input.send_keys(message_text)
@ -280,13 +278,12 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
chat.send_message_button.click() chat.send_message_button.click()
chat.chat_element_by_text(message_text[:-2]).wait_for_visibility_of_element(2) chat.chat_element_by_text(message_text[:-2]).wait_for_visibility_of_element(2)
chat.get_back_to_home_view()
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(702250) @marks.testrail_id(702250)
def test_chat_public_clear_history_via_options_and_long_press(self): def test_chat_public_clear_history_via_options_and_long_press(self):
self.home.home_button.double_click()
public_long_press = '#public-clear-options' public_long_press = '#public-clear-options'
options_chat_name = '#' + self.public_chat_name options_chat_name = '#' + self.public_chat_name
message = 'test message' message = 'test message'
@ -326,6 +323,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
# Should be the last in group as it disables network connection # Should be the last in group as it disables network connection
def test_chat_can_search_while_offline(self): def test_chat_can_search_while_offline(self):
self.home.just_fyi('Can search for public chat while offline') self.home.just_fyi('Can search for public chat while offline')
self.home.get_back_to_home_view()
self.home.toggle_airplane_mode() self.home.toggle_airplane_mode()
self.home.search_input.click() self.home.search_input.click()
self.home.search_input.send_keys(self.public_chat_name) self.home.search_input.send_keys(self.public_chat_name)
@ -338,9 +336,3 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
(element.text, self.public_chat_name)) (element.text, self.public_chat_name))
self.errors.verify_no_errors() self.errors.verify_no_errors()

View File

@ -38,7 +38,7 @@ class TestChatManagement(SingleDeviceTestCase):
profile.just_fyi('Navigating to contact list and check that user is not in list') profile.just_fyi('Navigating to contact list and check that user is not in list')
profile.close_button.click() profile.close_button.click()
profile.back_button.click() profile.navigate_up_button.click()
if profile.element_by_text(basic_user["username"]).is_element_displayed(): if profile.element_by_text(basic_user["username"]).is_element_displayed():
self.driver.fail("Unblocked user not added previously in contact list added in contacts!") self.driver.fail("Unblocked user not added previously in contact list added in contacts!")
@ -125,7 +125,7 @@ class TestChatManagement(SingleDeviceTestCase):
profile_view.logout() profile_view.logout()
sign_in.just_fyi('Login to keycard account and send another transaction') sign_in.just_fyi('Login to keycard account and send another transaction')
sign_in.back_button.click() sign_in.navigate_up_button.click()
sign_in.sign_in(position=2, keycard=True) sign_in.sign_in(position=2, keycard=True)
sign_in.wallet_button.click() sign_in.wallet_button.click()
wallet.wait_balance_is_changed('ETH') wallet.wait_balance_is_changed('ETH')
@ -592,7 +592,7 @@ class TestChatManagement(SingleDeviceTestCase):
keycard.close_button.click() keycard.close_button.click()
if not keycard.element_by_translation_id("keycard-blocked").is_element_displayed(): if not keycard.element_by_translation_id("keycard-blocked").is_element_displayed():
self.errors.append("In keycard settings there is no info that card is blocked") self.errors.append("In keycard settings there is no info that card is blocked")
keycard.back_button.click() keycard.navigate_up_button.click()
profile.logout() profile.logout()
home.just_fyi("Check blocked card when user is logged out and use lost or frozen to restore access") home.just_fyi("Check blocked card when user is logged out and use lost or frozen to restore access")
@ -785,8 +785,7 @@ class TestChatManagement(SingleDeviceTestCase):
if not re.search(r'StatusIM/v.*/android-\d{3}/go\d[.]\d+', node_version): if not re.search(r'StatusIM/v.*/android-\d{3}/go\d[.]\d+', node_version):
self.errors.append("Node version %s didn't match expected format" % node_version) self.errors.append("Node version %s didn't match expected format" % node_version)
profile.app_version_text.click() profile.app_version_text.click()
profile.back_button.click() profile.home_button.double_click()
profile.home_button.click()
chat = home.join_public_chat(home.get_random_chat_name()) chat = home.join_public_chat(home.get_random_chat_name())
message_input = chat.chat_message_input message_input = chat.chat_message_input
message_input.paste_text_from_clipboard() message_input.paste_text_from_clipboard()
@ -829,8 +828,9 @@ class TestChatManagement(SingleDeviceTestCase):
def test_use_pinned_history_node(self): def test_use_pinned_history_node(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
profile = home.profile_button.click() profile = home.profile_button.click()
home.profile_button.click()
profile.just_fyi('pin history node') home.just_fyi('pin history node')
profile.sync_settings_button.click() profile.sync_settings_button.click()
node_gc, node_ams, node_hk = [profile.return_mailserver_name(history_node_name, used_fleet) for node_gc, node_ams, node_hk = [profile.return_mailserver_name(history_node_name, used_fleet) for
history_node_name in (mailserver_gc, mailserver_ams, mailserver_hk)] history_node_name in (mailserver_gc, mailserver_ams, mailserver_hk)]
@ -872,7 +872,7 @@ class TestChatManagement(SingleDeviceTestCase):
profile.logout() profile.logout()
if sign_in.ok_button.is_element_displayed(): if sign_in.ok_button.is_element_displayed():
sign_in.ok_button.click() sign_in.ok_button.click()
sign_in.back_button.click() sign_in.navigate_up_button.click()
sign_in.your_keys_more_icon.click() sign_in.your_keys_more_icon.click()
sign_in.generate_new_key_button.click() sign_in.generate_new_key_button.click()
sign_in.next_button.click() sign_in.next_button.click()

View File

@ -252,6 +252,7 @@ class BaseView(object):
self.close_sticker_view_icon = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat") self.close_sticker_view_icon = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
self.native_close_button = Button(self.driver, id="android:id/aerr_close") self.native_close_button = Button(self.driver, id="android:id/aerr_close")
self.close_button = Button(self.driver, accessibility_id="back-button") self.close_button = Button(self.driver, accessibility_id="back-button")
self.navigate_up_button = Button(self.driver, accessibility_id="Navigate Up")
self.show_roots_button = Button(self.driver, accessibility_id="Show roots") self.show_roots_button = Button(self.driver, accessibility_id="Show roots")
self.get_started_button = Button(self.driver, translation_id="get-started") self.get_started_button = Button(self.driver, translation_id="get-started")
self.ok_got_it_button = Button(self.driver, translation_id="ok-got-it") self.ok_got_it_button = Button(self.driver, translation_id="ok-got-it")
@ -532,18 +533,20 @@ class BaseView(object):
def get_back_to_home_view(self, times_to_click_on_back_btn=3): def get_back_to_home_view(self, times_to_click_on_back_btn=3):
counter = 0 counter = 0
while BackButton(self.driver).is_element_displayed(2) or self.close_button.is_element_displayed(2): while BackButton(self.driver).is_element_displayed(2) or self.close_button.is_element_displayed(2) or self.navigate_up_button.is_element_displayed(2):
try: try:
if counter >= times_to_click_on_back_btn: if counter >= times_to_click_on_back_btn:
break break
if BackButton(self.driver).is_element_displayed(2): if BackButton(self.driver).is_element_displayed(2):
self.back_button.click() self.back_button.click()
else: elif self.close_button.is_element_displayed(2):
self.close_button.click() self.close_button.click()
else:
self.navigate_up_button.click()
counter += 1 counter += 1
except (NoSuchElementException, TimeoutException): except (NoSuchElementException, TimeoutException):
continue continue
return self.get_home_view() return self
def relogin(self, password=common_password): def relogin(self, password=common_password):
try: try:

View File

@ -88,7 +88,7 @@ class ViewProfileButton(Button):
class ChatOptionsButton(Button): class ChatOptionsButton(Button):
def __init__(self, driver): def __init__(self, driver):
super().__init__(driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat") super().__init__(driver, accessibility_id="chat-menu-button")
def click(self): def click(self):
self.click_until_presence_of_element(HomeView(self.driver).mark_all_messages_as_read_button) self.click_until_presence_of_element(HomeView(self.driver).mark_all_messages_as_read_button)
@ -884,7 +884,7 @@ class ChatView(BaseView):
element.scroll_to_element(depth=21) element.scroll_to_element(depth=21)
element.click() element.click()
element.wait_for_invisibility_of_element() element.wait_for_invisibility_of_element()
self.back_button.click() self.navigate_up_button.click()
time.sleep(2) time.sleep(2)
self.swipe_left() self.swipe_left()
self.driver.info("## Stickerpack is installed successfully!", device=False) self.driver.info("## Stickerpack is installed successfully!", device=False)