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

Fix replies & pinned messages #15689

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Conversation

cammellos
Copy link
Contributor

@cammellos cammellos commented Apr 19, 2023

Both replies and pinned messages relied on subscribing their data from messages.

This worked only as long as we loaded the message in the database, so it would break say if another user replied to a message that wasn't in the current user view.

It also changes the way pinned messages are handled, before the notification was actually sent over the wire, but that's unnecessary, since it can be generated locally on both parts.
This is a bit of a breaking change with the previous version, since if you pin a message with this version, older version will not see a system message. this can be easily fixed by restoring the previous behavior of sending the message, but not sure it's worth it.

it also adds the ability to Delete message for everyone that have Deleted for me (discussed with John) and the ability of unpin messages that have been deleted for me.

I will add a couple of unit tests to validate the new features, but in the meantime I would like to get it through the testing pipeline as likely there will be some issues to address.

status-go PR status-im/status-go#3414

I wanted to move the UI code, but it's already quite a few changes so I wanted to minimize disruptions.

Area to tests (communities/group-chat/1-to-1):

  1. Pin messages
  2. Pin old messages
  3. Reply to messages
  4. Reply to old messages
  5. Delete replied to messages, both locally and for everyone
  6. Delete pinned messages, both locally and everyone

I'll try to address this in this PR, but I think it should be ok to address separately, if qa is happy with it.

@cammellos cammellos self-assigned this Apr 19, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Apr 19, 2023

Jenkins Builds

Click to see older builds (63)
Commit #️⃣ Finished (UTC) Duration Platform Result
8dcd6ff #1 2023-04-19 16:25:06 ~5 min tests 📄log
✔️ 8dcd6ff #1 2023-04-19 16:27:09 ~7 min android 🤖apk 📲
✔️ 8dcd6ff #1 2023-04-19 16:28:01 ~8 min android-e2e 🤖apk 📲
✔️ 8dcd6ff #1 2023-04-19 16:49:04 ~29 min ios 📱ipa 📲
77e91d3 #2 2023-04-19 19:10:05 ~4 min tests 📄log
✔️ 77e91d3 #2 2023-04-19 19:13:51 ~8 min android 🤖apk 📲
✔️ 77e91d3 #2 2023-04-19 19:13:54 ~8 min android-e2e 🤖apk 📲
✔️ 77e91d3 #2 2023-04-19 19:14:34 ~9 min ios 📱ipa 📲
3cd2980 #3 2023-04-19 19:42:56 ~4 min tests 📄log
✔️ 3cd2980 #3 2023-04-19 19:45:20 ~6 min ios 📱ipa 📲
✔️ 3cd2980 #3 2023-04-19 19:46:07 ~7 min android 🤖apk 📲
✔️ 3cd2980 #3 2023-04-19 19:46:28 ~7 min android-e2e 🤖apk 📲
✔️ ac20367 #5 2023-04-19 20:28:58 ~8 min android 🤖apk 📲
✔️ ac20367 #5 2023-04-19 20:29:17 ~8 min android-e2e 🤖apk 📲
✔️ ac20367 #5 2023-04-19 20:29:28 ~8 min ios 📱ipa 📲
✔️ e30823c #6 2023-04-20 06:51:29 ~6 min tests 📄log
✔️ e30823c #6 2023-04-20 06:53:34 ~9 min android-e2e 🤖apk 📲
✔️ e30823c #6 2023-04-20 06:53:37 ~9 min android 🤖apk 📲
✔️ e30823c #6 2023-04-20 06:57:47 ~13 min ios 📱ipa 📲
3fbc185 #7 2023-04-20 09:07:28 ~4 min tests 📄log
✔️ 3fbc185 #7 2023-04-20 09:09:12 ~6 min android 🤖apk 📲
✔️ 3fbc185 #7 2023-04-20 09:10:19 ~7 min android-e2e 🤖apk 📲
✔️ 3fbc185 #7 2023-04-20 09:12:19 ~9 min ios 📱ipa 📲
✔️ 93dc328 #8 2023-04-20 09:51:27 ~5 min android 🤖apk 📲
✔️ 93dc328 #8 2023-04-20 09:53:04 ~7 min tests 📄log
✔️ 93dc328 #8 2023-04-20 09:53:25 ~7 min ios 📱ipa 📲
✔️ 93dc328 #8 2023-04-20 09:55:04 ~9 min android-e2e 🤖apk 📲
✔️ 5cd1f9b #9 2023-04-20 10:03:40 ~5 min android-e2e 🤖apk 📲
✔️ 5cd1f9b #9 2023-04-20 10:04:50 ~6 min ios 📱ipa 📲
✔️ 5cd1f9b #9 2023-04-20 10:05:11 ~6 min android 🤖apk 📲
✔️ 5cd1f9b #9 2023-04-20 10:05:14 ~6 min tests 📄log
✔️ e1bf52a #10 2023-04-20 14:17:57 ~14 min android 🤖apk 📲
✔️ e1bf52a #10 2023-04-20 14:18:08 ~14 min android-e2e 🤖apk 📲
✔️ e1bf52a #10 2023-04-20 14:18:21 ~15 min tests 📄log
✔️ e1bf52a #10 2023-04-20 14:42:28 ~39 min ios 📱ipa 📲
✔️ 280cb5d #11 2023-04-20 16:09:04 ~7 min android-e2e 🤖apk 📲
✔️ 280cb5d #11 2023-04-20 16:09:58 ~8 min ios 📱ipa 📲
✔️ 280cb5d #11 2023-04-20 16:10:16 ~9 min tests 📄log
✔️ 280cb5d #11 2023-04-20 16:10:49 ~9 min android 🤖apk 📲
✔️ b17dd3b #12 2023-04-21 10:03:08 ~7 min android-e2e 🤖apk 📲
✔️ b17dd3b #12 2023-04-21 10:04:05 ~8 min ios 📱ipa 📲
✔️ b17dd3b #12 2023-04-21 10:04:16 ~8 min tests 📄log
✔️ b17dd3b #12 2023-04-21 10:04:33 ~9 min android 🤖apk 📲
✔️ facf6a7 #13 2023-04-21 13:48:13 ~6 min tests 📄log
✔️ facf6a7 #13 2023-04-21 13:49:08 ~7 min android-e2e 🤖apk 📲
✔️ facf6a7 #13 2023-04-21 13:50:44 ~9 min android 🤖apk 📲
✔️ facf6a7 #13 2023-04-21 13:50:50 ~9 min ios 📱ipa 📲
db0082d #15 2023-04-21 16:15:30 ~5 min tests 📄log
✔️ db0082d #15 2023-04-21 16:18:20 ~7 min android 🤖apk 📲
✔️ db0082d #15 2023-04-21 16:18:42 ~8 min android-e2e 🤖apk 📲
✔️ db0082d #15 2023-04-21 16:18:46 ~8 min ios 📱ipa 📲
✔️ 70a3295 #16 2023-04-24 08:46:55 ~5 min android-e2e 🤖apk 📲
70a3295 #16 2023-04-24 08:47:06 ~5 min tests 📄log
✔️ 70a3295 #16 2023-04-24 08:49:19 ~8 min ios 📱ipa 📲
✔️ 70a3295 #16 2023-04-24 08:49:59 ~8 min android 🤖apk 📲
✔️ 1f95e84 #17 2023-04-24 09:11:15 ~6 min ios 📱ipa 📲
✔️ 1f95e84 #17 2023-04-24 09:12:29 ~7 min android 🤖apk 📲
✔️ 1f95e84 #17 2023-04-24 09:14:04 ~9 min tests 📄log
✔️ 1f95e84 #17 2023-04-24 09:14:28 ~9 min android-e2e 🤖apk 📲
✔️ 136ba12 #18 2023-04-24 11:14:52 ~6 min tests 📄log
✔️ 136ba12 #18 2023-04-24 11:16:13 ~8 min ios 📱ipa 📲
✔️ 136ba12 #18 2023-04-24 11:16:52 ~8 min android 🤖apk 📲
✔️ 136ba12 #18 2023-04-24 11:16:52 ~8 min android-e2e 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4e8a3f6 #19 2023-04-24 15:54:41 ~5 min tests 📄log
✔️ 4e8a3f6 #19 2023-04-24 15:55:10 ~6 min ios 📱ipa 📲
✔️ 4e8a3f6 #19 2023-04-24 15:55:23 ~6 min android-e2e 🤖apk 📲
✔️ 4e8a3f6 #19 2023-04-24 15:55:27 ~6 min android 🤖apk 📲
✔️ ed776e4 #21 2023-04-25 11:22:56 ~6 min android 🤖apk 📲
✔️ ed776e4 #21 2023-04-25 11:22:59 ~6 min android-e2e 🤖apk 📲
✔️ ed776e4 #21 2023-04-25 11:23:28 ~7 min tests 📄log
✔️ ed776e4 #21 2023-04-25 11:24:50 ~8 min ios 📱ipa 📲

src/status_im2/subs/chat/messages.cljs Show resolved Hide resolved
src/status_im2/contexts/chat/messages/pin/events.cljs Outdated Show resolved Hide resolved
[quo2.core :as quo]
[status-im2.contexts.chat.messages.avatar.style :as style]))

(defn avatar [from size]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Connected" component https://react-redux.js.org/api/connect , so it can be reused in multiple places without having to subscribe everywhere

@@ -32,16 +32,29 @@
;; TODO this is too expensive, probably we could mark message somehow and just hide it in the UI
(message-list/rebuild-message-list {:db (update-in db [:messages chat-id] dissoc message-id)} chat-id))

(defn add-pinned-message [acc chat-id message-id message]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We check if the message is pinned so we can update it correctly.

@cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch 3 times, most recently from 3cd2980 to d729408 Compare April 19, 2023 20:18
@cammellos cammellos marked this pull request as ready for review April 19, 2023 20:19
@cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch 2 times, most recently from ac20367 to e30823c Compare April 20, 2023 06:44
@cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from e30823c to 3fbc185 Compare April 20, 2023 09:02
[status-im2.contexts.chat.messages.avatar.style :as style]))

(defn avatar
[from size]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes, public-key probably better?

@cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from 3fbc185 to 93dc328 Compare April 20, 2023 09:45
@J-Son89
Copy link
Contributor

J-Son89 commented Apr 20, 2023

I checked out the branch and played around a bit with pinned messages. Looks good to me 👍

@cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from 93dc328 to 5cd1f9b Compare April 20, 2023 09:58
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.

Left only minor comments.

src/status_im/data_store/pin_messages.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/chat/messages/avatar/view.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/chat/messages/pin/events.cljs Outdated Show resolved Hide resolved
@status-im-auto
Copy link
Member

33% of end-end tests have passed

Total executed tests: 3
Failed tests: 2
Passed tests: 1
Not executed tests: 26
IDs of not executed tests: 702730,702782,702731,702745,702813,702855,702733,702783,702807,702732,702808,702838,702843,702839,702840,702841,702844,702894,702845,702786,702846,702742,702936,702947,702957,702958 
IDs of failed tests: 702784,702850 

Not executed tests (26)

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

    Click to expand
  • Rerun failed tests

  • 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 TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784

    Test setup failed: critical/chats/test_1_1_public_chats.py:908: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
     cannot unpack non-iterable NoneType object
    



    Passed tests (1)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    @cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from 5cd1f9b to e1bf52a Compare April 20, 2023 14:02
    @status-im-auto
    Copy link
    Member

    79% of end-end tests have passed

    Total executed tests: 19
    Failed tests: 4
    Passed tests: 15
    Not executed tests: 10
    
    IDs of not executed tests: 702807,702732,702808,702846,702742,702850,702851,702936,702947,702957 
    
    IDs of failed tests: 702838,702958,702731,702745 
    

    Not executed tests (10)

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

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Device 1: Wait for text element `Button` to be equal to `2`
    Device 1: Find `Button` by `xpath`: `//*[@content-desc='pins-count']//android.widget.TextView`

    critical/chats/test_1_1_public_chats.py:1024: in test_1_1_chat_pin_messages
        chat.pinned_messages_count.wait_for_element_text("2",
    ../views/base_element.py:152: in wait_for_element_text
        text_element = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@content-desc='pins-count']//android.widget.TextView` is not found on the screen
    



    Device sessions

    2. 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

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: medium/test_activity_center.py:184: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:304: in create_shared_drivers
        drivers = loop.run_until_complete(start_threads(quantity,
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:22: in start_threads
        returns[k] = await returns[k]
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webdriver.py:267: in __init__
        super().__init__(
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:157: in __init__
        self.start_session(capabilities, browser_profile)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webdriver.py:357: in start_session
        response = self.execute(RemoteCommand.NEW_SESSION, parameters)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:242: in check_response
        raise exception_class(message, screen, stacktrace)
     Sauce could not start your job. For more information on what happened, please visit https://app.eu-central-1.saucelabs.com/tests/4177d422007f4a6cbb5b0481ee736aa2 
    

    [[Blocked by 15500]]

    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

    Passed tests (15)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    2. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    3. test_community_leave, id: 702845
    Device sessions

    4. test_community_message_delete, id: 702839
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    6. test_community_mentions_push_notification, id: 702786
    Device sessions

    7. test_community_unread_messages_badge, id: 702841
    Device sessions

    8. test_community_emoji_send_copy_paste_reply, id: 702840
    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_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    7. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    @status-im-auto
    Copy link
    Member

    83% of end-end tests have passed

    Total executed tests: 29
    Failed tests: 5
    Passed tests: 24
    
    IDs of failed tests: 702957,702732,702731,702838,702850 
    

    Failed tests (5)

    Click to expand
  • Rerun failed tests

  • 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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    # STEP: Unpin one message so that another could be pinned
    Device 1: Find Button by xpath: //*[@text="Unpin from the chat"]

    critical/chats/test_1_1_public_chats.py:1063: in test_1_1_chat_pin_messages
        self.chat_1.element_by_translation_id('unpin-from-chat').click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Unpin from the chat"]` is not found on the screen
    



    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 TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Find Username by xpath: //*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']/android.view.ViewGroup/android.widget.TextView[1]
    Device 2: Username is test user

    critical/test_public_chat_browsing.py:421: in test_community_message_send_check_timestamps_sender_username
        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))]))
     Timestamp is not shown, expected: '12:21 PM, 12:20 PM, 12:19 PM', in fact: '12:18 PM' 
    

    [[blocked by 14797]]

    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 1: Find Button by xpath: //*[@content-desc='pinned-messages-menu']//*[starts-with(@text,'Message 2')]
    Device 1: Find Button by xpath: //*[@text="Unpin from the chat"]

    critical/chats/test_group_chat.py:311: in test_group_chat_pin_messages
        self.chats[0].element_by_translation_id('unpin-from-chat').click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Unpin from the chat"]` is not found on the screen
    



    Device sessions

    Passed tests (24)

    Click to expand

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    3. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    7. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_mentions_push_notification, id: 702786
    Device sessions

    2. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    3. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    6. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_offline_pn, id: 702808
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    @churik
    Copy link
    Member

    churik commented Apr 24, 2023

    @cammellos
    there is an issue that caused failed e2e.

    ISSUE 8: when tapping on pinned message in the bottom sheet, there is no "Unpin" option

    Steps:

    1. pin some message
    2. tap on the pinned banner
    3. long tap on pinned message

    Expected result:
    can see unpin option
    Actual result:
    only pin option is shown

    FILE.2023-04-24.17.13.26.mp4

    OS: IOS, Android

    @cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from 136ba12 to 4e8a3f6 Compare April 24, 2023 15:48
    @cammellos
    Copy link
    Contributor Author

    @churik should be fixed in the last build, thank you!

    @status-im-auto
    Copy link
    Member

    83% of end-end tests have passed

    Total executed tests: 29
    Failed tests: 5
    Passed tests: 24
    
    IDs of failed tests: 702732,702783,702850,702731,702838 
    

    Failed tests (5)

    Click to expand
  • Rerun failed tests

  • 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 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 TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 2: Looking for a pinned by message with text: Message 3
    Device 2: Looking for a pinned by message with text: Message 4

    critical/chats/test_group_chat.py:340: in test_group_chat_pin_messages
        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))]))
     Message 'Message 1' is missed on Pinned messages list for user 1
    E    Message 'Message 3' is missed on Pinned messages list for user 1
    E    Message 'Message 4' is missed on Pinned messages list for user 1
    E    Message 'Message 1' is missed on Pinned messages list for user 2
    E    Message 'Message 3' is missed on Pinned messages list for user 2
    E    Message 'Message 4' is missed on Pinned messages list for user 2
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Device 2: Tap on found: Text
    Device 2: Find Text by xpath: //*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView

    critical/chats/test_1_1_public_chats.py:1298: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        chat_element.wait_for_status_to_be(expected_status='Delivered', timeout=120)
    ../views/chat_view.py:221: in wait_for_status_to_be
        if self.status == expected_status:
    ../views/chat_view.py:212: in status
        status = status_element.text
    ../views/base_element.py:391: in text
        text = self.find_element().text
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:76: in text
        return self._execute(Command.GET_ELEMENT_TEXT)['value']
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:633: in _execute
        return self._parent.execute(command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:31: in check_response
        raise wde
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:26: in check_response
        super().check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:242: in check_response
        raise exception_class(message, screen, stacktrace)
     The element 'By.xpath: //*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView' does not exist in DOM anymore
    



    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731

    Device 1: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView
    Device 2: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView

    critical/chats/test_1_1_public_chats.py:1097: in test_1_1_chat_pin_messages
        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))]))
     Message 'Message 1' is missed on Pinned messages list for user 1
    E    Message 'Message 2' is missed on Pinned messages list for user 1
    E    Message 'Message 1' is missed on Pinned messages list for user 2
    E    Message 'Message 2' is missed on Pinned messages list for user 2
    



    Device sessions

    Passed tests (24)

    Click to expand

    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 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

    4. test_activity_center_mentions, id: 702957
    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 TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_offline_pn, id: 702808
    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_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    @status-im-auto
    Copy link
    Member

    20% of end-end tests have passed

    Total executed tests: 5
    Failed tests: 4
    Passed tests: 1
    
    IDs of failed tests: 702732,702731,702838,702850 
    

    Failed tests (4)

    Click to expand
  • Rerun failed tests

  • 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 TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 2: Looking for a pinned by message with text: Message 3
    Device 2: Looking for a pinned by message with text: Message 4

    critical/chats/test_group_chat.py:340: in test_group_chat_pin_messages
        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))]))
     Message 'Message 1' is missed on Pinned messages list for user 1
    E    Message 'Message 3' is missed on Pinned messages list for user 1
    E    Message 'Message 4' is missed on Pinned messages list for user 1
    E    Message 'Message 1' is missed on Pinned messages list for user 2
    E    Message 'Message 3' is missed on Pinned messages list for user 2
    E    Message 'Message 4' is missed on Pinned messages list for user 2
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Device 1: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView
    Device 2: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView

    critical/chats/test_1_1_public_chats.py:1097: in test_1_1_chat_pin_messages
        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))]))
     Message 'Message 1' is missed on Pinned messages list for user 1
    E    Message 'Message 2' is missed on Pinned messages list for user 1
    E    Message 'Message 1' is missed on Pinned messages list for user 2
    E    Message 'Message 2' is missed on Pinned messages list for user 2
    



    Device sessions

    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

    Passed tests (1)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    @cammellos
    element "pinned-by" is missing in current implementation, if it is not required I need to adjust tests appropriately
    photo_2023-04-25 12 34 17 jpeg 2023-04-25 12-34-52

    @cammellos
    Copy link
    Contributor Author

    @churik I'll fix it, I missed it :)

    @cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch 2 times, most recently from abecbb6 to ed776e4 Compare April 25, 2023 11:16
    @cammellos
    Copy link
    Contributor Author

    @churik it should be fixed, I scheduled a re-run of the tests, thank you

    @status-im-auto
    Copy link
    Member

    50% of end-end tests have passed

    Total executed tests: 4
    Failed tests: 2
    Passed tests: 2
    
    IDs of failed tests: 702838,702850 
    

    Failed tests (2)

    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

    Passed tests (2)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    @cammellos
    Sorry! found one more unexpected behavior.

    ISSUE 9: logs sending is not really working on Android, and the intended mail window is not opened instantly on IOS as well

    Android:

    FILE.2023-04-25.15.27.09.mp4

    IOS:

    FILE.2023-04-25.15.29.41.mp4

    @cammellos
    Copy link
    Contributor Author

    @churik do you have status logs for this issue?
    I think it might not be related to this PR, does it work fine on latest develop? (changes should not impact that part of the codebase, but maybe I made some mistake)

    Thanks!

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    It works on nightly; let me build latest develop just in case
    And no, I can't extract logs because of this issue - only adb is available

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    built the latest develop; it works there and doesn't work in the current PR
    Link: http://status-im-builds.ams3.digitaloceanspaces.com/StatusIm-Mobile-230425-134535-cd69d0-manual-universal.apk

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    UPD: issue 9 could not reproduce (magic???)

    ISSUE 10: error on single tap on a message from the pinned bottom sheet (IOS only)

    Steps:

    1. tap on pinned message inside pinned bottom sheet

    Actual result:

    IMAGE 2023-04-25 16:49:20

    OS: IOS

    Logs:
    logs (33).zip

    @churik
    Copy link
    Member

    churik commented Apr 25, 2023

    Issue 10 will be logged and addressed separately.
    Thank you @cammellos for your patience and hard work and sorry for such a long testing this time.

    status-im/status-go@e8ceed1...213dc46
    
    Both replies and pinned messages relied on subscribing their data from messages.
    
    This worked only as long as we loaded the message in the database, so it would break say if another user replied to a message that wasn't in the current user view.
    
    It also changes the way pinned messages are handled, before the notification was actually sent over the wire, but that's unnecessary, since it can be generated locally on both parts.
    This is a bit of a breaking change with the previous version, since if you pin a message with this version, older version will not see a system message. this can be easily fixed by restoring the previous behavior of sending the message, but not sure it's worth it.
    
    It also adds the ability to Delete message for everyone that have Deleted for me (discussed with John) and the ability of unpin messages that have been deleted for me.
    @cammellos cammellos force-pushed the bug/reply-pinned-messages-fixes branch from ed776e4 to 2438af4 Compare April 25, 2023 15:05
    @cammellos cammellos merged commit 2438af4 into develop Apr 25, 2023
    @cammellos cammellos deleted the bug/reply-pinned-messages-fixes branch April 25, 2023 15:05
    @cammellos
    Copy link
    Contributor Author

    Thank you @VladimrLitvinenko @churik !!!

    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.

    8 participants