e2e: fix failures
This commit is contained in:
parent
81212573d7
commit
8d7224d972
|
@ -127,7 +127,8 @@ class TestrailReport(BaseTestReport):
|
|||
test_cases['pr']['group_chat'] = 50964
|
||||
test_cases['pr']['community_single'] = 50983
|
||||
test_cases['pr']['community_multiple'] = 50982
|
||||
test_cases['pr']['activity_centre'] = 50984
|
||||
test_cases['pr']['activity_centre_contact_request'] = 50984
|
||||
test_cases['pr']['activity_centre_other'] = 51005
|
||||
|
||||
## Nightly e2e
|
||||
# test_cases['nightly']['medium'] = 736
|
||||
|
|
|
@ -1188,7 +1188,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
|||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702855)
|
||||
@marks.xfail(reason="blocked by 15166")
|
||||
def test_1_1_chat_edit_message(self):
|
||||
[device.click_system_back_button_until_element_is_shown() for device in
|
||||
(self.device_1, self.device_2)]
|
||||
|
@ -1203,14 +1202,9 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
|||
self.chat_2.send_message(message_before_edit_1_1)
|
||||
self.chat_2.chat_element_by_text(message_before_edit_1_1).wait_for_status_to_be("Delivered")
|
||||
self.chat_2.edit_message_in_chat(message_before_edit_1_1, message_after_edit_1_1)
|
||||
chat_element = self.chat_1.chat_element_by_text(message_after_edit_1_1)
|
||||
chat_element = self.chat_1.chat_element_by_text('%s (Edited)' % message_after_edit_1_1)
|
||||
if not chat_element.is_element_displayed(30):
|
||||
self.errors.append('No edited message in 1-1 chat displayed')
|
||||
try:
|
||||
chat_element.wait_for_status_to_be('edited')
|
||||
except TimeoutException:
|
||||
self.errors.append('Edited message is shown for receiver with status %s but it should be "Edited"' %
|
||||
chat_element.status)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702733)
|
||||
|
|
|
@ -549,6 +549,7 @@ 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.home_1, self.home_2]]
|
||||
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")
|
||||
message_to_disappear = "I should not be in chat"
|
||||
|
|
|
@ -75,7 +75,7 @@ class TestActivityCenterMultipleDeviceMedium(MultipleSharedDeviceTestCase):
|
|||
|
||||
@pytest.mark.xdist_group(name="two_2")
|
||||
@marks.new_ui_critical
|
||||
class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
|
||||
def prepare_devices(self):
|
||||
self.drivers, self.loop = create_shared_drivers(2)
|
||||
|
@ -93,11 +93,10 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
|||
self.profile_1.just_fyi("Enabling PNs")
|
||||
self.profile_1.switch_push_notifications()
|
||||
[home.click_system_back_button_until_element_is_shown() for home in [self.home_1, self.home_2]]
|
||||
|
||||
[home.chats_tab.click() for home in [self.home_1, self.home_2]]
|
||||
|
||||
@marks.testrail_id(702871)
|
||||
def test_activity_center_cancel_outgoing_contact_request_no_pn(self):
|
||||
[home.chats_tab.click() for home in [self.home_1, self.home_2]]
|
||||
def test_activity_center_contact_request_cancel_outgoing_no_pn(self):
|
||||
self.device_1.put_app_to_background()
|
||||
self.device_2.just_fyi('Device2 sends a contact request to Device1')
|
||||
self.home_2.add_contact(self.public_key_1)
|
||||
|
@ -131,7 +130,7 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
|||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702850)
|
||||
def test_activity_center_decline_contact_request(self):
|
||||
def test_activity_center_contact_request_decline(self):
|
||||
[home.chats_tab.click() for home in [self.home_1, self.home_2]]
|
||||
|
||||
self.home_2.just_fyi("Device2 sends pending contact request after cancelling")
|
||||
|
@ -154,7 +153,7 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
|||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702851)
|
||||
def test_activity_center_mentions_in_community_jump_to(self):
|
||||
def test_activity_center_contact_request_accept(self):
|
||||
self.device_2.just_fyi('Device2 re-sends a contact request to Device1')
|
||||
self.home_2.add_contact(self.public_key_1, remove_from_contacts=True)
|
||||
|
||||
|
@ -163,40 +162,85 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
|||
self.home_1.handle_contact_request(username=self.default_username_2)
|
||||
self.home_1.contacts_tab.click()
|
||||
if not self.home_1.contact_details(username=self.default_username_2).is_element_displayed(20):
|
||||
self.errors.append("Contact was not added to contact list after accepting contact request")
|
||||
self.home_1.recent_tab.click()
|
||||
self.errors.append("Contact was not added to contact list after accepting contact request (as receiver)")
|
||||
|
||||
self.device_1.just_fyi('Creating and join community from Device1 and Device2')
|
||||
self.text_message = 'first message in community'
|
||||
self.device_2.just_fyi('Device1 check that contact appeared in contact list mutually')
|
||||
self.home_2.chats_tab.click()
|
||||
self.home_2.contacts_tab.click()
|
||||
if not self.home_2.contact_details(username=self.default_username_1).is_element_displayed(20):
|
||||
self.errors.append("Contact was not added to contact list after accepting contact request (as sender)")
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
@pytest.mark.xdist_group(name="two_2")
|
||||
@marks.new_ui_critical
|
||||
class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
|
||||
|
||||
def prepare_devices(self):
|
||||
self.drivers, self.loop = create_shared_drivers(2)
|
||||
self.device_1, self.device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
self.loop.run_until_complete(
|
||||
run_in_parallel(((self.device_1.create_user,), (self.device_2.create_user,))))
|
||||
self.home_1, self.home_2 = self.device_1.get_home_view(), self.device_2.get_home_view()
|
||||
self.profile_1, self.profile_2 = self.home_1.get_profile_view(), self.home_2.get_profile_view()
|
||||
users = self.loop.run_until_complete(run_in_parallel(
|
||||
((self.home_1.get_public_key_and_username, True),
|
||||
(self.home_2.get_public_key_and_username, True))
|
||||
))
|
||||
self.public_key_1, self.default_username_1 = users[0]
|
||||
self.public_key_2, self.default_username_2 = users[1]
|
||||
[home.click_system_back_button_until_element_is_shown() for home in (self.home_1, self.home_2)]
|
||||
[home.chats_tab.click() for home in (self.home_1, self.home_2)]
|
||||
|
||||
self.home_1.add_contact(self.public_key_2)
|
||||
self.home_2.handle_contact_request(self.default_username_1)
|
||||
self.text_message = 'hello'
|
||||
self.one_to_one_message = 'one-t-one message'
|
||||
|
||||
self.home_2.just_fyi("Send message to contact (need for jump to) test")
|
||||
self.chat_1 = self.home_1.get_chat(self.default_username_2).click()
|
||||
self.chat_1.send_message(self.one_to_one_message)
|
||||
self.chat_2 = self.home_2.get_chat(self.default_username_1).click()
|
||||
self.chat_2.send_message(self.text_message)
|
||||
[home.click_system_back_button_until_element_is_shown() for home in (self.home_1, self.home_2)]
|
||||
|
||||
self.home_1.just_fyi("Open community to message")
|
||||
self.home_1.communities_tab.click()
|
||||
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)
|
||||
|
||||
self.home_2.chats_tab.click()
|
||||
self.home_2.recent_tab.click()
|
||||
self.channel_1 = self.community_1.add_channel(self.channel_name)
|
||||
self.channel_1.send_message(self.text_message)
|
||||
self.chat_2 = self.home_2.get_chat(self.default_username_1).click()
|
||||
self.chat_2.element_by_text_part('View').click()
|
||||
self.community_2 = CommunityView(self.drivers[1])
|
||||
self.community_2.join_button.click()
|
||||
self.channel_1 = self.community_1.add_channel(self.channel_name)
|
||||
self.channel_1.send_message(self.text_message)
|
||||
self.channel_2 = self.community_2.get_chat(self.channel_name).click()
|
||||
|
||||
self.community_2.just_fyi("Check Jump to screen and redirect on tap")
|
||||
self.community_2.jump_to_button.click()
|
||||
for card in (self.community_name, self.default_username_1):
|
||||
if not self.community_2.element_by_text_part(card).is_element_displayed(20):
|
||||
self.home_1.just_fyi("Reopen community view to use new interface")
|
||||
for home in (self.home_1, self.home_2):
|
||||
home.jump_to_communities_home()
|
||||
home.get_chat(self.community_name, community=True).click()
|
||||
community_view = home.get_community_view()
|
||||
community_view.get_channel(self.channel_name).click()
|
||||
self.channel_2 = self.home_2.get_chat_view()
|
||||
|
||||
@marks.testrail_id(702936)
|
||||
def test_navigation_jump_to(self):
|
||||
self.community_1.just_fyi("Check Jump to screen and redirect on tap")
|
||||
self.community_1.jump_to_button.click()
|
||||
for card in (self.community_name, self.default_username_2):
|
||||
if not self.community_1.element_by_text_part(card).is_element_displayed(20):
|
||||
self.errors.append("Card %s is not shown on Jump to screen!" % card)
|
||||
self.community_2.element_by_translation_id("community-channel").click()
|
||||
if not self.channel_2.chat_element_by_text(self.text_message).is_element_displayed(20):
|
||||
self.errors.append("User was not redirected to community channel after tappin on community channel card!")
|
||||
self.channel_2.click_system_back_button()
|
||||
self.community_2.jump_to_button.click()
|
||||
self.community_2.element_by_text_part(self.default_username_1).click()
|
||||
if not self.chat_2.element_by_text_part('View').is_element_displayed(20):
|
||||
self.community_1.element_by_translation_id("community-channel").click()
|
||||
if not self.channel_1.chat_element_by_text(self.text_message).is_element_displayed(20):
|
||||
self.errors.append("User was not redirected to community channel after tapping on community channel card!")
|
||||
self.channel_1.click_system_back_button()
|
||||
self.community_1.jump_to_button.click()
|
||||
self.community_1.element_by_text_part(self.default_username_2).click()
|
||||
if not self.chat_1.chat_element_by_text(self.one_to_one_message).is_element_displayed(20):
|
||||
self.errors.append("User was not redirected to 1-1 chat after tapping card!")
|
||||
|
||||
# Blocked because of 14648
|
||||
|
@ -225,5 +269,4 @@ class TestActivityCenterMultipleDevicePR(MultipleSharedDeviceTestCase):
|
|||
# self.home_1.driver.fail("No PN for mention in community!")
|
||||
# if not self.channel_1.chat_element_by_text(group_chat_message).is_element_displayed(20):
|
||||
# self.errors.append("No redirect to channel after tap on PN with mention!")
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
|
|
@ -628,8 +628,6 @@ class BaseView(object):
|
|||
def get_public_key_and_username(self, return_username=False):
|
||||
self.driver.info("Get public key and username")
|
||||
profile_view = self.profile_button.click()
|
||||
# self.browser_tab.click() # temp, until profile is on browser tab
|
||||
#profile_view = self.get_profile_view()
|
||||
default_username = profile_view.default_username_text.text
|
||||
profile_view.share_my_profile_button.click()
|
||||
profile_view.public_key_text.wait_for_visibility_of_element(20)
|
||||
|
|
Loading…
Reference in New Issue