e2e: updated wait_to (#16416)

This commit is contained in:
Tetiana Churikova 2023-06-28 14:27:57 +02:00 committed by GitHub
parent c5a7bf39d7
commit ba8c08650b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)