e2e: fixes

This commit is contained in:
Yevheniia Berdnyk 2023-06-13 19:54:39 +03:00
parent 2932bbea85
commit cfefc2d734
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
4 changed files with 23 additions and 14 deletions

View File

@ -210,7 +210,6 @@ class TestrailReport(BaseTestReport):
'status_id': self.outcomes['undefined_fail'] if last_testrun.error else self.outcomes['passed'],
'comment': comment})
print("RESULTS:\n%s" % "\n".join(str(i) for i in data))
results = self.post('add_results_for_cases/%s' % self.run_id, data={"results": data})
try:
results[0]

View File

@ -1127,8 +1127,8 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
self.errors.append("PN are keep staying after message was seen by user")
self.errors.verify_no_errors()
@marks.xfail(
reason="Message is being in status 'Sending' for a long time: https://github.com/status-im/status-mobile/issues/15385")
@marks.xfail(reason="Message is being in status 'Sending' for a long time: " \
"https://github.com/status-im/status-mobile/issues/15385")
@marks.testrail_id(702855)
def test_1_1_chat_edit_message(self):
[home.click_system_back_button_until_element_is_shown() for home in self.homes]
@ -1146,6 +1146,8 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
self.errors.append('No edited message in 1-1 chat displayed')
self.errors.verify_no_errors()
@marks.xfail(reason="Message is being in status 'Sending' for a long time: " \
"https://github.com/status-im/status-mobile/issues/15385")
@marks.testrail_id(702733)
def test_1_1_chat_text_message_delete_push_disappear(self):
if not self.chat_2.chat_message_input.is_element_displayed():
@ -1172,8 +1174,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
self.chat_2.chat_element_by_text(message_to_delete_for_me).wait_for_status_to_be("Delivered", timeout)
self.chat_2.delete_message_in_chat(message_to_delete_for_me, everyone=False)
except TimeoutException:
self.errors.append(
"Message status was not changed to 'Delivered' after %s s, https://github.com/status-im/status-mobile/issues/15385" % timeout)
self.errors.append("Message status was not changed to 'Delivered' after %s s" % timeout)
else:
if not self.chat_2.chat_element_by_text(message_to_delete_for_me).is_element_disappeared(20):
self.errors.append("Deleted for me message is shown in chat for the author of message")

View File

@ -683,7 +683,9 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(702894)
def test_community_contact_block_unblock_offline(self):
[home.jump_to_card_by_text('# %s' % self.channel_name) for home in self.homes]
for channel in self.channel_1, self.channel_2:
if not channel.chat_message_input.is_element_displayed():
channel.jump_to_card_by_text('# %s' % self.channel_name)
self.channel_1.send_message('message to get avatar of user 2 visible in next message')
self.channel_2.just_fyi("Sending message before block")
@ -697,7 +699,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
chat_element.member_photo.click()
self.channel_1.block_contact()
self.chat_1.just_fyi('messages from blocked user are hidden in public chat and close app')
self.chat_1.just_fyi('Check that messages from blocked user are hidden in public chat and close app')
if self.chat_1.chat_element_by_text(message_to_disappear).is_element_displayed():
self.errors.append("Messages from blocked user is not cleared in public chat ")
self.chat_1.jump_to_messages_home()
@ -705,11 +707,11 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.errors.append("1-1 chat from blocked user is not removed!")
self.chat_1.toggle_airplane_mode()
self.home_2.just_fyi('send message to public chat while device 1 is offline')
self.home_2.just_fyi('Send message to public chat while device 1 is offline')
message_blocked, message_unblocked = "Message from blocked user", "Hurray! unblocked"
self.channel_2.send_message(message_blocked)
self.chat_1.just_fyi('check that new messages from blocked user are not delivered')
self.chat_1.just_fyi('Check that new messages from blocked user are not delivered')
self.chat_1.toggle_airplane_mode()
self.home_1.jump_to_card_by_text('# %s' % self.channel_name)
for message in message_to_disappear, message_blocked:
@ -717,7 +719,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.errors.append(
"'%s' from blocked user is fetched from offline in community channel" % message)
self.chat_2.just_fyi('Unblock user and check that can see further messages')
self.chat_1.just_fyi('Unblock user and check that can see further messages')
# TODO: still no blocked users in new UI
profile_1 = self.home_1.get_profile_view()
self.home_1.jump_to_messages_home()
@ -735,14 +737,16 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
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)")
self.home_1.just_fyi("Add blocked user to contacts again after removing(removed automatically when blocked)")
chat_element = self.channel_1.chat_element_by_text(message_unblocked)
chat_element.find_element()
chat_element.member_photo.click()
self.channel_1.profile_add_to_contacts_button.click()
self.home_2.just_fyi("Accept contact request after being unblocked")
self.home_2.jump_to_messages_home()
self.home_2.handle_contact_request(self.username_1)
self.channel_1.profile_send_message_button.wait_and_click()
self.channel_1.profile_send_message_button.click_until_absense_of_element(
desired_element=self.channel_1.profile_send_message_button)
self.chat_1.send_message("piy")
self.home_2.just_fyi("Check message in 1-1 chat after unblock")

View File

@ -251,8 +251,12 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
@marks.testrail_id(702957)
def test_activity_center_mentions(self):
if not self.channel_2.chat_message_input.is_element_displayed():
self.home_2.click_system_back_button_until_element_is_shown()
self.home_2.communities_tab.click()
self.home_2.get_chat(self.community_name, community=True).click()
self.community_2.get_channel(self.channel_name).click()
self.home_1.jump_to_communities_home()
self.home_2.jump_to_card_by_text('# %s' % self.channel_name)
self.device_2.just_fyi("Invited member sends a message with a mention")
self.channel_2.mention_user(self.username_1)
@ -286,7 +290,8 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
@marks.testrail_id(702958)
def test_activity_center_admin_notification_accept_swipe(self):
self.home_2.just_fyi("Clearing history")
self.home_2.jump_to_messages_home()
self.home_2.click_system_back_button_until_element_is_shown()
self.home_2.chats_tab.click()
self.home_2.clear_chat_long_press(self.username_1)
[home.jump_to_communities_home() for home in (self.home_1, self.home_2)]