e2e: added delivered for group chats and check for PNs
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
66a4ab5aef
commit
4e0ec35ea5
|
@ -409,8 +409,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
self.errors.append("Mail client is not opened when submitting bug")
|
||||
profile.click_system_back_button()
|
||||
profile.request_a_feature_button.click()
|
||||
if not profile.element_by_text("#status").is_element_displayed():
|
||||
self.errors.append("Status channel is not suggested for requesting a feature")
|
||||
if not profile.element_by_text("#support").is_element_displayed():
|
||||
self.errors.append("Support channel is not suggested for requesting a feature")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5738)
|
||||
|
@ -1060,13 +1060,15 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6226)
|
||||
@marks.critical
|
||||
def test_ens_mentions_and_nickname_in_public_and_1_1_chats(self):
|
||||
def test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats(self):
|
||||
self.create_drivers(2)
|
||||
device_1, device_2 = self.drivers[0], self.drivers[1]
|
||||
sign_in_1, sign_in_2 = SignInView(device_1), SignInView(device_2)
|
||||
user_1 = ens_user
|
||||
home_1 = sign_in_1.recover_access(user_1['passphrase'])
|
||||
home_1 = sign_in_1.recover_access(user_1['passphrase'], enable_notifications=True)
|
||||
home_2 = sign_in_2.create_user()
|
||||
publuc_key_2, username_2 = home_2.get_public_key_and_username(return_username=True)
|
||||
home_2.home_button.double_click()
|
||||
|
||||
home_1.just_fyi('switching to mainnet and add ENS')
|
||||
profile_1 = sign_in_1.profile_button.click()
|
||||
|
@ -1107,6 +1109,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
chat_1.send_message(message_text_2)
|
||||
if not chat_2.wait_for_element_starts_with_text(ens_name):
|
||||
self.errors.append('ENS username is not shown in public chat')
|
||||
home_1.put_app_to_background()
|
||||
|
||||
home_2.just_fyi('check that can mention user with ENS name')
|
||||
chat_2.select_mention_from_suggestion_list(user_1['ens'])
|
||||
|
@ -1117,6 +1120,10 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
for element in (chat_2.element_by_text(user_1['username']), chat_2.profile_add_to_contacts):
|
||||
if not element.is_element_displayed():
|
||||
self.errors.append('Was not redirected to user profile after tapping on mention!')
|
||||
|
||||
home_1.just_fyi('check that PN is received and after tap you are redirected to public chat')
|
||||
home_1.open_notification_bar()
|
||||
home_1.element_by_text_part('%s in #%s' % (username_2, chat_name)).click()
|
||||
chat_1.element_starts_with_text(user_1['ens'] +'.stateofus.eth','button').click()
|
||||
if not profile_1.contacts_button.is_element_displayed():
|
||||
self.errors.append('Was not redirected to own profile after tapping on mention of myself from another user!')
|
||||
|
|
|
@ -10,10 +10,10 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(3994)
|
||||
@marks.high
|
||||
def test_create_new_group_chat(self):
|
||||
def test_create_new_group_chat_messaging_pn_delived(self):
|
||||
self.create_drivers(2)
|
||||
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
device_1_home, device_2_home = device_1.create_user(), device_2.create_user()
|
||||
device_1_home, device_2_home = device_1.create_user(), device_2.create_user(enable_notifications=True)
|
||||
device_1_key, device_1_username = device_1.get_public_key_and_username(True)
|
||||
device_1.home_button.click()
|
||||
chat_name = device_1_home.get_random_chat_name()
|
||||
|
@ -52,13 +52,22 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
|
|||
if not device_2_chat.chat_element_by_text(message):
|
||||
self.errors.append('%s system message is not shown' % message)
|
||||
|
||||
device_2.just_fyi('Join to group chat, check system messages and send messages to group chat')
|
||||
device_2.just_fyi('Join to group chat, check system messages and send messages to group chat, check message status is delivered')
|
||||
device_2_chat.join_chat_button.click()
|
||||
for chat in (device_1_chat, device_2_chat):
|
||||
if not chat.chat_element_by_text(join_system_message).is_element_displayed():
|
||||
self.errors.append('System message after joining group chat is not shown')
|
||||
for chat in (device_1_chat, device_2_chat):
|
||||
chat.send_message("Message from device: %s" % chat.driver.number)
|
||||
message_1 = "Message from device: %s" % device_1_chat.driver.number
|
||||
device_1_chat.send_message(message_1)
|
||||
if device_1_chat.chat_element_by_text(message_1).status != 'delivered':
|
||||
self.errors.append('Message status is not delivered, it is %s!' % device_1_chat.chat_element_by_text(message_1).status)
|
||||
|
||||
device_2_home.put_app_to_background()
|
||||
|
||||
device_2_home.just_fyi('check that PN is received and after tap you are redirected to public chat')
|
||||
device_2_home.open_notification_bar()
|
||||
device_2_home.element_by_text_part("Message from device: %s" % device_1_chat.driver.number).click()
|
||||
device_2_chat.send_message("Message from device: %s" % device_2_chat.driver.number)
|
||||
for chat in (device_1_chat, device_2_chat):
|
||||
for chat_driver in (device_1_chat, device_2_chat):
|
||||
if not chat.chat_element_by_text(
|
||||
|
|
|
@ -57,32 +57,39 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
|
|||
@marks.critical
|
||||
def test_unread_messages_counter_public_chat(self):
|
||||
self.create_drivers(2)
|
||||
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
home_1, home_2 = device_1.create_user(), device_2.create_user()
|
||||
driver_2 = self.drivers[1]
|
||||
home_1, home_2 = SignInView(self.drivers[0]).create_user(), SignInView(self.drivers[1]).create_user()
|
||||
|
||||
chat_name = home_1.get_random_chat_name()
|
||||
chat_1, chat_2 = home_1.join_public_chat(chat_name), home_2.join_public_chat(chat_name)
|
||||
home_1.get_back_to_home_view()
|
||||
message, message_2 = 'test message', 'test message2'
|
||||
chat_2.send_message(message)
|
||||
|
||||
message = 'test message'
|
||||
chat_2.chat_message_input.send_keys(message)
|
||||
chat_2.send_message_button.click()
|
||||
|
||||
home_1.just_fyi("Check unread message indicator on home, on chat element and that it is not shown after reading messages")
|
||||
if not home_1.home_button.public_unread_messages.is_element_displayed():
|
||||
self.errors.append('New messages public chat badge is not shown on Home button')
|
||||
|
||||
chat_element = home_1.get_chat('#' + chat_name)
|
||||
if not chat_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append('New messages counter is not shown in public chat')
|
||||
|
||||
chat_element.click()
|
||||
home_1.get_back_to_home_view()
|
||||
home_1.home_button.double_click()
|
||||
|
||||
if home_1.home_button.public_unread_messages.is_element_displayed():
|
||||
self.errors.append('New messages public chat badge is shown on Home button')
|
||||
if chat_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append('Unread messages badge is shown in public chat while while there are no unread messages')
|
||||
[home.get_chat('#' + chat_name).click() for home in (home_1,home_2)]
|
||||
chat_1.send_message(message_2)
|
||||
chat_2.chat_element_by_text(message_2).wait_for_element(20)
|
||||
|
||||
home_2.just_fyi("Check that unread message indicator is not reappeared after relogin")
|
||||
driver_2.close_app()
|
||||
driver_2.launch_app()
|
||||
SignInView(driver_2).sign_in()
|
||||
chat_element = home_2.get_chat('#' + chat_name)
|
||||
if chat_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append('New messages counter is shown after relogin')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6270)
|
||||
|
|
Loading…
Reference in New Issue