Skip to content

Commit

Permalink
e2e: Fixes for nightly failures
Browse files Browse the repository at this point in the history
  • Loading branch information
yevh-berdnyk committed Jun 5, 2023
1 parent b385e5a commit 7a10507
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions test/appium/tests/base_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.support.wait import WebDriverWait
from urllib3.exceptions import MaxRetryError
from urllib3.exceptions import MaxRetryError, ProtocolError

from support.api.network_api import NetworkApi
from support.github_report import GithubHtmlReport
Expand Down Expand Up @@ -143,7 +143,7 @@ def add_alert_text_to_report(self, driver):
test_suite_data.current_test.testruns[-1].error = "%s; also Unexpected Alert is shown: '%s'" % (
test_suite_data.current_test.testruns[-1].error, alert_text
)
except RemoteDisconnected:
except (RemoteDisconnected, ProtocolError):
test_suite_data.current_test.testruns[-1].error = "%s; \n RemoteDisconnected" % \
test_suite_data.current_test.testruns[-1].error

Expand Down Expand Up @@ -302,10 +302,10 @@ def create_shared_drivers(quantity):
print('SC Executor: %s' % executor_sauce_lab)
try:
drivers = loop.run_until_complete(start_threads(quantity,
Driver,
drivers,
executor_sauce_lab,
update_capabilities_sauce_lab(capabilities)))
Driver,
drivers,
executor_sauce_lab,
update_capabilities_sauce_lab(capabilities)))
for i in range(quantity):
test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
drivers[i].implicitly_wait(implicit_wait)
Expand Down
3 changes: 3 additions & 0 deletions test/appium/tests/critical/chats/test_1_1_public_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,9 @@ def test_1_1_chat_non_latin_messages_stack_update_profile_photo(self):
self.chat_2.just_fyi("Send messages with non-latin symbols")
self.home_1.jump_to_card_by_text(self.username_2)
self.chat_1.send_message("just a text") # Sending a message here so the next ones will be in a separate line

self.home_2.click_system_back_button_until_element_is_shown()
self.home_2.jump_to_card_by_text(self.username_1)
messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥']
[self.chat_2.send_message(message) for message in messages]
for message in messages:
Expand Down
6 changes: 4 additions & 2 deletions test/appium/tests/critical/test_public_chat_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ def prepare_devices(self):

@marks.testrail_id(702838)
def test_community_message_send_check_timestamps_sender_username(self):
message = self.text_message
message = "new message"
self.channel_1.send_message(message)
sent_time_variants = self.channel_1.convert_device_time_to_chat_timestamp()
timestamp = self.channel_1.chat_element_by_text(message).timestamp
if sent_time_variants and timestamp:
Expand Down Expand Up @@ -500,6 +501,7 @@ def test_community_one_image_send_reply(self):
image_description = 'description'
self.channel_1.send_images_with_description(image_description)
self.channel_1.chat_message_input.click()
self.channel_1.hide_keyboard_if_shown()
self.channel_1.chat_element_by_text(image_description).image_in_message.click()
self.channel_1.click_system_back_button()

Expand Down Expand Up @@ -730,7 +732,7 @@ def test_community_contact_block_unblock_offline(self):
self.home_2.just_fyi("Check that can send message in community after unblock")
[home.jump_to_card_by_text('# %s' % self.channel_name) for home in [self.home_1, self.home_2]]
self.chat_2.send_message(message_unblocked)
if not self.chat_1.chat_element_by_text(message_unblocked).is_element_displayed(30):
if not self.chat_1.chat_element_by_text(message_unblocked).is_element_displayed(120):
self.errors.append("Message was not received in public chat after user unblock!")

self.home_2.just_fyi("Add blocked user to contacts again after removing(removed automatically when blocked)")
Expand Down

0 comments on commit 7a10507

Please sign in to comment.