mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-24 15:38:56 +00:00
e2e: workarounds
This commit is contained in:
parent
b85eb4184a
commit
0a0b70c633
@ -229,6 +229,8 @@ def pytest_runtest_makereport(item, call):
|
||||
report = outcome.get_result()
|
||||
|
||||
is_sauce_env = item.config.getoption('env') == 'sauce'
|
||||
case_ids_set = item.config.getoption("run_testrail_ids")
|
||||
in_run = str([mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]) in str(case_ids_set)
|
||||
|
||||
def catch_error():
|
||||
error = report.longreprtext
|
||||
@ -242,9 +244,7 @@ def pytest_runtest_makereport(item, call):
|
||||
is_group = "xdist_group" in item.keywords._markers or "xdist_group" in item.parent.keywords._markers
|
||||
error_intro, error = 'Test setup failed:', ''
|
||||
final_error = '%s %s' % (error_intro, error)
|
||||
# if hasattr(report, 'wasxfail') and str([mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]) \
|
||||
# in str(item.config.getoption("run_testrail_ids")):
|
||||
if hasattr(report, 'wasxfail'):
|
||||
if (hasattr(report, 'wasxfail') and not case_ids_set) or (hasattr(report, 'wasxfail') and in_run):
|
||||
if '[NOTRUN]' in report.wasxfail:
|
||||
test_suite_data.set_current_test(item.name, testrail_case_id=get_testrail_case_id(item))
|
||||
test_suite_data.current_test.create_new_testrun()
|
||||
@ -276,9 +276,7 @@ def pytest_runtest_makereport(item, call):
|
||||
error = catch_error()
|
||||
if report.failed:
|
||||
current_test.testruns[-1].error = error
|
||||
in_run = str([mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]) in str(item.config.getoption(
|
||||
"run_testrail_ids"))
|
||||
if hasattr(report, 'wasxfail') and in_run:
|
||||
if (hasattr(report, 'wasxfail') and not case_ids_set) or (hasattr(report, 'wasxfail') and in_run):
|
||||
current_test.testruns[-1].xfail = report.wasxfail
|
||||
if error:
|
||||
current_test.testruns[-1].error = '%s [[%s]]' % (error, report.wasxfail)
|
||||
|
@ -1284,7 +1284,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702731)
|
||||
@marks.xfail(reason="blocked by #14637")
|
||||
@marks.xfail(reason="blocked by #14672")
|
||||
def test_1_1_chat_pin_messages(self):
|
||||
self.home_1.just_fyi("Check that Device1 can pin own message in 1-1 chat")
|
||||
self.chat_1.send_message(self.message_1)
|
||||
@ -1360,11 +1360,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
"Pinned messages count is not 2 after unpinning the last pinned message for user %s" % (
|
||||
chat_number + 1)
|
||||
)
|
||||
# workaround for 14672
|
||||
self.chat_1.tap_by_coordinates(500, 100)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702745)
|
||||
def test_1_1_chat_non_latin_messages_stack_update_profile_photo(self):
|
||||
self.home_1.click_system_back_button_until_element_is_shown()
|
||||
# self.home_1.click_system_back_button_until_element_is_shown()
|
||||
self.home_1.browser_tab.click() # temp, until profile is on browser tab
|
||||
self.profile_1.edit_profile_picture('sauce_logo.png')
|
||||
self.profile_1.chats_tab.click()
|
||||
|
@ -205,6 +205,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.homes[0].just_fyi('Admin creates group chat')
|
||||
self.chat_name = self.homes[0].get_random_chat_name()
|
||||
self.homes[0].communities_tab.click()
|
||||
self.chats[0] = self.homes[0].create_group_chat(user_names_to_add=[self.usernames[1]],
|
||||
group_chat_name=self.chat_name,
|
||||
new_ui=True)
|
||||
@ -214,7 +215,6 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||
self.chats[0].send_message(self.message_before_adding)
|
||||
|
||||
@marks.testrail_id(702807)
|
||||
# @marks.xfail(reason="test may fail as sometimes message 'Hey admin' is not delivered; needs investigation")
|
||||
def test_group_chat_join_send_text_messages_push(self):
|
||||
message_to_admin = self.message_to_admin
|
||||
[self.homes[i].click_system_back_button_until_element_is_shown() for i in range(3)]
|
||||
@ -241,9 +241,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702808)
|
||||
# @marks.xfail(
|
||||
# reason="mysterious issue when PNs are not fetched from offline,
|
||||
# can not reproduce on real devices; needs investigation")
|
||||
@marks.xfail(reason="mysterious issue when PNs are not fetched from offline,can not reproduce on real devices; needs investigation")
|
||||
def test_group_chat_offline_pn(self):
|
||||
[self.homes[i].click_system_back_button_until_element_is_shown() for i in range(3)]
|
||||
chat_name = 'for_offline_pn'
|
||||
@ -299,6 +297,8 @@ class TestGroupChatMediumMultipleDeviceNewUI(MultipleSharedDeviceTestCase):
|
||||
self.home_2.chats_tab.click()
|
||||
self.home_2.handle_contact_request(self.default_username_1)
|
||||
self.home_2.click_system_back_button_until_element_is_shown()
|
||||
# workaround for group chat new UI
|
||||
self.home_1.communities_tab.click()
|
||||
self.group_chat_name = "Group Chat"
|
||||
self.group_chat_1 = self.home_1.create_group_chat(user_names_to_add=[self.default_username_2],
|
||||
group_chat_name=self.group_chat_name,
|
||||
|
@ -261,6 +261,7 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
self.text_message = 'first message in community'
|
||||
self.community_name = self.home_1.get_random_chat_name()
|
||||
self.channel_name = self.home_1.get_random_chat_name()
|
||||
self.home_1.communities_tab.click()
|
||||
self.home_1.create_community(name=self.community_name, description='community to test', require_approval=False)
|
||||
self.community_1 = CommunityView(self.drivers[0])
|
||||
self.community_1.send_invite_to_community(self.default_username_2)
|
||||
|
@ -746,6 +746,10 @@ class BaseView(object):
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction(keycard=keycard)
|
||||
|
||||
def tap_by_coordinates(self, x, y):
|
||||
action = TouchAction(self.driver)
|
||||
action.press(None, x, y).perform()
|
||||
|
||||
# Method-helper
|
||||
def write_page_source_to_file(self, full_path_to_file):
|
||||
string_source = self.driver.page_source
|
||||
|
Loading…
x
Reference in New Issue
Block a user