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

Implement PR error indicator #18338

Closed
wants to merge 1 commit into from
Closed

Conversation

Parveshdhull
Copy link
Member

@Parveshdhull Parveshdhull commented Jan 2, 2024

Related to https://discord.com/channels/1103692771585433630/1183785336661352449/1183785436833927269

Summary

PR adds a feature that will show a error box if any flow leads to a state where the chat is not closed while closing the chat screen.

To make sure that this doesn't affect testing and development,

  • the feature is only enabled for PR builds,
  • the view don't interfere with touch areas
  • and is easy to remove.

This feature will help qa team to detect this bug while testing the new flow introduced in PRs instead of later noticing the unread indicator.

Probably this is not a very neat solution, but we don't have any alternatives, except the unread indicator, which requires extra effort and can be missed easily.

Video
output-2024-01-04_15.19.06.mp4

Testing

Manual testing is not required

status: addressing feedback

@status-im-auto
Copy link
Member

status-im-auto commented Jan 2, 2024

Jenkins Builds

Click to see older builds (27)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 76e4687 #1 2024-01-02 10:21:21 ~4 min tests 📄log
✔️ 76e4687 #1 2024-01-02 10:22:11 ~5 min ios 📱ipa 📲
✔️ 76e4687 #1 2024-01-02 10:23:24 ~6 min android 🤖apk 📲
✔️ 76e4687 #1 2024-01-02 10:24:27 ~7 min android-e2e 🤖apk 📲
✔️ be2d45b #2 2024-01-02 10:43:20 ~4 min tests 📄log
✔️ be2d45b #2 2024-01-02 10:45:03 ~6 min android-e2e 🤖apk 📲
✔️ be2d45b #2 2024-01-02 10:45:13 ~6 min ios 📱ipa 📲
✔️ be2d45b #2 2024-01-02 10:46:21 ~7 min android 🤖apk 📲
✔️ 87e5c62 #3 2024-01-02 10:57:01 ~4 min tests 📄log
✔️ 87e5c62 #3 2024-01-02 10:57:21 ~5 min ios 📱ipa 📲
✔️ 87e5c62 #3 2024-01-02 10:59:20 ~7 min android-e2e 🤖apk 📲
✔️ 87e5c62 #3 2024-01-02 11:00:23 ~8 min android 🤖apk 📲
8ecc1ad #4 2024-01-04 09:58:58 ~2 min tests 📄log
✔️ 8ecc1ad #4 2024-01-04 10:02:02 ~5 min ios 📱ipa 📲
✔️ 8ecc1ad #4 2024-01-04 10:03:41 ~7 min android-e2e 🤖apk 📲
✔️ 29fb74f #7 2024-01-04 10:12:56 ~4 min tests 📄log
✔️ 29fb74f #7 2024-01-04 10:14:08 ~5 min ios 📱ipa 📲
✔️ 29fb74f #7 2024-01-04 10:15:23 ~6 min android 🤖apk 📲
✔️ 29fb74f #7 2024-01-04 10:15:34 ~7 min android-e2e 🤖apk 📲
✔️ 064ff0f #8 2024-01-04 10:30:07 ~4 min tests 📄log
✔️ 064ff0f #8 2024-01-04 10:31:59 ~6 min ios 📱ipa 📲
✔️ 064ff0f #8 2024-01-04 10:32:16 ~6 min android 🤖apk 📲
✔️ 064ff0f #8 2024-01-04 10:33:21 ~7 min android-e2e 🤖apk 📲
aa22d55 #9 2024-01-04 10:54:51 ~2 min tests 📄log
✔️ aa22d55 #9 2024-01-04 10:59:10 ~6 min ios 📱ipa 📲
✔️ aa22d55 #9 2024-01-04 11:00:29 ~7 min android-e2e 🤖apk 📲
✔️ aa22d55 #9 2024-01-04 11:00:36 ~7 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c91b512 #10 2024-01-04 11:06:40 ~4 min tests 📄log
✔️ c91b512 #10 2024-01-04 11:08:52 ~6 min ios 📱ipa 📲
✔️ c91b512 #10 2024-01-04 11:09:56 ~7 min android-e2e 🤖apk 📲
✔️ c91b512 #10 2024-01-04 11:10:02 ~7 min android 🤖apk 📲
✔️ 1304f96 #12 2024-01-04 11:38:37 ~7 min ios 📱ipa 📲
✔️ 1304f96 #12 2024-01-04 11:40:00 ~8 min android 🤖apk 📲
✔️ 1304f96 #12 2024-01-04 11:40:09 ~8 min tests 📄log
✔️ 1304f96 #12 2024-01-04 11:43:16 ~11 min android-e2e 🤖apk 📲

(if (and (= view-id :chats-stack) current-chat-id)
(reanimated/animate-delay background-color "red" 300)
(reanimated/set-shared-value background-color "transparent"))
[reanimated/view
Copy link
Contributor

@J-Son89 J-Son89 Jan 2, 2024

Choose a reason for hiding this comment

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

imo it would be nicer to have some text or something more descriptive here. It's likely if other devs see this red box they will be confused of what is happening and we are creating noise that is easily avoidable. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, plan was to link code with PR. (chicken egg problem)
forget to add comment, after pushing. Thank you for reminding.

Copy link
Contributor

@J-Son89 J-Son89 Jan 2, 2024

Choose a reason for hiding this comment

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

ah I didn't mean in the code tbh, I meant in the ui

Copy link
Contributor

Choose a reason for hiding this comment

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

we could have a more generic mechanism, like a floating button with an error/warning symbol that shows more info once pressed

Copy link
Member Author

@Parveshdhull Parveshdhull Jan 2, 2024

Choose a reason for hiding this comment

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

it would be nicer to have some text or something more descriptive here

More text might create interference with testing and development.
Once PR is approved I have plan to ping qa/devs in discord about this information.
(I can also add in some doc, but probably it will go unnoticed)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh we were supposed to implement something like that for documentation. (Don't know where we are on that)

Copy link
Member Author

@Parveshdhull Parveshdhull Jan 2, 2024

Choose a reason for hiding this comment

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

  • Create a view in shell screen (with high z index)
  • Create a mechanism to track different types of errors like here
  • That return a string of error
  • when string is not null a button is shown in right corner of status bar (so it don't interfere with app flow)
  • when button pressed show popup with that error.

Just a rough idea, wdyt @J-Son89

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah for me sounds great, maybe we can check in the mobile channel to see if anyone else has any suggestions/thoughts about it! :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the code. How's this looks?

Video
output-2024-01-04_15.19.06.mp4

Copy link
Contributor

Choose a reason for hiding this comment

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

nice @Parveshdhull! yes this looks great to me! Very clear to see what's happening now :)

@status-im-auto
Copy link
Member

71% of end-end tests have passed

Total executed tests: 48
Failed tests: 10
Expected to fail tests: 4
Passed tests: 34
IDs of failed tests: 702784,702957,702851,702745,702783,704615,702869,703496,702958,703629 
IDs of expected to fail tests: 702732,703503,702731,702808 

Failed tests (10)

Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 1: Tap on found: Button
    # STEP: Device1 check that contact appeared in contact list mutually

    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    E   http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    activity_center/test_activity_center.py:133: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.just_fyi('Device1 check that contact appeared in contact list mutually')
    ../views/base_view.py:394: in just_fyi
        self.driver.execute_script("sauce:context=STEP: %s" % some_str)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:405: in execute_script
        return self.execute(command, {"script": script, "args": converted_args})["value"]
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:343: in execute
        response = self.command_executor.execute(driver_command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:291: 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:312: in _request
        response = 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:376: in urlopen
        response = conn.urlopen(method, u.request_uri, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:787: in urlopen
        retries = retries.increment(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/util/retry.py:550: in increment
        raise six.reraise(type(error), error, _stacktrace)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/packages/six.py:769: in reraise
        raise value.with_traceback(tb)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
     ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_edit_delete_message_when_offline, id: 704615

    Device 1: Looking for a message by text: text after edit
    Device 1: Looking for a message by text: message to delete

    critical/chats/test_public_chat_browsing.py:794: in test_community_edit_delete_message_when_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Updated message 'text after edit' is not delivered to the receiver
    E    Message 'message to delete' was not deleted for the receiver
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784

    Test setup failed: critical/chats/test_1_1_public_chats.py:525: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:323: in create_shared_drivers
        raise e
    base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Test setup failed: critical/chats/test_1_1_public_chats.py:525: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:323: in create_shared_drivers
        raise e
    base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id' 
    

    [[Data delivery issue]]

    3. test_1_1_chat_mute_chat, id: 703496

    Test setup failed: critical/chats/test_1_1_public_chats.py:525: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:323: in create_shared_drivers
        raise e
    base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957

    Test setup failed: activity_center/test_activity_center.py:380: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:309: in create_shared_drivers
        drivers = loop.run_until_complete(start_threads(test_suite_data.current_test.name,
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:26: 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:257: in __init__
        super().__init__(
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:206: in __init__
        self.start_session(capabilities)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webdriver.py:346: in start_session
        response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:193: in check_response
        raise exception_class(value)
     <html><body><h1>502 Bad Gateway</h1>
    E   The server returned an invalid or incomplete response.
    E   </body></html>
    



    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: activity_center/test_activity_center.py:380: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:309: in create_shared_drivers
        drivers = loop.run_until_complete(start_threads(test_suite_data.current_test.name,
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:26: 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:257: in __init__
        super().__init__(
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:206: in __init__
        self.start_session(capabilities)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webdriver.py:346: in start_session
        response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:193: in check_response
        raise exception_class(value)
     <html><body><h1>502 Bad Gateway</h1>
    E   The server returned an invalid or incomplete response.
    E   </body></html>
    



    Class TestCommunityOneDeviceMerged:

    1. test_community_undo_delete_message, id: 702869

    Device 1: Tap on found: Button
    Device 1: Find Button by xpath: //*[@text="Undo"]

    critical/chats/test_public_chat_browsing.py:111: in test_community_undo_delete_message
        self.channel.element_by_text("Undo").click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:94: in click
        self._execute(Command.CLICK_ELEMENT)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:395: in _execute
        return self._parent.execute(command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     androidx.test.uiautomator.StaleObjectException; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
    E   Stacktrace:
    E   io.appium.uiautomator2.common.exceptions.StaleElementReferenceException: androidx.test.uiautomator.StaleObjectException
    E   	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:63)
    E   	at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:277)
    E   	at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:271)
    E   	at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
    E   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
    E   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
    E   	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
    E   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
    E   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
    E   	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
    E   	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
    E   	at java.lang.Thread.run(Thread.java:1012)
    E   Caused by: androidx.test.uiautomator.StaleObjectException
    E   	at androidx.test.uiautomator.UiObject2.getAccessibilityNodeInfo(UiObject2.java:647)
    E   	at androidx.test.uiautomator.UiObject2.hashCode(UiObject2.java:105)
    E   	at java.lang.Object.toString(Object.java:299)
    E   	at java.util.Formatter$FormatSpecifier.printString(Formatter.java:3138)
    E   	at java.util.Formatter$FormatSpecifier.print(Formatter.java:3015)
    E   	at java.util.Formatter.format(Formatter.java:2678)
    E   	at java.util.Formatter.format(Formatter.java:2614)
    E   	at java.lang.String.format(String.java:4017)
    E   	at io.appium.uiautomator2.utils.ReflectionUtils.invoke(ReflectionUtils.java:85)
    E   	at io.appium.uiautomator2.core.AxNodeInfoExtractor.extractAxNodeInfo(AxNodeInfoExtractor.java:58)
    E   	at io.appium.uiautomator2.core.AxNodeInfoExtractor.toAxNodeInfo(AxNodeInfoExtractor.java:48)
    E   	at io.appium.uiautomator2.model.BaseElement.click(BaseElement.java:70)
    E   	at io.appium.uiautomator2.handler.Click.safeHandle(Click.java:37)
    E   	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
    E   	... 33 more
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_join_when_node_owner_offline, id: 703629

    Device 2: Looking for community: 'open community'
    Device 2: Click until Text by accessibility id: community-description-text will be presented

    critical/chats/test_public_chat_browsing.py:1136: in test_community_join_when_node_owner_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Joined status is not displayed
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 1: Tap on found: Button
    Device 1: Find ProfilePictureElement by accessibility id: chat-icon

    critical/chats/test_1_1_public_chats.py:272: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        self.profile_1.edit_profile_picture(image_index=2)
    ../views/profile_view.py:443: in edit_profile_picture
        self.profile_picture.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: ProfilePictureElement by accessibility id: `chat-icon` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    Device sessions

    Expected to fail tests (4)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    2. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:324: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Messages PN was not fetched from offline 
    

    [[Data delivery issue]]

    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Passed tests (34)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    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 TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    5. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    4. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    @Parveshdhull Parveshdhull marked this pull request as draft January 2, 2024 14:34
    @Parveshdhull Parveshdhull changed the title Implement chat open indicator [WIP] Implement chat open indicator Jan 2, 2024
    @Parveshdhull Parveshdhull changed the title [WIP] Implement chat open indicator Implement PR error indicator Jan 4, 2024
    @Parveshdhull Parveshdhull force-pushed the chore/visual-indicator branch 3 times, most recently from 29fb74f to 064ff0f Compare January 4, 2024 10:25
    @Parveshdhull Parveshdhull marked this pull request as ready for review January 4, 2024 10:26
    @Parveshdhull
    Copy link
    Member Author

    Parveshdhull commented Jan 4, 2024

    hi @cammellos @flexsurfer @J-Son89. PR is ready for review.

    This code might get dormant in future, but it already found a bug today :D.

    Bug: Group messages will be marked automatically read if group details screen is open on home screen. Its edge case, but still a bug :)
    fixing in: #18389

    @status-im-auto
    Copy link
    Member

    65% of end-end tests have passed

    Total executed tests: 48
    Failed tests: 15
    Expected to fail tests: 2
    Passed tests: 31
    
    IDs of failed tests: 702809,702859,702732,703133,702957,702851,702840,702948,702855,703202,702786,702731,702845,702958,703629 
    
    IDs of expected to fail tests: 703503,702808 
    

    Failed tests (15)

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 2: `Text` is `user admin`
    Device 2: Looking for a pinned by message with text: Message 4

    critical/chats/test_group_chat.py:404: in test_group_chat_pin_messages
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Pinned messages count 2 doesn't match expected 3 for user 2
    E    Message 'Message 4' is missed on Pinned messages list for user 2
    



    Device sessions

    2. test_group_chat_reactions, id: 703202

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

    critical/chats/test_group_chat.py:109: in test_group_chat_reactions
        self.chats[1].set_reaction(message=message, emoji="thumbs-up")
    ../views/chat_view.py:1074: in set_reaction
        self.chat_element_by_text(message).long_press_until_element_is_shown(element)
    ../views/base_element.py:318: in long_press_until_element_is_shown
        element = self.find_element()
    ../views/chat_view.py:134: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'This is a test message to check some reactions.')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855

    Device 2: Find Text by xpath: //*[starts-with(@text,'Message before edit 1-1')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/chats/test_1_1_public_chats.py:378: in test_1_1_chat_edit_message
        self.chat_2.chat_element_by_text(message_before_edit_1_1).wait_for_status_to_be("Delivered")
    ../views/chat_view.py:243: in wait_for_status_to_be
        raise TimeoutException("Message status was not changed to %s, it's %s" % (expected_status, current_status))
     Message status was not changed to Delivered, it's Sent
    



    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:264: in test_1_1_chat_pin_messages
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Pinned messages count is 2 but should be 3 for user 2
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_one_image_send_reply, id: 702859

    Device 2: Click system back button
    Device 2: Looking for a message by text: description

    critical/chats/test_public_chat_browsing.py:436: in test_community_one_image_send_reply
        self.channel_2.chat_element_by_text(image_description).wait_for_visibility_of_element(10)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'description')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_community_emoji_send_copy_paste_reply, id: 702840

    Device 2: Quoting '🥓' message
    Device 2: Find BaseElement by xpath: //*[@content-desc=':chat-floating-screen']//*[starts-with(@text,'🥓')]

    critical/chats/test_public_chat_browsing.py:517: in test_community_emoji_send_copy_paste_reply
        self.channel_2.quote_message(emoji_unicode)
    ../views/chat_view.py:1062: in quote_message
        self.chat_view_element_starts_with_text(message).long_press_until_element_is_shown(self.reply_message_button)
    ../views/base_element.py:318: in long_press_until_element_is_shown
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: BaseElement by xpath: `//*[@content-desc=':chat-floating-screen']//*[starts-with(@text,'🥓')]` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809

    Test setup failed: critical/chats/test_public_chat_browsing.py:835: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    2. test_community_hashtag_links_to_community_channels, id: 702948

    Test setup failed: critical/chats/test_public_chat_browsing.py:835: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Can't navigate to a channel by hashtag link, https://github.com//issues/18095]]

    3. test_community_mentions_push_notification, id: 702786

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: critical/chats/test_public_chat_browsing.py:835: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    4. test_community_leave, id: 702845

    Test setup failed: critical/chats/test_public_chat_browsing.py:835: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    5. test_community_join_when_node_owner_offline, id: 703629

    Test setup failed: critical/chats/test_public_chat_browsing.py:835: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Can't join a community if admin goes offline, https://github.com//issues/17678]]

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 1: Tap on found: Button
    # STEP: Device1 check that contact appeared in contact list mutually

    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    E   http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    activity_center/test_activity_center.py:133: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.just_fyi('Device1 check that contact appeared in contact list mutually')
    ../views/base_view.py:394: in just_fyi
        self.driver.execute_script("sauce:context=STEP: %s" % some_str)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:405: in execute_script
        return self.execute(command, {"script": script, "args": converted_args})["value"]
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:343: in execute
        response = self.command_executor.execute(driver_command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:291: 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:312: in _request
        response = 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:376: in urlopen
        response = conn.urlopen(method, u.request_uri, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:787: in urlopen
        retries = retries.increment(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/util/retry.py:550: in increment
        raise six.reraise(type(error), error, _stacktrace)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/packages/six.py:769: in reraise
        raise value.with_traceback(tb)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
     ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    



    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: activity_center/test_activity_center.py:409: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: activity_center/test_activity_center.py:409: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:428: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:96: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element
    



    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/chats/test_public_chat_browsing.py:273: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     zQ3...dWXh5 was not restored as a contact from waku backup!
    E    zQ3...Vacac was not restored as a contact from waku backup!
    E    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!!
    



    Device sessions

    Expected to fail tests (2)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:324: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Messages PN was not fetched from offline 
    

    [[Data delivery issue]]

    Device sessions

    Passed tests (31)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_undo_delete_message, id: 702869
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    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 TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    3. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    4. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    5. test_community_message_delete, id: 702839
    Device sessions

    6. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    7. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    9. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    3. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    ;; https://github.com/status-im/status-mobile/pull/18338
    (defn f-view
    []
    (let [z-index (reanimated/use-shared-value -1)
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    why are we animating this? is it necessary to do?

    "Error: Chat is not closed. \n(messages will be marked read automatically).\nPlease create an issue with the steps that lead to this state.")))

    ;; https://github.com/status-im/status-mobile/pull/18338
    (defn f-view
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    better to make the f-view private and export as view that already handles the [:f> f-view] etc imo

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    i.e

    (defn view []
     [:f> f-view])
    

    ...

    (when config/pr-error-indicator?
           [pr-error-indicator/view])
    

    Copy link
    Member Author

    @Parveshdhull Parveshdhull Jan 4, 2024

    Choose a reason for hiding this comment

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

    I am little curious about this one.
    Not sure how or if this effects, but should we avoid using another wrapper?
    (Not sure of performance effect, but probably we can check this wrapper in inspector (have to confirm))

    [react-native.reanimated :as reanimated]
    [react-native.safe-area :as safe-area]
    [utils.re-frame :as rf]))

    Copy link
    Contributor

    @J-Son89 J-Son89 Jan 4, 2024

    Choose a reason for hiding this comment

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

    certainly feels like this code should live elsewhere.
    For example src/status-im/debugging/pr-error-indicator
    and then require the encapsulated functionality into this namespace. As it is, it's unlikely someone will go into this specific view expecting to find some sort of error logging mechanism like this.

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Breaking it down further might be nice too,
    e.g

    src/status-im/debugging/pr-error-indicator.errors

    (defn- chat-open-error
      []
      (let [current-chat-id (rf/sub [:chats/current-chat-id])
            view-id         (rf/sub [:view-id])]
        (when (and (not (#{:chat :profile} view-id)) current-chat-id)
          "Error: Chat is not closed. \n(messages will be marked read automatically).\nPlease create an issue with the steps that lead to this state.")))
    
    (def ^:private const errors [chat-open-error])
    
    (defn check-for-error 
     (first (filter (fn [e] (seq (e)) errors))) ;; not tested code but general idea is that we can easily add more checks to test for here.
    

    src/status-im/debugging/pr-error-indicator.view

    (:require [src/status-im/debugging/pr-error-indicator.errors :as errors])
    
    (defn- f-view [error-message]
      (let [z-index       (reanimated/use-shared-value -1)]
        (if error-message
          (reanimated/animate-delay z-index 2 2000)
          (reanimated/animate-delay z-index -1 2000))
        [reanimated/touchable-opacity
         {:style    (reanimated/apply-animations-to-style
                     {:z-index z-index}
                     {:position           :absolute
                      :top                (safe-area/get-top)
                      :align-self         :center
                      :border-radius      5
                      :padding-horizontal 5
                      :background-color   :red})
          :on-press #(js/alert error-message)}
         [quo/text
          {:weight :regular
           :size   :paragraph-2
           :align  :center
           :style  {:color :white}} "Error"]]))
    
    (defn view [] 
      (let [error-message (errors/check-for-error)] 
       [:f> f-view error-message]
      ))
    

    @Parveshdhull Parveshdhull marked this pull request as draft January 4, 2024 11:46
    @Parveshdhull
    Copy link
    Member Author

    hi @J-Son89, Thank you very much for reviewing PR and for all your help.

    Context:

    • To know if the chat screen is open we have to check :current-chat-id.
    • And for checking on which screen we are we have to check :view-id.
    • Correct scenario - current-chat-id present, and we are on the chat screen
    • Wrong scenario - current-chat-id present, and we are not on the chat screen.

    Problems with an error indicator

    • False positive - As both subscriptions are not updated at the same time, we have to add an initial animation delay to avoid false positive.
    • Overlapping screen - As we can only show this popup in shell-stack we have to add a delay in hiding the popup to see bugs in the overlapping screen (As in case of group details bug - Group messages are automatically getting marked read #18391)

    We can probably show an alert instead of a popup to avoid overlapping, but still it feels too fragile and can give a false positive and break anytime.

    So I think it's better to just avoid this indicator. Sorry @pavloburykh

    Silver-lining we found a hidden bug 🥂

    cc: @cammellos @flexsurfer

    @J-Son89
    Copy link
    Contributor

    J-Son89 commented Jan 4, 2024

    thanks for the heads up @Parveshdhull! Nice work on this either way 🙌

    @pavloburykh
    Copy link
    Contributor

    So I think it's better to just avoid this indicator. Sorry @pavloburykh

    Got it @Parveshdhull! Anyway, thank for good idea and all the efforts!

    @Parveshdhull Parveshdhull deleted the chore/visual-indicator branch January 5, 2024 09:26
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    4 participants