e2e: fix for app closed after closing gallery

This commit is contained in:
Yevheniia Berdnyk 2023-10-31 12:04:46 +02:00
parent 90d3a5a39d
commit 88b3d7d2e6
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
1 changed files with 14 additions and 0 deletions

View File

@ -242,6 +242,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.chats[0].navigate_back_to_chat_view()
self.chats[1].navigate_back_to_home_view()
app_package = self.drivers[2].current_package
self.chats[2].just_fyi("Member_2 opens the image and saves it")
self.chats[2].chat_element_by_text(image_description).image_in_message.click()
@ -258,6 +259,13 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.errors.append("Message about saving a photo is not shown for member_2.")
self.chats[2].navigate_back_to_chat_view()
# workaround for app closed after navigating back from gallery
if not self.chats[2].chats_tab.is_element_displayed():
self.drivers[2].activate_app(app_package)
SignInView(self.drivers[2]).sign_in()
self.homes[2].chats_tab.click()
self.homes[2].get_chat(self.chat_name).click()
self.chats[2].just_fyi("Member_2 checks that image was saved in gallery")
self.chats[2].show_images_button.click()
self.chats[2].allow_button.click_if_shown()
@ -265,6 +273,12 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.errors.append("Image is not saved to gallery for member_2.")
self.chats[2].navigate_back_to_chat_view()
# workaround for app closed after navigating back from gallery
if not self.chats[2].chats_tab.is_element_displayed():
self.drivers[2].activate_app(app_package)
SignInView(self.drivers[2]).sign_in()
self.homes[2].chats_tab.click()
self.errors.verify_no_errors()
@marks.testrail_id(702808)