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

Improve last message preview #15613

Merged
merged 1 commit into from
May 8, 2023
Merged

Improve last message preview #15613

merged 1 commit into from
May 8, 2023

Conversation

vkjr
Copy link
Contributor

@vkjr vkjr commented Apr 10, 2023

fixes #15281, #14543

Summary

The last message preview was extended to generate correct preview text for: photos, audio, pinned messages, audio, etc.
Related status-go PR extended chat preview structure with more fields to make previews aligned with designs.

Screenshot 2023-04-16 at 19 25 55

Review notes

Testing notes

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Apr 10, 2023

Jenkins Builds

Click to see older builds (84)
Commit #️⃣ Finished (UTC) Duration Platform Result
f5c6d74 #1 2023-04-10 15:45:58 ~26 sec android-e2e 📄log
f5c6d74 #1 2023-04-10 15:46:02 ~25 sec tests 📄log
f5c6d74 #1 2023-04-10 15:46:11 ~39 sec android 📄log
f5c6d74 #1 2023-04-10 15:46:18 ~41 sec ios 📄log
b99dd46 #2 2023-04-10 15:59:14 ~6 min tests 📄log
✔️ b99dd46 #2 2023-04-10 16:03:22 ~10 min android-e2e 🤖apk 📲
✔️ b99dd46 #2 2023-04-10 16:03:28 ~10 min ios 📱ipa 📲
✔️ b99dd46 #2 2023-04-10 16:03:49 ~10 min android 🤖apk 📲
7a5850a #3 2023-04-11 10:39:42 ~5 min tests 📄log
✔️ 7a5850a #3 2023-04-11 10:43:31 ~9 min ios 📱ipa 📲
✔️ 7a5850a #3 2023-04-11 10:45:20 ~10 min android-e2e 🤖apk 📲
✔️ 7a5850a #3 2023-04-11 10:45:44 ~11 min android 🤖apk 📲
4cf1633 #4 2023-04-11 21:40:38 ~4 min tests 📄log
✔️ 4cf1633 #4 2023-04-11 21:44:43 ~8 min ios 📱ipa 📲
✔️ 4cf1633 #4 2023-04-11 21:46:45 ~11 min android-e2e 🤖apk 📲
✔️ 4cf1633 #4 2023-04-11 21:46:54 ~11 min android 🤖apk 📲
c226864 #5 2023-04-12 14:59:02 ~12 sec android-e2e 📄log
c226864 #5 2023-04-12 14:59:05 ~11 sec android 📄log
c226864 #5 2023-04-12 14:59:05 ~11 sec ios 📄log
c226864 #5 2023-04-12 14:59:08 ~13 sec tests 📄log
e8ab2a6 #6 2023-04-12 16:54:22 ~4 min tests 📄log
✔️ e8ab2a6 #6 2023-04-12 16:58:01 ~8 min android-e2e 🤖apk 📲
✔️ e8ab2a6 #6 2023-04-12 16:58:06 ~8 min android 🤖apk 📲
✔️ e8ab2a6 #6 2023-04-12 16:58:09 ~8 min ios 📱ipa 📲
6d9f377 #7 2023-04-13 11:23:43 ~3 min tests 📄log
✔️ 6d9f377 #7 2023-04-13 11:26:19 ~6 min android-e2e 🤖apk 📲
✔️ 6d9f377 #7 2023-04-13 11:26:24 ~6 min android 🤖apk 📲
✔️ 6d9f377 #7 2023-04-13 11:27:26 ~7 min ios 📱ipa 📲
de66164 #8 2023-04-14 14:20:12 ~4 min tests 📄log
✔️ de66164 #8 2023-04-14 14:24:13 ~8 min android 🤖apk 📲
✔️ de66164 #8 2023-04-14 14:24:18 ~8 min android-e2e 🤖apk 📲
✔️ de66164 #8 2023-04-14 14:25:14 ~9 min ios 📱ipa 📲
c585c20 #9 2023-04-14 14:57:05 ~5 min tests 📄log
✔️ c585c20 #9 2023-04-14 14:59:39 ~8 min android 🤖apk 📲
✔️ c585c20 #9 2023-04-14 15:00:16 ~8 min android-e2e 🤖apk 📲
✔️ c585c20 #9 2023-04-14 15:01:55 ~10 min ios 📱ipa 📲
f531449 #10 2023-04-14 15:33:01 ~6 min tests 📄log
✔️ f531449 #10 2023-04-14 15:34:31 ~7 min android 🤖apk 📲
✔️ f531449 #10 2023-04-14 15:35:43 ~8 min android-e2e 🤖apk 📲
✔️ f531449 #10 2023-04-14 15:37:16 ~10 min ios 📱ipa 📲
✔️ 3955eec #11 2023-04-16 18:06:53 ~7 min tests 📄log
✔️ 3955eec #11 2023-04-16 18:07:43 ~8 min android-e2e 🤖apk 📲
✔️ 3955eec #11 2023-04-16 18:07:47 ~8 min android 🤖apk 📲
✔️ 3955eec #11 2023-04-16 18:08:10 ~9 min ios 📱ipa 📲
✔️ 6fbd5f5 #12 2023-04-18 11:36:51 ~5 min android-e2e 🤖apk 📲
✔️ 6fbd5f5 #12 2023-04-18 11:39:48 ~8 min tests 📄log
✔️ 6fbd5f5 #12 2023-04-18 11:39:58 ~8 min ios 📱ipa 📲
✔️ 6fbd5f5 #12 2023-04-18 11:40:33 ~9 min android 🤖apk 📲
✔️ 5f7e42f #13 2023-04-18 12:10:25 ~5 min android-e2e 🤖apk 📲
✔️ 5f7e42f #13 2023-04-18 12:12:43 ~8 min tests 📄log
✔️ 5f7e42f #13 2023-04-18 12:13:27 ~8 min android 🤖apk 📲
✔️ 5f7e42f #13 2023-04-18 12:15:29 ~10 min ios 📱ipa 📲
✔️ 3f06fac #14 2023-04-18 14:39:44 ~6 min android 🤖apk 📲
✔️ 3f06fac #14 2023-04-18 14:39:46 ~6 min android-e2e 🤖apk 📲
✔️ 3f06fac #14 2023-04-18 14:41:11 ~7 min ios 📱ipa 📲
✔️ 3f06fac #14 2023-04-18 14:41:36 ~8 min tests 📄log
✔️ 6efa292 #15 2023-04-18 17:07:02 ~5 min android 🤖apk 📲
✔️ 6efa292 #15 2023-04-18 17:07:22 ~6 min tests 📄log
✔️ 6efa292 #15 2023-04-18 17:08:14 ~6 min ios 📱ipa 📲
✔️ 6efa292 #15 2023-04-18 17:08:30 ~7 min android-e2e 🤖apk 📲
✔️ e90c80b #16 2023-04-20 13:54:55 ~10 min tests 📄log
✔️ e90c80b #16 2023-04-20 13:55:39 ~11 min android-e2e 🤖apk 📲
✔️ e90c80b #16 2023-04-20 13:56:30 ~12 min android 🤖apk 📲
✔️ e90c80b #16 2023-04-20 14:24:39 ~40 min ios 📱ipa 📲
✔️ 6309626 #17 2023-04-20 15:22:46 ~5 min android 🤖apk 📲
✔️ 6309626 #17 2023-04-20 15:23:49 ~6 min ios 📱ipa 📲
✔️ 6309626 #17 2023-04-20 15:24:26 ~7 min tests 📄log
✔️ 6309626 #17 2023-04-20 15:25:47 ~8 min android-e2e 🤖apk 📲
✔️ c6a31a1 #18 2023-04-21 10:42:13 ~5 min android 🤖apk 📲
✔️ c6a31a1 #18 2023-04-21 10:46:16 ~9 min tests 📄log
✔️ c6a31a1 #18 2023-04-21 10:46:48 ~9 min android-e2e 🤖apk 📲
✔️ c6a31a1 #18 2023-04-21 10:47:05 ~10 min ios 📱ipa 📲
✔️ c8eb4f2 #19 2023-05-01 10:42:58 ~7 min android 🤖apk 📲
✔️ c8eb4f2 #19 2023-05-01 10:43:41 ~8 min tests 📄log
✔️ c8eb4f2 #19 2023-05-01 10:43:57 ~8 min ios 📱ipa 📲
✔️ c8eb4f2 #19 2023-05-01 10:44:17 ~9 min android-e2e 🤖apk 📲
f3cf4e0 #20 2023-05-05 14:16:11 ~3 min android-e2e 📄log
f3cf4e0 #20 2023-05-05 14:16:24 ~3 min tests 📄log
f3cf4e0 #20 2023-05-05 14:16:27 ~3 min android 📄log
f3cf4e0 #20 2023-05-05 14:40:33 ~27 min ios 📄log
✔️ 65a3683 #21 2023-05-05 15:03:14 ~20 min android-e2e 🤖apk 📲
✔️ 65a3683 #21 2023-05-05 15:10:38 ~27 min tests 📄log
✔️ 65a3683 #21 2023-05-05 15:11:00 ~27 min android 🤖apk 📲
✔️ 65a3683 #21 2023-05-05 15:18:58 ~35 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 41ff397 #22 2023-05-05 15:34:46 ~9 min ios 📱ipa 📲
✔️ 41ff397 #22 2023-05-05 15:43:22 ~17 min android-e2e 🤖apk 📲
✔️ 41ff397 #22 2023-05-05 15:43:59 ~18 min android 🤖apk 📲
✔️ 41ff397 #22 2023-05-05 15:46:19 ~20 min tests 📄log
✔️ b3e8ed4 #24 2023-05-08 17:20:06 ~7 min android 🤖apk 📲
✔️ b3e8ed4 #24 2023-05-08 17:20:38 ~8 min ios 📱ipa 📲
✔️ b3e8ed4 #24 2023-05-08 17:21:05 ~8 min android-e2e 🤖apk 📲
✔️ b3e8ed4 #24 2023-05-08 17:21:12 ~8 min tests 📄log

@vkjr vkjr force-pushed the messages_preview_issues branch 2 times, most recently from b99dd46 to 7a5850a Compare April 11, 2023 10:34
@vkjr vkjr force-pushed the messages_preview_issues branch 3 times, most recently from f531449 to 3955eec Compare April 16, 2023 17:58
@vkjr vkjr changed the title wip Improve last message preview Apr 16, 2023
Makefile Outdated
@@ -273,7 +273,7 @@ run-android: export TARGET := android
run-android: ##@run Build Android APK and start it on the device
npx react-native run-android --appIdSuffix debug

SIMULATOR=iPhone 13
SIMULATOR=iPhone 14
Copy link
Member

Choose a reason for hiding this comment

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

could you pls elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I upgraded to the latest macOS and latest XCode and now my system complains that I don't have iPhone 13, so I made a local change to Makefile and forgot to remove it)
Btw, what iPhone version do you use on the simulator? Wondering if a lot of us have similar local changes locally, maybe we can make it to a Makefile.

Copy link
Member

Choose a reason for hiding this comment

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

we all should use iPhone 11 Pro because it has the same size as Figma designs but I usually use make run-ios SIMULATOR="iPhone 11 Pro" btw you can always add any version of simulator, im wondering how this SIMULATOR value is used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is used to set the version if it is not provided directly, I believe:

ifneq ("$(SIMULATOR)", "")
	npx react-native run-ios --simulator="$(SIMULATOR)"
else

@@ -1,12 +1,15 @@
(ns status-im2.contexts.chat.home.chat-list-item.view
(:require [clojure.string :as string]
[quo2.core :as quo]
(:require [quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[utils.datetime :as datetime]
[status-im2.common.home.actions.view :as actions] ;;TODO move to status-im2
Copy link
Member

Choose a reason for hiding this comment

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

could you pls remove ;;TODO move to status-im2

(reagent/create-class
{:component-did-mount
(fn [_]
(rf/dispatch [:pin-message/load-pin-messages chat-id]))
Copy link
Member

Choose a reason for hiding this comment

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

could you pls elaborate on why we want this here and only once when mount?

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 need the details of the pinned message to extract text for message preview. But they are loaded only when chat opened, so I've added this call, to get them earlier. And I wanted to reduce the number of calls in case of re-rendering, but after your question I think maybe it is worth calling on every re-render because it can be caused because the last message changed. Wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

@vkjr, calling once seems alright to me if the last message will change anyway due to signals emitted by status-go, or isn't it the case?

Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering why it isn't a part of the last message itself? it looks wrong and not performant to load pin messages for all chats

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ilmotta, appears that it is better to be called on render because while the messages list is updated by signal, the pinned messages don't and that causes issue.

@flexsurfer, agree, let me check if I'll be able to pass the whole last message along with the chat preview from status-go instead of separate fields.

Copy link
Member

@flexsurfer flexsurfer Apr 18, 2023

Choose a reason for hiding this comment

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

we changed this because of performance, we don't want an entire message, sometimes it's too heavy, so we just need to add fields we need

(let [{:keys [parsed-text text]} content]
(if parsed-text (parsed-text-to-one-line parsed-text) text)))


Copy link
Member

Choose a reason for hiding this comment

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

extra line

(str sent-photos ": " content-text)
sent-photos))


Copy link
Member

Choose a reason for hiding this comment

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

extra line

(defn last-message-preview
"Render the preview of a last message to a maximum of max-subheader-length characters"
[chat-id _]
(reagent/create-class
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible, it'd be good if we could use hooks, since we can achieve the same results without the React lifecycle methods.

"Render the preview of a last message to a maximum of max-subheader-length characters"
[chat-id {:keys [content-type content outgoing album-images-count] :as message}]

(rf/dispatch [:pin-message/load-pin-messages chat-id])
Copy link
Contributor

Choose a reason for hiding this comment

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

mmh, this does not look right, we should not be dispatching in a render, why do you need to do this exactly? probably we can avoid doing this by returning the data you need directly from status-go

Copy link
Contributor

@cammellos cammellos left a comment

Choose a reason for hiding this comment

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

I think dispatching in a render it's not something we can afford, as it will be triggered many times an unpredictably, we probably want to find a better solution (no side effects in render)

(str (i18n/label :t/Pinned) " " pinned-content-text))
(if outgoing
(i18n/label :t/you-pinned-a-message)
(i18n/label :t/Pinned-a-message))))
Copy link
Contributor

Choose a reason for hiding this comment

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

capital P, I think we use lowercase for keys, not sure if we want to change the behavior

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 already had a few similar translations which are different only in capitalized first letter, so I followed similar pattern , because we already have translation for "pinned messages" but with lowercase "p".

@cammellos
Copy link
Contributor

I see what the issue is, @vkjr I'd suggest descoping full text pinned messages preview for now, until we find a better solution, for now, I'd go for the case when there's no text, so you don't need to subscribe/load, and if you don't mind we can create an issue and address separately, what do you think?
Thank you

@vkjr
Copy link
Contributor Author

vkjr commented Apr 18, 2023

I see what the issue is, @vkjr I'd suggest descoping full text pinned messages preview for now, until we find a better solution, for now, I'd go for the case when there's no text, so you don't need to subscribe/load, and if you don't mind we can create an issue and address separately, what do you think? Thank you

Sure, thanks!

@cammellos cammellos self-requested a review April 18, 2023 14:05
@vkjr
Copy link
Contributor Author

vkjr commented Apr 18, 2023

Separate issue #15683 created for the preview of pinned messages

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

    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 (26)

    Click to expand

    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

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

    @vkjr
    Copy link
    Contributor Author

    vkjr commented Apr 19, 2023

    @qoqobolo, thank you for checking! As far as I get, groups weren't in the original scope of the issue, it was all about chats. So I suspect we can move your finding in a separate issue, wdyt?

    @qoqobolo
    Copy link
    Contributor

    @vkjr as I can see in the description of the original issue for both issue 1 and issue 2, step 1 is: Go to 1-1 or group chat. Also, the type of chat is not specified in the titles.
    So I assume group chats are also in the scope of the issue, however, if you think it would be better not to include them in the current PR, we can add that separately.

    @vkjr
    Copy link
    Contributor Author

    vkjr commented Apr 19, 2023

    @qoqobolo, you are right, I missed groups in steps) Will fix it here

    @vkjr
    Copy link
    Contributor Author

    vkjr commented Apr 20, 2023

    @qoqobolo, message previews for groups are fixed. Also, there is a fix for #14543

    @qoqobolo
    Copy link
    Contributor

    @vkjr cool thank you, will check shortly!
    Could you update status-go-version to resolve a conflict in the meantime, please?

    @vkjr
    Copy link
    Contributor Author

    vkjr commented Apr 21, 2023

    @qoqobolo, thanks! Rebased.

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Apr 21, 2023

    Thanks @vkjr!
    There are a few more issues and things that need to be aligned with the design.

    ISSUE 2: Replies

    The word Replied is missed.

    Expected result:

    1-1 chat
    Screenshot 2023-04-21 at 13 08 59

    Group
    Screenshot 2023-04-21 at 13 09 11

    Actual result:

    1-1 chat
    Screenshot 2023-04-21 at 13 09 35

    Group
    Screenshot 2023-04-21 at 13 09 47


    ISSUE 3: Mentions

    We should display @ in the preview for mentions.

    Expected result:

    1-1 chat
    Screenshot 2023-04-21 at 13 15 17

    Group
    Screenshot 2023-04-21 at 13 15 42

    Actual result:

    1-1 and group

    Screenshot 2023-04-21 at 13 17 09


    ISSUE 4: Pinned messages

    We should display the content of the pinned message

    Expected result:

    1-1 chat
    Screenshot 2023-04-21 at 13 20 53

    Group
    Screenshot 2023-04-21 at 13 21 12

    Actual result:

    1-1 and group
    Screenshot 2023-04-21 at 13 22 00


    ISSUE 5: Deleted messages

    A system message should be displayed

    Expected result:
    1-1 chat
    Screenshot 2023-04-21 at 13 24 53

    Group
    Screenshot 2023-04-21 at 13 25 04

    Actual result:
    The previous message is shown instead


    ISSUE 6: The user name is deleted from the preview if the message was edited in group chats

    Steps:

    1. UserA: open the chat screen
    2. UserB: send a message and edit it
    3. UserA: check the preview
    IMG_1421.MP4

    ISSUE 7: Nicknames are not displayed in a group chat preview

    Steps:

    1. UserA: add a nickname for UserB, open the chat screen, pay attention to the group chat
    2. UserB: send a message to the group chat
    IMG_1417.MP4

    @vkjr
    Copy link
    Contributor Author

    vkjr commented Apr 21, 2023

    @qoqobolo, thank you for the findings!
    p.s. problem 4 was earlier moved to the separate issue #15683 due to implementation complexities.

    @qoqobolo
    Copy link
    Contributor

    problem 4 was earlier moved to the separate issue #15683 due to implementation complexities.

    Ah sorry! So carried away that I forgot about it, although I saw the comments above 😅

    @vkjr vkjr force-pushed the messages_preview_issues branch 3 times, most recently from 65a3683 to 41ff397 Compare May 5, 2023 15:25
    @vkjr
    Copy link
    Contributor Author

    vkjr commented May 5, 2023

    @qoqobolo, the issues were fixed, could you please recheck when have time? Thanks!

    @status-im-auto
    Copy link
    Member

    81% of end-end tests have passed

    Total executed tests: 31
    Failed tests: 6
    Passed tests: 25
    
    IDs of failed tests: 702851,702838,702957,702958,703133,702850 
    

    Failed tests (6)

    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:461: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:927: 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 TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find Button by accessibility id: show-profiles
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:403: in test_restore_multiaccount_with_waku_backup_remove_switch
        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))]))
     admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    E    Pending community RC1 testing community was not restored from waku-backup!
    E    Contact Chu_QA was not restored from backup!
    



    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957

    Device 2: Type @ to ChatMessageInput
    Device 2: Find SendMessageButton by accessibility id: send-message-button

    medium/test_activity_center.py:259: in test_activity_center_mentions
        self.channel_2.send_message_button.click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: SendMessageButton by accessibility id: `send-message-button` is not found on the screen
    



    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Device 2: Clearing history in chat 'user1' by long press
    Device 2: Looking for chat: 'user1'

    medium/test_activity_center.py:290: in test_activity_center_admin_notification_accept_swipe
        self.home_2.clear_chat_long_press(self.username_1)
    ../views/home_view.py:450: in clear_chat_long_press
        self.get_chat(username).long_press_element()
    ../views/base_element.py:292: in long_press_element
        element = self.find_element()
    ../views/home_view.py:65: 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: ChatElement by xpath:`//*[@content-desc='chat-name-text'][starts-with(@text,'user1')]/..` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 2: Find Button by accessibility id: new-chat-button
    Device 2: Find Button by accessibility id: add-a-contact

    medium/test_activity_center.py:78: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.home_2.add_contact(self.public_key_1, remove_from_contacts=True)
    ../views/home_view.py:336: in add_contact
        self.add_a_contact_chat_bottom_sheet_button.click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `add-a-contact` is not found on the screen
    



    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850

    Device 2: Looking for activity center element: 'sender'
    Device 2: Find Button by xpath: //*[contains(@text, 'sender')]/ancestor::*[@content-desc='activity']//*[@content-desc="activity-message-body"]

    medium/test_activity_center.py:68: in test_activity_center_contact_request_decline
        if activity_center_element.message_body.text != self.home_2.get_translation_by_key("add-me-to-your-contacts"):
    ../views/base_element.py:209: in text
        return self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Button by xpath: `//*[contains(@text, 'sender')]/ancestor::*[@content-desc='activity']//*[@content-desc="activity-message-body"]` is not found on the screen 
    

    [[Blocked by 15500]]

    Device sessions

    Passed tests (25)

    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_mark_all_messages_as_read, id: 703086
    Device sessions

    6. test_community_mentions_push_notification, id: 702786
    Device sessions

    7. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    8. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    9. 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_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    3. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_pin_messages, id: 702731
    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

    8. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    9. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

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

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented May 8, 2023

    Thanks for the great work @vkjr!
    PR can be merged.

    @vkjr vkjr force-pushed the messages_preview_issues branch from 41ff397 to e405d38 Compare May 8, 2023 17:11
    @vkjr vkjr force-pushed the messages_preview_issues branch from e405d38 to b3e8ed4 Compare May 8, 2023 17:12
    @vkjr vkjr merged commit c78bdda into develop May 8, 2023
    @vkjr vkjr deleted the messages_preview_issues branch May 8, 2023 17:37
    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.

    Messages preview issues
    6 participants