mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 09:44:13 +00:00
e2e: increased wait time for PN and CR
This commit is contained in:
parent
9cf4556b9d
commit
6093d56c90
@ -353,7 +353,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
chat_1 = self.device_1.click_upon_push_notification_by_text(emoji_unicode)
|
||||
|
||||
self.device_1.just_fyi("Check Device 1 is actually on chat")
|
||||
if not (chat_1.element_by_text_part(message).is_element_displayed()
|
||||
if not (chat_1.element_by_text_part(message).is_element_displayed(15)
|
||||
and chat_1.element_by_text_part(emoji_unicode).is_element_displayed()):
|
||||
self.device_1.driver.fail("Failed to open chat view after tap on PN")
|
||||
|
||||
|
@ -410,15 +410,17 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||
self.homes[1].mute_chat_long_press(self.chat_name, "mute-for-1-hour")
|
||||
device_time = self.homes[1].driver.device_time
|
||||
current_time = datetime.datetime.strptime(device_time, "%Y-%m-%dT%H:%M:%S%z")
|
||||
expected_time = current_time + datetime.timedelta(minutes=60)
|
||||
expected_text = "Muted until %s %s" % (
|
||||
expected_time.strftime('%H:%M'), "today" if current_time.hour < 23 else "tomorrow")
|
||||
expected_times = [current_time + datetime.timedelta(minutes=i) for i in range(59, 62)]
|
||||
expected_texts = [
|
||||
"Muted until %s %s" % (exp_time.strftime('%H:%M'), "today" if current_time.hour < 23 else "tomorrow") for
|
||||
exp_time in expected_times]
|
||||
chat = self.homes[1].get_chat(self.chat_name)
|
||||
chat.long_press_element()
|
||||
if self.homes[1].mute_chat_button.text != transl["unmute-chat"]:
|
||||
pytest.fail("Chat is not muted")
|
||||
if not self.homes[1].element_by_text(expected_text).is_element_displayed():
|
||||
self.errors.append("Text '%s' is not shown for muted chat" % expected_text)
|
||||
current_text = self.homes[1].mute_chat_button.unmute_caption_text
|
||||
if current_text not in expected_texts:
|
||||
self.errors.append("Text '%s' is not shown for muted chat" % expected_texts[1])
|
||||
self.homes[1].click_system_back_button()
|
||||
try:
|
||||
initial_counter = int(self.homes[1].chats_tab.counter.text)
|
||||
|
@ -165,22 +165,22 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
community_channel=True)
|
||||
device_time = self.home.driver.device_time
|
||||
current_time = datetime.datetime.strptime(device_time, "%Y-%m-%dT%H:%M:%S%z")
|
||||
expected_time = current_time + datetime.timedelta(days=7)
|
||||
expected_text = "Muted until %s" % expected_time.strftime('%H:%M %a %-d %b')
|
||||
expected_times = [current_time + datetime.timedelta(days=7, minutes=i) for i in range(-1, 2)]
|
||||
expected_texts = ["Muted until %s" % exp_time.strftime('%H:%M %a %-d %b') for exp_time in expected_times]
|
||||
self.community_view.get_channel(self.channel_name).long_press_element()
|
||||
self.home.mute_channel_button.wait_for_visibility_of_element()
|
||||
try:
|
||||
current_text = self.home.mute_channel_button.unmute_caption_text
|
||||
if current_text != expected_text:
|
||||
self.errors.append("Text '%s' is not shown for a muted community channel" % expected_text)
|
||||
if current_text not in expected_texts:
|
||||
self.errors.append("Text '%s' is not shown for a muted community channel" % expected_texts[1])
|
||||
except NoSuchElementException:
|
||||
self.errors.append("Caption with text '%s' is not shown for a muted community channel" % expected_text)
|
||||
self.errors.append("Caption with text '%s' is not shown for a muted community channel" % expected_texts[1])
|
||||
self.home.click_system_back_button()
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.communities_tab.click()
|
||||
self.home.get_chat(self.community_name, community=True).long_press_element()
|
||||
if self.home.element_by_text(expected_text).is_element_displayed() or self.home.mute_community_button.text != \
|
||||
transl["mute-community"]:
|
||||
if self.home.element_by_text_part("Muted until").is_element_displayed() or \
|
||||
self.home.mute_community_button.text != transl["mute-community"]:
|
||||
self.errors.append("Community is muted when channel is muted")
|
||||
self.home.click_system_back_button()
|
||||
|
||||
|
@ -152,6 +152,7 @@ class BaseElement(object):
|
||||
def wait_for_rendering_ended_and_click(self, attempts=3):
|
||||
for i in range(attempts):
|
||||
try:
|
||||
self.wait_for_visibility_of_element(20)
|
||||
self.click()
|
||||
self.driver.info("Attempt %s is successful clicking %s" % (i, self.locator))
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user