Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show "Kicked from community" notification in Activity Center #15734

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

smohamedjavid
Copy link
Member

fixes #15733

Summary

This PR implements the Kicked from community notification in Activity Center

Platforms

  • Android
  • iOS

Steps to test

Prerequisites: User A and User B are mutual contacts. User A is an admin of a closed community and user B is a member.

  • User A kicks out user B from the Community
  • User B receives a notification in Activity Center that he/she has been kicked out.

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Apr 24, 2023

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c31f966 #1 2023-04-24 17:20:32 ~6 min android 🤖apk 📲
✔️ c31f966 #1 2023-04-24 17:21:22 ~6 min android-e2e 🤖apk 📲
✔️ c31f966 #1 2023-04-24 17:21:27 ~6 min tests 📄log
✔️ c31f966 #1 2023-04-24 17:21:38 ~7 min ios 📱ipa 📲
✔️ ca6f158 #2 2023-04-24 18:55:25 ~5 min android 🤖apk 📲
✔️ ca6f158 #2 2023-04-24 18:55:27 ~5 min android-e2e 🤖apk 📲
✔️ ca6f158 #2 2023-04-24 18:55:55 ~6 min ios 📱ipa 📲
✔️ ca6f158 #2 2023-04-24 18:57:12 ~7 min tests 📄log
✔️ eecccfd #4 2023-04-25 16:59:21 ~8 min tests 📄log
✔️ eecccfd #4 2023-04-25 17:00:39 ~9 min android 🤖apk 📲
✔️ eecccfd #4 2023-04-25 17:00:50 ~9 min android-e2e 🤖apk 📲
✔️ eecccfd #4 2023-04-25 17:01:38 ~10 min ios 📱ipa 📲
✔️ 88d55d5 #5 2023-04-25 18:04:41 ~8 min android 🤖apk 📲
✔️ 88d55d5 #5 2023-04-25 18:04:45 ~8 min ios 📱ipa 📲
✔️ 88d55d5 #5 2023-04-25 18:04:58 ~8 min android-e2e 🤖apk 📲
✔️ 88d55d5 #5 2023-04-25 18:05:34 ~9 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 62b8ff4 #6 2023-04-26 11:45:03 ~7 min tests 📄log
✔️ 62b8ff4 #6 2023-04-26 11:46:18 ~8 min android 🤖apk 📲
✔️ 62b8ff4 #6 2023-04-26 11:46:22 ~8 min android-e2e 🤖apk 📲
✔️ 62b8ff4 #6 2023-04-26 12:24:53 ~46 min ios 📱ipa 📲
✔️ 480642a #8 2023-04-26 14:17:25 ~8 min tests 📄log
✔️ 480642a #8 2023-04-26 14:17:47 ~9 min android-e2e 🤖apk 📲
✔️ 480642a #8 2023-04-26 14:18:28 ~9 min android 🤖apk 📲
480642a #8 2023-04-26 14:28:36 ~19 min ios 📄log

Copy link
Member

@flexsurfer flexsurfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

@ilmotta ilmotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@status-im-auto
Copy link
Member

90% of end-end tests have passed

Total executed tests: 29
Failed tests: 3
Passed tests: 26
IDs of failed tests: 702850,702957,702838 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:418: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:923: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

    Device 2: Find Button by accessibility id: tab-recent
    Device 2: Tap on found: Button

    medium/test_activity_center.py:142: in test_activity_center_contact_request_decline
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Username is not shown on 'Add contact' page after entering valid public key 
    

    [[Blocked by 15500]]

    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957

    Device 2: Find ChatMessageInput by accessibility id: chat-message-input
    Device 2: Type @ to ChatMessageInput

    ../views/chat_view.py:1142: in mention_user
        mentions_list = self.mentions_list.wait_for_element()
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `2`: `BaseElement` by` accessibility id`: `mentions-list` is not found on the screen after wait_for_element
    
    During handling of the above exception, another exception occurred:
    medium/test_activity_center.py:341: in test_activity_center_mentions
        self.channel_2.mention_user(self.default_username_1)
    ../views/chat_view.py:1145: in mention_user
        self.driver.fail("Mentions list is not shown")
    base_test_case.py:172: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
    E   Failed: Device 2: Mentions list is not shown 
    

    [[Blocked by 15500]]

    Device sessions

    Passed tests (26)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_leave, id: 702845
    Device sessions

    6. test_community_unread_messages_badge, id: 702841
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    9. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    @pavloburykh pavloburykh self-assigned this Apr 25, 2023
    @pavloburykh
    Copy link
    Contributor

    @smohamedjavid thanx for the PR! Please take a look at the following issue:

    ISSUE 1 Unread counter does not appear on Activity Center icon for new "Kicked from community" notification

    Steps:

    1. User A kicks User B from community
    2. See if unread counter will appear on Activity Center icon for User B

    Actual result: unread counter does not appear despite notification has arrived in AC. Counter will be updated in case some new notifications arrive into AC.

    unread.counter.mp4

    Expected result: unread counter is updated on AC icon when new "Kicked from community" notification arrives.

    @smohamedjavid
    Copy link
    Member Author

    @pavloburykh - Thanks for testing this PR.
    Kindly retest, as the issue has been fixed.

    @churik churik force-pushed the feature/community-kicked-notification branch from 88d55d5 to 62b8ff4 Compare April 26, 2023 11:37
    @status-im-auto
    Copy link
    Member

    72% of end-end tests have passed

    Total executed tests: 25
    Failed tests: 7
    Passed tests: 18
    Not executed tests: 4
    
    IDs of not executed tests: 702846,702742,702850,702851 
    
    IDs of failed tests: 702745,702936,702731,702838,702957,702958,702947 
    

    Not executed tests (4)

    Click to expand
  • Rerun not executed tests
  • Failed tests (7)

    Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:418: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:923: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936

    Device 1: Text is zQ3shbYhwU7Ey6DmYG5LQSXHkSx5ySxQE7fHD6aUYeUMr7wQt
    Device 1: Click system back button

    Test setup failed: medium/test_activity_center.py:191: in prepare_devices
        users = self.loop.run_until_complete(run_in_parallel(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:623: in get_public_key_and_username
        default_username = profile_view.default_username_text.text
    ../views/base_element.py:391: in text
        text = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Text by accessibility id: `default-username` is not found on the screen
    



    Device sessions

    2. test_activity_center_mentions, id: 702957

    Test setup failed: medium/test_activity_center.py:191: in prepare_devices
        users = self.loop.run_until_complete(run_in_parallel(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:623: in get_public_key_and_username
        default_username = profile_view.default_username_text.text
    ../views/base_element.py:391: in text
        text = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Text by accessibility id: `default-username` is not found on the screen 
    

    [[Blocked by 15500]]

    3. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: medium/test_activity_center.py:191: in prepare_devices
        users = self.loop.run_until_complete(run_in_parallel(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:623: in get_public_key_and_username
        default_username = profile_view.default_username_text.text
    ../views/base_element.py:391: in text
        text = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Text by accessibility id: `default-username` is not found on the screen 
    

    [[Blocked by 15500]]

    4. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947

    Test setup failed: medium/test_activity_center.py:191: in prepare_devices
        users = self.loop.run_until_complete(run_in_parallel(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:623: in get_public_key_and_username
        default_username = profile_view.default_username_text.text
    ../views/base_element.py:391: in text
        text = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Text by accessibility id: `default-username` is not found on the screen
    



    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Looking for a message by text: hello
    Device 2: Find TimeStampText by xpath: //*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-timestamp']

    critical/chats/test_1_1_public_chats.py:1118: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        timestamp = self.chat_2.chat_element_by_text(messages[0]).timestamp
    ../views/chat_view.py:162: in timestamp
        return TimeStampText(self.driver, self.locator).text
    ../views/base_element.py:209: in text
        return self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: TimeStampText by xpath: `//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-timestamp']` is not found on the screen
    



    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731

    Device 2: Looking for a message by text: Message 2
    Device 2: Find ChatElementByText by xpath: //*[starts-with(@text,'Message 2')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']

    critical/chats/test_1_1_public_chats.py:1022: in test_1_1_chat_pin_messages
        self.chat_2.pin_message(self.message_2, 'pin-to-chat')
    ../views/chat_view.py:947: in pin_message
        self.chat_element_by_text(message).long_press_until_element_is_shown(element)
    ../views/base_element.py:298: in long_press_until_element_is_shown
        element = self.find_element()
    ../views/chat_view.py:134: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'Message 2')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Passed tests (18)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_unread_messages_badge, id: 702841
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    3. test_community_message_edit, id: 702843
    Device sessions

    4. test_community_message_delete, id: 702839
    Device sessions

    5. test_community_mentions_push_notification, id: 702786
    Device sessions

    6. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    7. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    8. test_community_leave, id: 702845
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_edit_message, id: 702855
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    6. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_pin_messages, id: 702732
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    @pavloburykh
    Copy link
    Contributor

    @pavloburykh - Thanks for testing this PR. Kindly retest, as the issue has been fixed.

    @smohamedjavid thanx for the fix. PR is ready to be merged. Failed e2e are not PR related.

    @smohamedjavid smohamedjavid force-pushed the feature/community-kicked-notification branch from 08cdc8c to 480642a Compare April 26, 2023 14:08
    @smohamedjavid smohamedjavid merged commit 6eb2029 into develop Apr 26, 2023
    @smohamedjavid smohamedjavid deleted the feature/community-kicked-notification branch April 26, 2023 14:26
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Show "Kicked from Community" Notification in Activity Center
    8 participants