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

feat: new text message (1) #15005

Merged
merged 7 commits into from
Feb 20, 2023
Merged

feat: new text message (1) #15005

merged 7 commits into from
Feb 20, 2023

Conversation

OmarBasem
Copy link
Member

fixes: #14975

This PR implements a new text message component with support for styling mentions, links, and basic text formatting.

Note for QA:
Not all formattings are yet supported. Second issue: #15004

@status-im-auto
Copy link
Member

status-im-auto commented Feb 7, 2023

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f3fb626 #1 2023-02-07 05:16:07 ~2 min tests 📄log
✔️ f3fb626 #1 2023-02-07 05:21:22 ~7 min ios 📱ipa 📲
✔️ f3fb626 #1 2023-02-07 05:21:26 ~7 min android-e2e 🤖apk 📲
✔️ f3fb626 #1 2023-02-07 05:21:46 ~7 min android 🤖apk 📲
✔️ 2ec7c6d #2 2023-02-07 09:36:19 ~2 min tests 📄log
✔️ 2ec7c6d #2 2023-02-07 09:41:09 ~7 min ios 📱ipa 📲
✔️ 2ec7c6d #2 2023-02-07 09:41:33 ~7 min android-e2e 🤖apk 📲
✔️ 2ec7c6d #2 2023-02-07 09:42:09 ~8 min android 🤖apk 📲
✔️ 32f0a73 #3 2023-02-08 10:37:28 ~2 min tests 📄log
✔️ 32f0a73 #3 2023-02-08 10:42:48 ~7 min ios 📱ipa 📲
✔️ 32f0a73 #3 2023-02-08 10:42:55 ~7 min android-e2e 🤖apk 📲
✔️ 32f0a73 #3 2023-02-08 10:43:22 ~7 min android 🤖apk 📲
✔️ bb31666 #4 2023-02-08 12:43:11 ~2 min tests 📄log
✔️ bb31666 #4 2023-02-08 12:48:21 ~7 min android-e2e 🤖apk 📲
✔️ bb31666 #4 2023-02-08 12:48:51 ~8 min android 🤖apk 📲
✔️ bb31666 #4 2023-02-08 12:49:36 ~8 min ios 📱ipa 📲
✔️ 50cde07 #5 2023-02-08 15:51:51 ~2 min tests 📄log
✔️ 50cde07 #5 2023-02-08 15:55:36 ~6 min ios 📱ipa 📲
✔️ 50cde07 #5 2023-02-08 15:57:04 ~7 min android-e2e 🤖apk 📲
✔️ 50cde07 #5 2023-02-08 15:57:10 ~7 min android 🤖apk 📲
✔️ 58323b9 #6 2023-02-09 03:28:08 ~2 min tests 📄log
✔️ 58323b9 #6 2023-02-09 03:33:10 ~7 min ios 📱ipa 📲
✔️ 58323b9 #6 2023-02-09 03:33:28 ~7 min android-e2e 🤖apk 📲
✔️ 58323b9 #6 2023-02-09 03:35:32 ~9 min android 🤖apk 📲
✔️ a1d7417 #7 2023-02-10 13:46:00 ~8 min android-e2e 🤖apk 📲
✔️ a1d7417 #7 2023-02-10 13:46:09 ~8 min android 🤖apk 📲
✔️ a1d7417 #7 2023-02-10 13:46:34 ~8 min tests 📄log
✔️ a1d7417 #7 2023-02-10 13:47:32 ~9 min ios 📱ipa 📲
✔️ eba86e8 #8 2023-02-13 09:04:38 ~2 min tests 📄log
✔️ eba86e8 #8 2023-02-13 09:09:25 ~7 min ios 📱ipa 📲
✔️ eba86e8 #8 2023-02-13 09:10:31 ~8 min android-e2e 🤖apk 📲
✔️ eba86e8 #8 2023-02-13 09:10:57 ~8 min android 🤖apk 📲
✔️ 74809f8 #9 2023-02-17 12:54:07 ~2 min tests 📄log
✔️ 74809f8 #9 2023-02-17 12:58:50 ~7 min ios 📱ipa 📲
✔️ 74809f8 #9 2023-02-17 13:00:41 ~9 min android-e2e 🤖apk 📲
✔️ 74809f8 #9 2023-02-17 13:03:05 ~11 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 21e9af5 #10 2023-02-17 15:38:39 ~4 min tests 📄log
✔️ 21e9af5 #10 2023-02-17 15:41:41 ~7 min android-e2e 🤖apk 📲
✔️ 21e9af5 #10 2023-02-17 15:42:30 ~8 min android 🤖apk 📲
✔️ 21e9af5 #10 2023-02-17 15:43:42 ~9 min ios 📱ipa 📲
✔️ 9f7a3d0 #11 2023-02-20 15:12:54 ~2 min tests 📄log
✔️ 9f7a3d0 #11 2023-02-20 15:17:56 ~7 min android-e2e 🤖apk 📲
✔️ 9f7a3d0 #11 2023-02-20 15:18:51 ~8 min android 🤖apk 📲
✔️ 9f7a3d0 #11 2023-02-20 15:19:07 ~8 min ios 📱ipa 📲

:padding-left 10
:border-left-color colors/neutral-40})

(def code
Copy link
Member

Choose a reason for hiding this comment

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

defn


(defn text-content
[message-data context]
[rn/view
[old-message/render-parsed-text message-data]
(render-parsed-text message-data)
Copy link
Member

Choose a reason for hiding this comment

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

( most common mistake in reagent, probably we need to add this to guidelines, cc @ilmotta

Copy link
Member

Choose a reason for hiding this comment

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

it should be [render-parsed-text message-data]

Copy link
Contributor

@ilmotta ilmotta Feb 7, 2023

Choose a reason for hiding this comment

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

This problem you're describing is extremely important I agree, and it's well documented by Reagent and everybody should know. It even has a separate file in their docs https://github.com/reagent-project/reagent/blob/master/doc/UsingSquareBracketsInsteadOfParens.md

I believe this mistake is getting into the territory of "tech stuff everybody should know in status-mobile", so it's not really a guideline to me. Devs need to understand why parentheses is not okay, otherwise they'll make the same mistakes again.

Going on a tangent, have you seen https://github.com/roman01la/uix? It could be an interesting improvement over Reagent. It interprets hiccup much faster than Reagent, and it's still compatible with Reagent. Could be interesting to compare two screens (on written in Reagent and another one using uix) in mobile to see if there's any meaningful performance difference.

Copy link
Contributor

Choose a reason for hiding this comment

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

But after re-reading that official doc I see there's a strong recommendation to use [], but the author gives a bit of room for interpretation. I retract what I said, I'll add to the guidelines as you suggested @flexsurfer

Copy link
Contributor

Choose a reason for hiding this comment

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

Just created new PR with this new recommendation #15008

[from]
(rf/sub [:contacts/contact-name-by-identity from]))

(defn render-inline
Copy link
Member

@flexsurfer flexsurfer Feb 7, 2023

Choose a reason for hiding this comment

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

this looks like a copy from old code? or do we really have all these in new designs ?

Copy link
Member Author

@OmarBasem OmarBasem Feb 7, 2023

Choose a reason for hiding this comment

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

We have them in the designs designs

Copy link
Member

Choose a reason for hiding this comment

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

i believe there is no status tag anymore, also code doesn't look implemented as in designs , not sure about "emph" "strong" "strong-emph" and "del" whats that, would be cool to have table in the description with the screenshot for each case

Copy link
Member Author

Choose a reason for hiding this comment

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

@flexsurfer Removed the status tag. Here is the table.

Emph is italic, strong is bold, del is strikethrough. These differences in names comes from status-go.

Not all cases are implemented yet. There is a second issue: #15004

Copy link
Member

@cammellos cammellos Feb 20, 2023

Choose a reason for hiding this comment

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

I believe it's not in the designs, but #community-channel should be supported, @John-44 @pedro-et is that correct?
@OmarBasem if that's the case, would you mind creating an issue tracking this please?

Copy link
Member Author

Choose a reason for hiding this comment

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

@cammellos do you mean the status-tag? There is a second issue, I can update it to include that also: #15004

Copy link
Member

Choose a reason for hiding this comment

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

@OmarBasem yes, I believe I had recently a discussion with @John-44 / @pedro-et and they didn't mention that we were to remove them, @ibrkhalil has also done some work on it recently (yet unmerged), so I think we will support them (I think desktop does, but I could be wrong), would you mind checking with them directly please?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I will check them 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Got an approval from Pedro that we should support #links to redirect to community channels #15069

Copy link
Contributor

@ibrkhalil ibrkhalil Feb 21, 2023

Choose a reason for hiding this comment

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

Will add them on my PR


(defn mention-element
[from]
(rf/sub [:contacts/contact-name-by-identity from]))
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of this mention-element function? It's currently sort of just "aliasing" the subscription, but there's no hiccup being built.

(defn render-inline
[acc {:keys [type literal destination]}]
(case type
""
Copy link
Contributor

Choose a reason for hiding this comment

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

The "empty type" case is the same as the default one, so this first check can be safely eliminated.

It's also a tad bit more idiomatic to convert the type to a keyword to do the matching.

(case (keyword type)
  :code
  (conj acc [rn/view {:style (merge style/block (style/code))} [quo/text {:weight :code} literal]])

  :emph
  (conj acc [quo/text {:style {:font-style :italic}} literal])

  ...)

(defn render-block
[acc {:keys [type ^js literal children]}]
(case type

Copy link
Contributor

Choose a reason for hiding this comment

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

Extra line

"codeblock"
(conj acc
[rn/view {:style (merge style/block (style/code))}
[quo/text (.substring literal 0 (dec (.-length literal)))]])
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand this is coming from the original code, but since it's open for review and it's quick to change I'll mention: we should use subs instead of substring and count instead of length.

I actually don't understand why literal has a type hint. Every native string in Javascript is automatically supported by ClojureScript.

Isn't literal just a string or did I get it incorrectly?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right @ilmotta



(defn render-block
[acc {:keys [type ^js literal children]}]
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand this function is used in a reducing context in the function render-parsed-text, but this doesn't mean the name acc should carry over here because this function doesn't need to know it's used in a reducing function. acc could be renamed to blocks instead.

I have the same feedback for the function render-inline. acc in that function should be renamed to something better.

acc only makes sense when co-located with the reduce call, they are like bread and butter, but only when close together.

"paragraph"
(conj acc
(reduce
(fn [acc e] (render-inline acc e))
Copy link
Contributor

Choose a reason for hiding this comment

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

It's unnecessary to create an anonymous function. You can just use (reduce render-inline).


(defn render-parsed-text
[{:keys [content]}]
(reduce (fn [acc e]
Copy link
Contributor

Choose a reason for hiding this comment

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

It's unnecessary to create an anonymous function. You can just use (reduce render-inline).

@ilmotta ilmotta mentioned this pull request Feb 7, 2023
ilmotta added a commit that referenced this pull request Feb 7, 2023
- New section: Use [] instead of () in Reagent components: New section after
  this comment #15005 (comment)
- Updated section "Don't use percents to define width/height": reworded to
  follow the style of the rest of the document.
- Update section "Accessibility labels": added example about avoiding dynamic
  labels.
@OmarBasem OmarBasem moved this from REVIEW to E2E Tests in Pipeline for QA Feb 8, 2023
@OmarBasem OmarBasem moved this from E2E Tests to REVIEW in Pipeline for QA Feb 8, 2023
@status-im-auto
Copy link
Member

69% of end-end tests have passed

Total executed tests: 26
Failed tests: 8
Passed tests: 18
IDs of failed tests: 702855,702732,702783,702851,702731,702839,702842,702838 

Failed tests (8)

Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 1: Long press on `Button`
    Device 1: Find `Button` by `xpath`: `//*[@text="Pin to the chat"]`

    critical/chats/test_group_chat.py:316: in test_group_chat_pin_messages
        self.chats[0].pin_message(message, 'pin-to-chat')
    ../views/chat_view.py:875: in pin_message
        self.element_by_translation_id(action).click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Pin to the chat"]` is not found on the screen
    



    Device sessions

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_mentions_in_community_jump_to, id: 702851

    Device 2: Find Button by accessibility id: new-contact-button
    Device 2: Find Button by accessibility id: Add to contacts-item-button

    medium/test_activity_center.py:243: in test_activity_center_mentions_in_community_jump_to
        self.profile_2.add_contact_via_contacts_list(self.public_key_1)
    ../views/profile_view.py:373: in add_contact_via_contacts_list
        chat.profile_add_to_contacts.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `Add to contacts-item-button` is not found on the screen 
    

    [[blocked by 14798]]

    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_delete, id: 702839

    Device 2: Looking for a message by text: delete for me
    Device 1: Looking for a message by text: delete for me

    critical/test_public_chat_browsing.py:668: in test_community_message_delete
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     System message about deletion for everyone is not displayed
    



    Device sessions

    2. test_community_mark_all_messages_as_read, id: 702842

    Device 2: Tap on found: SendMessageButton
    Device 1: Looking for chat: '# fktyeko'

    critical/test_public_chat_browsing.py:782: in test_community_mark_all_messages_as_read
        chan_1_element.long_press_element()
    ../views/base_element.py:278: in long_press_element
        element = self.find_element()
    ../views/home_view.py:51: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:134: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='chat-name-text'][starts-with(@text,'# fktyeko')]/..` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked due to navigation issue 14906]]

    Device sessions

    3. 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:628: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:851: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:134: 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 TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855

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

    critical/chats/test_1_1_public_chats.py:1257: in test_1_1_chat_edit_message
        if chat_element.status != 'edited':
    ../views/chat_view.py:194: in status
        result = re.search('\[(.*) DEBUG\]', Text(self.driver, prefix=self.locator, xpath="//*[contains(@text, 'DEBUG')]").text)
    ../views/base_element.py:361: in text
        text = self.find_element().text
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Text by xpath: `//*[starts-with(@text,'AFTER')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[contains(@text, 'DEBUG')]` is not found on the screen
    



    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

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

    critical/chats/test_1_1_public_chats.py:1337: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        if not (chat_element.status == ':sending' or chat_element.status == ':sent'):
    ../views/chat_view.py:194: in status
        result = re.search('\[(.*) DEBUG\]', Text(self.driver, prefix=self.locator, xpath="//*[contains(@text, 'DEBUG')]").text)
    ../views/base_element.py:361: in text
        text = self.find_element().text
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Text by xpath: `//*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[contains(@text, 'DEBUG')]` is not found on the screen
    



    Device sessions

    3. test_1_1_chat_pin_messages, id: 702731

    Device 2: Long press on Button
    Device 2: Find Button by xpath: //*[@text="Pin to the chat"]

    critical/chats/test_1_1_public_chats.py:1082: in test_1_1_chat_pin_messages
        self.chat_2.pin_message(self.message_2, 'pin-to-chat')
    ../views/chat_view.py:875: in pin_message
        self.element_by_translation_id(action).click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by xpath: `//*[@text="Pin to the chat"]` is not found on the screen
    



    Device sessions

    Passed tests (18)

    Click to expand

    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 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_leave, id: 702845
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_public_chat_open_using_deep_link, id: 702776
    Device sessions

    2. test_deep_link_with_invalid_user_public_key_own_profile_key, id: 702774
    Device sessions

    3. test_deep_link_open_user_profile, id: 702775
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_decline_contact_request_no_pn, id: 702850
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    5. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    6. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    @status-github-bot status-github-bot bot moved this from REVIEW to TO REBASE in Pipeline for QA Feb 9, 2023
    @OmarBasem OmarBasem force-pushed the new-text-message branch 2 times, most recently from 58323b9 to a1d7417 Compare February 10, 2023 13:37
    @OmarBasem OmarBasem moved this from TO REBASE to REVIEW in Pipeline for QA Feb 10, 2023
    @OmarBasem
    Copy link
    Member Author

    Hey QA team @VladimrLitvinenko @pavloburykh @qoqobolo, can I get a review please?

    @VolodLytvynenko
    Copy link
    Contributor

    Hey QA team @VladimrLitvinenko @pavloburykh @qoqobolo, can I get a review please?

    Hi @OmarBasem thank you for PR.

    Please note that the whole QA team is now busy testing the release, so PRs not included in the rc1 scope and will be tested after the release testing is completed.
    Thank you for your understanding and waiting!

    @status-im-auto
    Copy link
    Member

    61% of end-end tests have passed

    Total executed tests: 18
    Failed tests: 7
    Passed tests: 11
    Not executed tests: 8
    
    IDs of not executed tests: 702730,702782,702731,702745,702813,702855,702733,702783 
    
    IDs of failed tests: 702732,702774,702851,702839,702842,702838,702784 
    

    Not executed tests (8)

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

    Click to expand
  • Rerun failed tests

  • Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_mentions_in_community_jump_to, id: 702851

    Device 2: Find `Button` by `accessibility id`: `new-contact-button`
    Device 2: Find `Button` by `accessibility id`: `Add to contacts-item-button`

    medium/test_activity_center.py:243: in test_activity_center_mentions_in_community_jump_to
        self.profile_2.add_contact_via_contacts_list(self.public_key_1)
    ../views/profile_view.py:373: in add_contact_via_contacts_list
        chat.profile_add_to_contacts.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `Add to contacts-item-button` is not found on the screen 
    

    [[blocked by 14798]]

    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_deep_link_with_invalid_user_public_key_own_profile_key, id: 702774

    Device 1: Find Text by accessibility id: default-username
    Device 1: Text is ``

    medium/test_deeplink_chat_share_profile.py:370: in test_deep_link_with_invalid_user_public_key_own_profile_key
        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))]))
     Can't navigate to profile from deep link with own public key
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_delete, id: 702839

    Device 2: Looking for a message by text: delete for me
    Device 1: Looking for a message by text: delete for me

    critical/test_public_chat_browsing.py:668: in test_community_message_delete
        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))]))
     System message about deletion for everyone is not displayed
    



    Device sessions

    2. test_community_mark_all_messages_as_read, id: 702842

    Device 2: Tap on found: SendMessageButton
    Device 1: Looking for chat: '# erbafdd'

    critical/test_public_chat_browsing.py:782: in test_community_mark_all_messages_as_read
        chan_1_element.long_press_element()
    ../views/base_element.py:278: in long_press_element
        element = self.find_element()
    ../views/home_view.py:51: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:134: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='chat-name-text'][starts-with(@text,'# erbafdd')]/..` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked due to navigation issue 14906]]

    Device sessions

    3. 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:628: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:851: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:134: 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 1: Long press on Button
    Device 1: Find Button by xpath: //*[@text="Pin to the chat"]

    critical/chats/test_group_chat.py:316: in test_group_chat_pin_messages
        self.chats[0].pin_message(message, 'pin-to-chat')
    ../views/chat_view.py:875: in pin_message
        self.element_by_translation_id(action).click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Pin to the chat"]` is not found on the screen
    



    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:968: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:302: 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:21: 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:151: 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:225: in start_session
        response = self.execute(RemoteCommand.NEW_SESSION, parameters)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:319: in execute
        response = self.command_executor.execute(driver_command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:376: in execute
        return self._request(command_info[0], url, body=data)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:399: in _request
        resp = self._conn.request(method, url, body=body, headers=headers)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:78: in request
        return self.request_encode_body(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:170: in request_encode_body
        return self.urlopen(method, url, **extra_kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:418: in urlopen
        return self.urlopen(method, redirect_location, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:418: in urlopen
        return self.urlopen(method, redirect_location, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:418: in urlopen
        return self.urlopen(method, redirect_location, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:405: in urlopen
        retries = retries.increment(method, url, response=response, _pool=conn)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/util/retry.py:592: in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
     HTTPSConnectionPool(host='ondemand.eu-central-1.saucelabs.com', port=443): Max retries exceeded with url: https://anton-status:0a8c5013-d483-4872-a894-9b62d6391892@ondemand.eu-central-1.saucelabs.com:443/wd/hub/session/cb33f36c7d2a42f99963ad74008e8eec?ref=e44072c6093545e096ad4d3162c85c6f (Caused by ResponseError('too many redirects'))
    



    Passed tests (11)

    Click to expand

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_decline_contact_request_no_pn, id: 702850
    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_public_chat_open_using_deep_link, id: 702776
    Device sessions

    2. test_deep_link_open_user_profile, id: 702775
    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_leave, id: 702845
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. 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_offline_pn, id: 702808
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @OmarBasem I tried to investigate to figure out the changes that were done in this PR toward the styling mentions, links, and text formatting
    For now, I see in this PR it is shown the same as for the last development [17 Feb 2023] now:
    Actual result:

    • Links are underlined
    • Eth address is shown in the old style (black font)
      image

    Did I understand correctly that it should be shown as in the design now?
    Expected result:

    • Links are not underlined
    • Eth address is shown in a new style (blue font)
      image

    @OmarBasem
    Copy link
    Member Author

    Hi @VladimrLitvinenko, visually the changes in this PR are minor. Fixed the underlining in links. Addresses styling is not part of this PR. There is a second issue: #15004

    @VolodLytvynenko VolodLytvynenko moved this from E2E Tests to IN TESTING in Pipeline for QA Feb 17, 2023
    @VolodLytvynenko VolodLytvynenko moved this from IN TESTING to E2E Tests in Pipeline for QA Feb 17, 2023
    @status-im-auto
    Copy link
    Member

    65% of end-end tests have passed

    Total executed tests: 26
    Failed tests: 9
    Passed tests: 17
    
    IDs of failed tests: 702855,702732,702774,702783,702851,702731,702839,702842,702838 
    

    Failed tests (9)

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 1: Long press on `Button`
    Device 1: Find `Button` by `xpath`: `//*[@text="Pin to the chat"]`

    critical/chats/test_group_chat.py:316: in test_group_chat_pin_messages
        self.chats[0].pin_message(message, 'pin-to-chat')
    ../views/chat_view.py:875: in pin_message
        self.element_by_translation_id(action).click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Pin to the chat"]` is not found on the screen
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855

    Device 2: Long press on Button
    Device 2: Find Button by xpath: //*[@text="Edit message"]

    critical/chats/test_1_1_public_chats.py:1253: in test_1_1_chat_edit_message
        self.chat_2.edit_message_in_chat(message_before_edit_1_1, message_after_edit_1_1)
    ../views/chat_view.py:880: in edit_message_in_chat
        self.element_by_translation_id("edit-message").click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by xpath: `//*[@text="Edit message"]` is not found on the screen
    



    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

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

    critical/chats/test_1_1_public_chats.py:1337: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        if not (chat_element.status == ':sending' or chat_element.status == ':sent'):
    ../views/chat_view.py:194: in status
        result = re.search('\[(.*) DEBUG\]', Text(self.driver, prefix=self.locator, xpath="//*[contains(@text, 'DEBUG')]").text)
    ../views/base_element.py:361: in text
        text = self.find_element().text
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Text by xpath: `//*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[contains(@text, 'DEBUG')]` is not found on the screen
    



    Device sessions

    3. test_1_1_chat_pin_messages, id: 702731

    Device 1: Long press on Button
    Device 1: Find Button by xpath: //*[@text="Pin to the chat"]

    critical/chats/test_1_1_public_chats.py:1111: in test_1_1_chat_pin_messages
        self.chat_1.pin_message(message, 'pin-to-chat')
    ../views/chat_view.py:875: in pin_message
        self.element_by_translation_id(action).click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[@text="Pin to the chat"]` is not found on the screen
    



    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_deep_link_with_invalid_user_public_key_own_profile_key, id: 702774

    Device 1: Find Text by accessibility id: default-username
    Device 1: Text is ``

    medium/test_deeplink_chat_share_profile.py:370: in test_deep_link_with_invalid_user_public_key_own_profile_key
        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))]))
     Can't navigate to profile from deep link with own public key
    



    Device sessions

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_mentions_in_community_jump_to, id: 702851

    Device 2: Find Button by accessibility id: new-contact-button
    Device 2: Find Button by accessibility id: Add to contacts-item-button

    medium/test_activity_center.py:243: in test_activity_center_mentions_in_community_jump_to
        self.profile_2.add_contact_via_contacts_list(self.public_key_1)
    ../views/profile_view.py:373: in add_contact_via_contacts_list
        chat.profile_add_to_contacts.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `Add to contacts-item-button` is not found on the screen 
    

    [[blocked by 14798]]

    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_delete, id: 702839

    Device 2: Looking for a message by text: delete for me
    Device 1: Looking for a message by text: delete for me

    critical/test_public_chat_browsing.py:668: in test_community_message_delete
        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))]))
     System message about deletion for everyone is not displayed
    



    Device sessions

    2. test_community_mark_all_messages_as_read, id: 702842

    Device 2: Tap on found: SendMessageButton
    Device 1: Looking for chat: '# lmngsww'

    critical/test_public_chat_browsing.py:782: in test_community_mark_all_messages_as_read
        chan_1_element.long_press_element()
    ../views/base_element.py:278: in long_press_element
        element = self.find_element()
    ../views/home_view.py:51: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:134: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='chat-name-text'][starts-with(@text,'# lmngsww')]/..` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked due to navigation issue 14906]]

    Device sessions

    3. 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:628: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:851: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:134: 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 (17)

    Click to expand

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

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    5. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    6. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_public_chat_open_using_deep_link, id: 702776
    Device sessions

    2. test_deep_link_open_user_profile, id: 702775
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_decline_contact_request_no_pn, id: 702850
    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_leave, id: 702845
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    VolodLytvynenko commented Feb 17, 2023

    @OmarBasem thank you for PR. The Issue with the link underlining is fixed. I catch only one strange issue which appears only when the email added from my android keyboard hints. Maybe you can see what going with help of logs

    ISSUE 1: <Cannot read property 'substring' of null> error is shown when the email domain is added from the keyboard hints

    Steps to reproduce:

    1. Go to 1-1 chat
    2. Select some email domain from android keyboard hints
      image

    Actual result:
    <Cannot read property 'substring' of null> error is shown

    error.mp4

    Expected result:
    Domain is added without error

    Logs:
    Status.log

    geth.log

    Env: Huawei p20 light, android version 9

    @VolodLytvynenko VolodLytvynenko moved this from E2E Tests to CONTRIBUTOR in Pipeline for QA Feb 17, 2023
    @OmarBasem
    Copy link
    Member Author

    @VladimrLitvinenko that does not seem to be related to this PR. It is a problem with the input. Feel free to open an issue.

    @OmarBasem OmarBasem moved this from CONTRIBUTOR to REVIEW in Pipeline for QA Feb 18, 2023
    @VolodLytvynenko
    Copy link
    Contributor

    @VladimrLitvinenko that does not seem to be related to this PR. It is a problem with the input. Feel free to open an issue.

    Hi, @OmarBasem tried reproducing this issue again to see if it's in development. But it is not reproducible. It looks like this error is only related to this PR. Could you fix it in the scope of this PR?

    @VolodLytvynenko
    Copy link
    Contributor

    Thank you @OmarBasem! It looks like this issue is an OS edge case. Could you merge this PR, please?

    @VolodLytvynenko VolodLytvynenko moved this from REVIEW to MERGE in Pipeline for QA Feb 20, 2023
    @OmarBasem OmarBasem merged commit 3fbb7cb into develop Feb 20, 2023
    Pipeline for QA automation moved this from MERGE to DONE Feb 20, 2023
    @OmarBasem OmarBasem deleted the new-text-message branch February 20, 2023 15:14
    @OmarBasem
    Copy link
    Member Author

    Thanks @VladimrLitvinenko

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    New text message component (1)
    8 participants