e2e: fixes, umbrella issue update
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
fd894dc339
commit
b63117845a
|
@ -31,7 +31,7 @@ Upgrade (e2e):
|
|||
- [ ] 3. Update [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) with release notes (make PR based on previous step)
|
||||
- [ ] 4. Create release branch using this [guide](https://github.com/status-im/status-react/blob/develop/doc/RELEASE_GUIDE.md), bump VERSION (merge created PR ([example](https://github.com/status-im/status-react/pull/12504) ) to develop) and get successful release builds (so, testing can be started)
|
||||
- [ ] 5. Based on release scope, ask for comms (Jonny)
|
||||
- [ ] 6. Make sure that assets (screenshots, video) in stores are up to date. If should be updated, ask @cammellos for help
|
||||
- [ ] 6. Make sure that assets (screenshots, video) in stores are up-to-date, more info [here](https://notes.status.im/how-to-update-assets)
|
||||
|
||||
#### 2) Testing
|
||||
[comment]: # (Section will be maintained by QA)
|
||||
|
@ -53,14 +53,15 @@ Upgrade (e2e):
|
|||
|
||||
#### 3) Submission
|
||||
|
||||
- [ ] 1. Release notes written and added (500 character limit for updates (Android) and PR for [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) is ready to be merged (from 1.3 step)
|
||||
- [ ] 2. Submit beta version for Android (Open Testing in Play Store)
|
||||
- [ ] 3. Submit iOS build to Apple review ([instruction](https://drive.google.com/file/d/10Cl7PBB7TFPkZiVbfzdFGpfMRP9bxXuq/view?usp=sharing), be careful - low quality of audio)
|
||||
- [ ] 4. Play store content reviewed and updated
|
||||
- [ ] 5. Privacy policy reviewed and updated (ask in channel)
|
||||
- [ ] 6. Countries to be excluded (ask in channel)
|
||||
- [ ] 7. Changes to our FAQ made (should be checked and if any changes needed, ask Jakub to made them)
|
||||
- [ ] 8. Prepare PR for F-droid build ([instruction]( https://github.com/status-im/status-react/blob/develop/doc/FDROID.md))
|
||||
- [ ] 1. Prepare PR for F-droid build ([instruction]( https://github.com/status-im/status-react/blob/develop/doc/FDROID.md))
|
||||
- [ ] 2. Release notes written and added (500 character limit for updates (Android) and PR for [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) is ready to be merged (from 1.3 step)
|
||||
- [ ] 3. Submit beta version for Android (Open Testing in Play Store)
|
||||
- [ ] 4. Submit iOS build to Apple review ([instruction](https://drive.google.com/file/d/10Cl7PBB7TFPkZiVbfzdFGpfMRP9bxXuq/view?usp=sharing), be careful - low quality of audio)
|
||||
- [ ] 5. Play store content reviewed and updated
|
||||
- [ ] 6. Privacy policy reviewed and updated (ask in channel)
|
||||
- [ ] 7. Countries to be excluded (ask in channel)
|
||||
- [ ] 8. Changes to our FAQ made (should be checked and if any changes needed, ask Jakub to made them)
|
||||
|
||||
|
||||
#### 4) Before publishing
|
||||
- [ ] 1. Translations for comms available (marketing, ask in the channel)
|
||||
|
|
|
@ -455,7 +455,7 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
if not keycard.element_by_translation_id("new-pin-description").is_element_displayed():
|
||||
self.driver.fail("Screen for setting new pin is not shown!")
|
||||
[keycard.enter_another_pin() for _ in range(2)]
|
||||
if not keycard.element_by_translation_id("pin-changed").is_element_displayed():
|
||||
if not keycard.element_by_translation_id("pin-changed").is_element_displayed(30):
|
||||
self.driver.fail("Popup about successful setting new PIN is not shown!")
|
||||
keycard.ok_button.click()
|
||||
|
||||
|
@ -468,7 +468,7 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
if not keycard.element_by_translation_id("repeat-puk").is_element_displayed():
|
||||
self.driver.fail("Confirmation screen for setting new puk is not shown!")
|
||||
[keycard.one_button.click() for _ in range(12)]
|
||||
if not keycard.element_by_translation_id("puk-changed").is_element_displayed():
|
||||
if not keycard.element_by_translation_id("puk-changed").is_element_displayed(30):
|
||||
self.driver.fail("Popup about successful setting new PUK is not shown!")
|
||||
keycard.ok_button.click()
|
||||
|
||||
|
@ -481,7 +481,7 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
self.errors.append("No error is shown when pairing codes don't match")
|
||||
sign_in.confirm_your_password_input.delete_last_symbols(1)
|
||||
sign_in.element_by_translation_id("change-pairing").click()
|
||||
if not keycard.element_by_translation_id("pairing-changed").is_element_displayed():
|
||||
if not keycard.element_by_translation_id("pairing-changed").is_element_displayed(30):
|
||||
self.driver.fail("Popup about successful setting new pairing is not shown!")
|
||||
keycard.ok_button.click()
|
||||
|
||||
|
|
|
@ -128,8 +128,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
profile.share_via_messenger()
|
||||
if not profile.element_by_text_part(public_key).is_element_present():
|
||||
self.errors.append("Can't share public key")
|
||||
[profile.click_system_back_button() for _ in range(2)]
|
||||
profile.close_share_popup()
|
||||
profile.click_system_back_button()
|
||||
|
||||
home.just_fyi("Check that can paste contact code in chat message input")
|
||||
home = profile.home_button.click()
|
||||
|
@ -140,7 +139,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
if input_text not in public_key or len(input_text) < 1:
|
||||
self.errors.append('Public key was not copied')
|
||||
chat.chat_message_input.clear()
|
||||
chat.get_back_to_home_view()
|
||||
chat.home_button.click()
|
||||
|
||||
home.just_fyi("Copying wallet address")
|
||||
wallet = profile.wallet_button.click()
|
||||
|
@ -155,8 +154,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
wallet.share_via_messenger()
|
||||
if not wallet.element_by_text_part(address).is_element_present():
|
||||
self.errors.append("Can't share address")
|
||||
[wallet.click_system_back_button() for _ in range(2)]
|
||||
wallet.close_share_popup()
|
||||
wallet.click_system_back_button()
|
||||
|
||||
home.just_fyi("Check that can paste wallet address in chat message input")
|
||||
wallet.home_button.click()
|
||||
|
|
|
@ -8,212 +8,6 @@ import emoji
|
|||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.xdist_group(name="group_chat_3")
|
||||
class TestPublicChatMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
|
||||
@classmethod
|
||||
def setup_class(cls):
|
||||
cls.drivers, cls.loop = create_shared_drivers(3)
|
||||
cls.message_before_adding = 'message before adding new user'
|
||||
cls.message_to_admin = 'Hey, admin!'
|
||||
|
||||
cls.homes, cls.public_keys, cls.usernames, cls.chats = {}, {}, {}, {}
|
||||
for key in cls.drivers:
|
||||
sign_in = SignInView(cls.drivers[key])
|
||||
cls.homes[key] = sign_in.create_user(enable_notifications=True)
|
||||
cls.public_keys[key], cls.usernames[key] = sign_in.get_public_key_and_username(True)
|
||||
sign_in.home_button.click()
|
||||
cls.chat_name = cls.homes[0].get_random_chat_name()
|
||||
|
||||
cls.homes[0].just_fyi('Admin adds future members to contacts')
|
||||
for i in range(1, 3):
|
||||
cls.homes[0].add_contact(cls.public_keys[i])
|
||||
cls.homes[0].home_button.double_click()
|
||||
|
||||
cls.homes[0].just_fyi('Member adds admin to contacts to see PNs and put app in background')
|
||||
cls.homes[1].add_contact(cls.public_keys[0])
|
||||
cls.homes[1].home_button.double_click()
|
||||
|
||||
cls.homes[0].just_fyi('Admin creates group chat')
|
||||
cls.chats[0] = cls.homes[0].create_group_chat([cls.usernames[1]], cls.chat_name)
|
||||
for i in range(1, 3):
|
||||
cls.chats[i] = ChatView(cls.drivers[i])
|
||||
|
||||
cls.chats[0].send_message(cls.message_before_adding)
|
||||
|
||||
@marks.testrail_id(3994)
|
||||
@marks.critical
|
||||
def test_group_pn_system_messages_when_invited(self):
|
||||
self.homes[1].just_fyi("Check system messages in PNs")
|
||||
self.homes[1].put_app_to_background()
|
||||
self.homes[1].open_notification_bar()
|
||||
pns = [self.chats[0].pn_invited_to_group_chat(self.usernames[0], self.chat_name),
|
||||
self.chats[0].pn_wants_you_to_join_to_group_chat(self.usernames[0], self.chat_name)]
|
||||
for pn in pns:
|
||||
if not self.homes[1].get_pn(pn):
|
||||
self.errors.append('%s is not shown after invite to group chat' % pn)
|
||||
if self.homes[1].get_pn(pns[0]):
|
||||
group_invite_pn = self.homes[1].get_pn(pns[0])
|
||||
group_invite_pn.click()
|
||||
else:
|
||||
self.homes[1].click_system_back_button(2)
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
|
||||
self.homes[1].just_fyi("Check system messages in group chat for admin and member")
|
||||
create_system_message = self.chats[0].create_system_message(self.usernames[0], self.chat_name)
|
||||
invite_system_message = self.chats[0].invite_system_message(self.usernames[0], self.usernames[1])
|
||||
|
||||
invited_to_join = self.chats[0].invited_to_join_system_message(self.usernames[0], self.chat_name)
|
||||
create_for_admin_system_message = self.chats[0].create_for_admin_system_message(self.chat_name)
|
||||
for message in [create_for_admin_system_message, create_system_message, invite_system_message]:
|
||||
if not self.chats[0].chat_element_by_text(message):
|
||||
self.errors.append('%s system message is not shown' % message)
|
||||
for message in [invited_to_join, create_system_message, invite_system_message]:
|
||||
if not self.chats[1].chat_element_by_text(message):
|
||||
self.errors.append('%s system message is not shown' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700731)
|
||||
@marks.critical
|
||||
def test_group_join_send_text_messages_pn(self):
|
||||
message_to_admin = self.message_to_admin
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
|
||||
self.chats[1].just_fyi('Join to group chat')
|
||||
join_system_message = self.chats[1].join_system_message(self.usernames[1])
|
||||
self.chats[1].join_chat_button.click()
|
||||
if not self.chats[1].chat_element_by_text(join_system_message).is_element_displayed(30):
|
||||
self.drivers[1].fail('System message after joining group chat is not shown')
|
||||
self.chats[1].send_message(message_to_admin)
|
||||
|
||||
self.chats[0].just_fyi('check that PN is received and after tap you are redirected to group chat')
|
||||
self.chats[0].open_notification_bar()
|
||||
pn = self.homes[0].get_pn(message_to_admin)
|
||||
if pn:
|
||||
pn.click()
|
||||
else:
|
||||
self.homes[0].click_system_back_button()
|
||||
self.homes[0].get_chat(self.chat_name).click()
|
||||
|
||||
self.chats[1].just_fyi('Check message status and message delivery')
|
||||
message_status = self.chats[1].chat_element_by_text(message_to_admin).status
|
||||
if message_status != 'delivered':
|
||||
self.errors.append('Message status is not delivered, it is %s!' % message_status)
|
||||
for message in (join_system_message, message_to_admin):
|
||||
if not self.chats[0].chat_element_by_text(message).is_element_displayed(30):
|
||||
self.drivers[0].fail('Message %s was not received by admin' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700732)
|
||||
@marks.critical
|
||||
def test_group_add_new_member_activity_centre(self):
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[0].get_chat(self.chat_name).click()
|
||||
self.chats[0].add_members_to_group_chat([self.usernames[2]])
|
||||
|
||||
self.chats[2].just_fyi("Check there will be no PN but unread in AC if got invite from non-contact")
|
||||
if not self.homes[2].notifications_unread_badge.is_element_displayed(60):
|
||||
self.drivers[2].fail("Group chat is not appeared in AC!")
|
||||
self.homes[2].open_notification_bar()
|
||||
if self.homes[2].element_by_text_part(self.usernames[0]).is_element_displayed():
|
||||
self.errors.append("PN about group chat invite is shown when invited by non-contact")
|
||||
self.homes[2].click_system_back_button()
|
||||
self.homes[2].get_chat(self.chat_name).click()
|
||||
self.chats[2].join_chat_button.click()
|
||||
for message in (self.message_to_admin, self.message_before_adding):
|
||||
if self.chats[2].chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append('%s is shown for new user' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(3998)
|
||||
@marks.critical
|
||||
def test_group_offline_pn(self):
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
chat_name = 'for_offline_pn'
|
||||
self.homes[0].create_group_chat([self.usernames[1], self.usernames[2]], chat_name)
|
||||
self.homes[0].home_button.double_click()
|
||||
for i in range(1, 3):
|
||||
self.homes[i].get_chat(chat_name).click()
|
||||
self.chats[i].join_chat_button.click()
|
||||
message_1, message_2 = 'message from old member', 'message from new member'
|
||||
|
||||
self.homes[0].just_fyi("Put admin device to offline and send messages from members")
|
||||
self.homes[0].toggle_airplane_mode()
|
||||
self.chats[1].send_message(message_1)
|
||||
self.chats[2].send_message(message_2)
|
||||
|
||||
self.homes[0].just_fyi("Put admin device to online and check that messages and PNs will be fetched")
|
||||
self.homes[0].toggle_airplane_mode()
|
||||
self.homes[0].connection_offline_icon.wait_for_invisibility_of_element(60)
|
||||
self.homes[0].open_notification_bar()
|
||||
for message in (message_1, message_2):
|
||||
if not self.homes[0].get_pn(message):
|
||||
self.errors.append('%s PN was not fetched from offline' % message)
|
||||
self.homes[0].click_system_back_button()
|
||||
unread_group = self.homes[0].get_chat(chat_name)
|
||||
if not unread_group.new_messages_counter.text == '2':
|
||||
self.errors.append('%s does not match unread messages' % unread_group.new_messages_counter.text)
|
||||
unread_group.click()
|
||||
|
||||
self.homes[0].just_fyi("check that messages are shown for every member")
|
||||
for i in range(3):
|
||||
for message in (message_1, message_2):
|
||||
if not self.chats[i].chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append('%s if not shown for device %s' % (message, str(i)))
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5756)
|
||||
@marks.critical
|
||||
def test_group_decline_invite_chat_highligted(self):
|
||||
chat_name = 'for_invited'
|
||||
left_system_message = self.chats[0].leave_system_message(self.usernames[1])
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[0].create_group_chat([self.usernames[1]], chat_name)
|
||||
|
||||
self.homes[1].just_fyi("Check that new group chat from contact is highlited")
|
||||
chat_2_element = self.homes[1].get_chat(chat_name)
|
||||
if chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
|
||||
self.errors.append("Preview message is not hightligted or text is not shown! ")
|
||||
chat_2 = self.homes[1].get_chat(chat_name).click()
|
||||
chat_2.home_button.click()
|
||||
if not chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
|
||||
self.errors.append("Preview message is still hightligted after opening! ")
|
||||
self.homes[1].get_chat(chat_name).click()
|
||||
chat_2.decline_invitation_button.click()
|
||||
if self.chats[0].chat_element_by_text(left_system_message).is_element_displayed():
|
||||
self.errors.append('System message when user declined invite is shown')
|
||||
if self.homes[1].element_by_text(chat_name).is_element_displayed():
|
||||
self.errors.append("Group chat '%s' is shown, but user declined invite" % chat_name)
|
||||
|
||||
self.homes[0].just_fyi('Send message after invite is declined and check that it is not reappeared')
|
||||
message = 'sent after leaving'
|
||||
self.chats[0].send_message(message)
|
||||
if self.homes[1].element_by_text(chat_name).is_element_displayed():
|
||||
self.errors.append("Group chat '%s' reappeared when new message is sent" % chat_name)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(3997)
|
||||
@marks.critical
|
||||
def test_group_leave_relogin(self):
|
||||
self.drivers[2].quit()
|
||||
[self.homes[i].home_button.double_click() for i in range(2)]
|
||||
self.homes[0].home_button.double_click()
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
join_button = self.chats[1].join_chat_button
|
||||
if join_button.is_element_displayed():
|
||||
join_button.click()
|
||||
|
||||
self.homes[0].just_fyi("Admin deleted chat via long press")
|
||||
self.homes[0].leave_chat_long_press(self.chat_name)
|
||||
|
||||
self.homes[0].just_fyi("Member sends some message, admin relogins and check chat does not reappear")
|
||||
self.chats[1].send_message(self.message_to_admin)
|
||||
self.homes[0].relogin()
|
||||
if self.homes[0].get_chat_from_home_view(self.chat_name).is_element_displayed():
|
||||
self.drivers[0].fail('Deleted %s is present after relaunch app' % self.chat_name)
|
||||
|
||||
|
||||
class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5694)
|
||||
|
|
|
@ -1,10 +1,218 @@
|
|||
import pytest
|
||||
from tests import marks
|
||||
from tests.base_test_case import MultipleDeviceTestCase
|
||||
from tests.base_test_case import MultipleDeviceTestCase, MultipleSharedDeviceTestCase, create_shared_drivers
|
||||
from tests.users import transaction_senders, basic_user, ens_user, ens_user_ropsten
|
||||
from views.sign_in_view import SignInView
|
||||
from views.chat_view import ChatView
|
||||
|
||||
|
||||
# TODO: moved here until resolve of 13048
|
||||
@pytest.mark.xdist_group(name="group_chat_3")
|
||||
class TestPublicChatMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
|
||||
@classmethod
|
||||
def setup_class(cls):
|
||||
cls.drivers, cls.loop = create_shared_drivers(3)
|
||||
cls.message_before_adding = 'message before adding new user'
|
||||
cls.message_to_admin = 'Hey, admin!'
|
||||
|
||||
cls.homes, cls.public_keys, cls.usernames, cls.chats = {}, {}, {}, {}
|
||||
for key in cls.drivers:
|
||||
sign_in = SignInView(cls.drivers[key])
|
||||
cls.homes[key] = sign_in.create_user(enable_notifications=True)
|
||||
cls.public_keys[key], cls.usernames[key] = sign_in.get_public_key_and_username(True)
|
||||
sign_in.home_button.click()
|
||||
cls.chat_name = cls.homes[0].get_random_chat_name()
|
||||
|
||||
cls.homes[0].just_fyi('Admin adds future members to contacts')
|
||||
for i in range(1, 3):
|
||||
cls.homes[0].add_contact(cls.public_keys[i])
|
||||
cls.homes[0].home_button.double_click()
|
||||
|
||||
cls.homes[0].just_fyi('Member adds admin to contacts to see PNs and put app in background')
|
||||
cls.homes[1].add_contact(cls.public_keys[0])
|
||||
cls.homes[1].home_button.double_click()
|
||||
|
||||
cls.homes[0].just_fyi('Admin creates group chat')
|
||||
cls.chats[0] = cls.homes[0].create_group_chat([cls.usernames[1]], cls.chat_name)
|
||||
for i in range(1, 3):
|
||||
cls.chats[i] = ChatView(cls.drivers[i])
|
||||
|
||||
cls.chats[0].send_message(cls.message_before_adding)
|
||||
|
||||
@marks.testrail_id(3994)
|
||||
@marks.critical
|
||||
def test_group_pn_system_messages_when_invited(self):
|
||||
self.homes[1].just_fyi("Check system messages in PNs")
|
||||
self.homes[1].put_app_to_background()
|
||||
self.homes[1].open_notification_bar()
|
||||
pns = [self.chats[0].pn_invited_to_group_chat(self.usernames[0], self.chat_name),
|
||||
self.chats[0].pn_wants_you_to_join_to_group_chat(self.usernames[0], self.chat_name)]
|
||||
for pn in pns:
|
||||
if not self.homes[1].get_pn(pn):
|
||||
self.errors.append('%s is not shown after invite to group chat' % pn)
|
||||
if self.homes[1].get_pn(pns[0]):
|
||||
group_invite_pn = self.homes[1].get_pn(pns[0])
|
||||
group_invite_pn.click()
|
||||
else:
|
||||
self.homes[1].click_system_back_button(2)
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
|
||||
self.homes[1].just_fyi("Check system messages in group chat for admin and member")
|
||||
create_system_message = self.chats[0].create_system_message(self.usernames[0], self.chat_name)
|
||||
invite_system_message = self.chats[0].invite_system_message(self.usernames[0], self.usernames[1])
|
||||
|
||||
invited_to_join = self.chats[0].invited_to_join_system_message(self.usernames[0], self.chat_name)
|
||||
create_for_admin_system_message = self.chats[0].create_for_admin_system_message(self.chat_name)
|
||||
for message in [create_for_admin_system_message, create_system_message, invite_system_message]:
|
||||
if not self.chats[0].chat_element_by_text(message):
|
||||
self.errors.append('%s system message is not shown' % message)
|
||||
for message in [invited_to_join, create_system_message, invite_system_message]:
|
||||
if not self.chats[1].chat_element_by_text(message):
|
||||
self.errors.append('%s system message is not shown' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700731)
|
||||
@marks.critical
|
||||
def test_group_join_send_text_messages_pn(self):
|
||||
message_to_admin = self.message_to_admin
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
|
||||
self.chats[1].just_fyi('Join to group chat')
|
||||
join_system_message = self.chats[1].join_system_message(self.usernames[1])
|
||||
self.chats[1].join_chat_button.click()
|
||||
if not self.chats[1].chat_element_by_text(join_system_message).is_element_displayed(30):
|
||||
self.drivers[1].fail('System message after joining group chat is not shown')
|
||||
self.chats[1].send_message(message_to_admin)
|
||||
|
||||
self.chats[0].just_fyi('check that PN is received and after tap you are redirected to group chat')
|
||||
self.chats[0].open_notification_bar()
|
||||
pn = self.homes[0].get_pn(message_to_admin)
|
||||
if pn:
|
||||
pn.click()
|
||||
else:
|
||||
self.homes[0].click_system_back_button()
|
||||
self.homes[0].get_chat(self.chat_name).click()
|
||||
|
||||
self.chats[1].just_fyi('Check message status and message delivery')
|
||||
message_status = self.chats[1].chat_element_by_text(message_to_admin).status
|
||||
if message_status != 'delivered':
|
||||
self.errors.append('Message status is not delivered, it is %s!' % message_status)
|
||||
for message in (join_system_message, message_to_admin):
|
||||
if not self.chats[0].chat_element_by_text(message).is_element_displayed(30):
|
||||
self.drivers[0].fail('Message %s was not received by admin' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700732)
|
||||
@marks.critical
|
||||
def test_group_add_new_member_activity_centre(self):
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[0].get_chat(self.chat_name).click()
|
||||
self.chats[0].add_members_to_group_chat([self.usernames[2]])
|
||||
|
||||
self.chats[2].just_fyi("Check there will be no PN but unread in AC if got invite from non-contact")
|
||||
if not self.homes[2].notifications_unread_badge.is_element_displayed(60):
|
||||
self.drivers[2].fail("Group chat is not appeared in AC!")
|
||||
self.homes[2].open_notification_bar()
|
||||
if self.homes[2].element_by_text_part(self.usernames[0]).is_element_displayed():
|
||||
self.errors.append("PN about group chat invite is shown when invited by non-contact")
|
||||
self.homes[2].click_system_back_button()
|
||||
self.homes[2].get_chat(self.chat_name).click()
|
||||
self.chats[2].join_chat_button.click()
|
||||
for message in (self.message_to_admin, self.message_before_adding):
|
||||
if self.chats[2].chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append('%s is shown for new user' % message)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(3998)
|
||||
@marks.critical
|
||||
def test_group_offline_pn(self):
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
chat_name = 'for_offline_pn'
|
||||
self.homes[0].create_group_chat([self.usernames[1], self.usernames[2]], chat_name)
|
||||
self.homes[0].home_button.double_click()
|
||||
for i in range(1, 3):
|
||||
self.homes[i].get_chat(chat_name).click()
|
||||
self.chats[i].join_chat_button.click()
|
||||
message_1, message_2 = 'message from old member', 'message from new member'
|
||||
|
||||
self.homes[0].just_fyi("Put admin device to offline and send messages from members")
|
||||
self.homes[0].toggle_airplane_mode()
|
||||
self.chats[1].send_message(message_1)
|
||||
self.chats[2].send_message(message_2)
|
||||
|
||||
self.homes[0].just_fyi("Put admin device to online and check that messages and PNs will be fetched")
|
||||
self.homes[0].toggle_airplane_mode()
|
||||
self.homes[0].connection_offline_icon.wait_for_invisibility_of_element(60)
|
||||
self.homes[0].open_notification_bar()
|
||||
for message in (message_1, message_2):
|
||||
if not self.homes[0].get_pn(message):
|
||||
self.errors.append('%s PN was not fetched from offline' % message)
|
||||
self.homes[0].click_system_back_button()
|
||||
unread_group = self.homes[0].get_chat(chat_name)
|
||||
if not unread_group.new_messages_counter.text == '2':
|
||||
self.errors.append('%s does not match unread messages' % unread_group.new_messages_counter.text)
|
||||
unread_group.click()
|
||||
|
||||
self.homes[0].just_fyi("check that messages are shown for every member")
|
||||
for i in range(3):
|
||||
for message in (message_1, message_2):
|
||||
if not self.chats[i].chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append('%s if not shown for device %s' % (message, str(i)))
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5756)
|
||||
@marks.critical
|
||||
def test_group_decline_invite_chat_highligted(self):
|
||||
chat_name = 'for_invited'
|
||||
left_system_message = self.chats[0].leave_system_message(self.usernames[1])
|
||||
[self.homes[i].home_button.double_click() for i in range(3)]
|
||||
self.homes[0].create_group_chat([self.usernames[1]], chat_name)
|
||||
|
||||
self.homes[1].just_fyi("Check that new group chat from contact is highlited")
|
||||
chat_2_element = self.homes[1].get_chat(chat_name)
|
||||
if chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
|
||||
self.errors.append("Preview message is not hightligted or text is not shown! ")
|
||||
chat_2 = self.homes[1].get_chat(chat_name).click()
|
||||
chat_2.home_button.click()
|
||||
if not chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
|
||||
self.errors.append("Preview message is still hightligted after opening! ")
|
||||
self.homes[1].get_chat(chat_name).click()
|
||||
chat_2.decline_invitation_button.click()
|
||||
if self.chats[0].chat_element_by_text(left_system_message).is_element_displayed():
|
||||
self.errors.append('System message when user declined invite is shown')
|
||||
if self.homes[1].element_by_text(chat_name).is_element_displayed():
|
||||
self.errors.append("Group chat '%s' is shown, but user declined invite" % chat_name)
|
||||
|
||||
self.homes[0].just_fyi('Send message after invite is declined and check that it is not reappeared')
|
||||
message = 'sent after leaving'
|
||||
self.chats[0].send_message(message)
|
||||
if self.homes[1].element_by_text(chat_name).is_element_displayed():
|
||||
self.errors.append("Group chat '%s' reappeared when new message is sent" % chat_name)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(3997)
|
||||
@marks.critical
|
||||
def test_group_leave_relogin(self):
|
||||
self.drivers[2].quit()
|
||||
[self.homes[i].home_button.double_click() for i in range(2)]
|
||||
self.homes[0].home_button.double_click()
|
||||
self.homes[1].get_chat(self.chat_name).click()
|
||||
join_button = self.chats[1].join_chat_button
|
||||
if join_button.is_element_displayed():
|
||||
join_button.click()
|
||||
|
||||
self.homes[0].just_fyi("Admin deleted chat via long press")
|
||||
self.homes[0].leave_chat_long_press(self.chat_name)
|
||||
|
||||
self.homes[0].just_fyi("Member sends some message, admin relogins and check chat does not reappear")
|
||||
self.chats[1].send_message(self.message_to_admin)
|
||||
self.homes[0].relogin()
|
||||
if self.homes[0].get_chat_from_home_view(self.chat_name).is_element_displayed():
|
||||
self.drivers[0].fail('Deleted %s is present after relaunch app' % self.chat_name)
|
||||
|
||||
|
||||
class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5762)
|
||||
|
|
Loading…
Reference in New Issue