From ba8c08650b68ea34231c7f8532beac1f12182752 Mon Sep 17 00:00:00 2001 From: Tetiana Churikova Date: Wed, 28 Jun 2023 14:27:57 +0200 Subject: [PATCH] e2e: updated wait_to (#16416) --- test/appium/tests/critical/chats/test_1_1_public_chats.py | 1 - test/appium/views/chat_view.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/appium/tests/critical/chats/test_1_1_public_chats.py b/test/appium/tests/critical/chats/test_1_1_public_chats.py index 9a8eb457ab..bbe5e6bff0 100644 --- a/test/appium/tests/critical/chats/test_1_1_public_chats.py +++ b/test/appium/tests/critical/chats/test_1_1_public_chats.py @@ -1209,7 +1209,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase): [device.click_system_back_button_until_element_is_shown() for device in (self.device_1, self.device_2)] self.errors.verify_no_errors() - @marks.xfail(reason="Issue with messages not being sent for a long time") @marks.testrail_id(702783) def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self): self.chat_2.jump_to_card_by_text(self.username_1) diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 71fd8d91b5..0f000e5265 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -220,8 +220,9 @@ class ChatElementByText(Text): def wait_for_status_to_be(self, expected_status: str, timeout: int = 30): self.driver.info("Waiting for message to be sent for %s sec" % timeout) start_time = time.time() - current_status = self.status + current_status = 'not set' while time.time() - start_time <= timeout: + current_status = self.status if current_status == expected_status: return time.sleep(1)