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

refactor: suggested routes view #19768

Merged
merged 1 commit into from May 3, 2024
Merged

Conversation

briansztamfater
Copy link
Member

@briansztamfater briansztamfater commented Apr 23, 2024

fixes #19696

Summary

This PR refactors suggested network routes view. Please read the issue for context on the why we needed to refactor the component, but basically it wasn't complying with different cases.

This new approach enables a more flexible UI where different types of network links components are used to connect network summary cards in the suggested routes screen. Some examples:

Screenshot 2024-04-23 at 4 20 05 PM Screenshot 2024-04-23 at 4 25 46 PM Screenshot 2024-04-23 at 4 27 42 PM Screenshot 2024-04-23 at 4 29 11 PM Screenshot 2024-04-23 at 4 29 53 PM

At the same time it adds some new flows for routes view:

Platforms

  • Android
  • iOS
Functional
  • wallet / transactions

Steps to test

Smoke test:

  • Open Status
  • Log in
  • Go to wallet
  • Select account
  • Tap on Send
  • Select a recipient
  • Select a token
  • Enter a valid amount
  • Check routes are being rendered correctly

Disable last chain:

  • Open Status
  • Log in
  • Go to wallet
  • Select account
  • Tap on Send
  • Select a recipient
  • Select a token
  • Enter a valid amount
  • Disable all chains until there is only one chain left
  • Verify the user can't disable the last chain and the correct message is shown

No routes found:

  • Open Status
  • Log in
  • Go to wallet
  • Select account
  • Tap on Send
  • Select a recipient
  • Select a token
  • Enter a valid amount until the responde from status-go is empty
  • Verify a "No routes found" message is shown to the user with a Try again button
  • User could click the Try again button to search for routes again

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Apr 23, 2024

Jenkins Builds

Click to see older builds (120)
Commit #️⃣ Finished (UTC) Duration Platform Result
13d644b #1 2024-04-23 14:55:37 ~4 min tests 📄log
✔️ 13d644b #1 2024-04-23 14:59:16 ~8 min ios 📱ipa 📲
✔️ 13d644b #1 2024-04-23 15:02:37 ~11 min android-e2e 🤖apk 📲
✔️ 13d644b #1 2024-04-23 15:02:46 ~12 min android 🤖apk 📲
10f50f4 #2 2024-04-23 23:58:05 ~3 min tests 📄log
✔️ 10f50f4 #2 2024-04-24 00:00:44 ~6 min android-e2e 🤖apk 📲
✔️ 10f50f4 #2 2024-04-24 00:03:05 ~8 min ios 📱ipa 📲
✔️ 10f50f4 #2 2024-04-24 00:03:27 ~8 min android 🤖apk 📲
ed74a79 #3 2024-04-24 07:30:59 ~2 min tests 📄log
✔️ ed74a79 #3 2024-04-24 07:34:15 ~5 min android-e2e 🤖apk 📲
✔️ ed74a79 #3 2024-04-24 07:35:22 ~6 min android 🤖apk 📲
✔️ ed74a79 #3 2024-04-24 07:37:25 ~8 min ios 📱ipa 📲
30496f1 #4 2024-04-24 09:19:40 ~4 min tests 📄log
10e00ee #5 2024-04-24 09:23:46 ~2 min tests 📄log
✔️ 10e00ee #5 2024-04-24 09:28:09 ~6 min android 🤖apk 📲
✔️ 10e00ee #5 2024-04-24 09:30:25 ~8 min ios 📱ipa 📲
✔️ 10e00ee #5 2024-04-24 09:35:06 ~13 min android-e2e 🤖apk 📲
4d9d87f #6 2024-04-24 10:32:04 ~2 min tests 📄log
68b8a8d #7 2024-04-24 10:37:10 ~2 min tests 📄log
2304880 #8 2024-04-24 10:45:11 ~4 min tests 📄log
✔️ 2304880 #8 2024-04-24 10:51:22 ~10 min ios 📱ipa 📲
✔️ 2304880 #8 2024-04-24 10:52:13 ~11 min android-e2e 🤖apk 📲
✔️ 2304880 #8 2024-04-24 10:52:22 ~11 min android 🤖apk 📲
54007a3 #9 2024-04-24 16:20:50 ~2 min tests 📄log
✔️ 54007a3 #9 2024-04-24 16:24:36 ~5 min android 🤖apk 📲
✔️ 54007a3 #9 2024-04-24 16:26:58 ~8 min android-e2e 🤖apk 📲
✔️ 54007a3 #9 2024-04-24 16:26:58 ~8 min ios 📱ipa 📲
1e2058f #10 2024-04-24 16:34:30 ~2 min tests 📄log
✔️ 1e2058f #10 2024-04-24 16:40:10 ~8 min ios 📱ipa 📲
✔️ 1e2058f #10 2024-04-24 16:42:22 ~10 min android-e2e 🤖apk 📲
✔️ 1e2058f #10 2024-04-24 16:42:34 ~10 min android 🤖apk 📲
4e831b9 #11 2024-04-25 07:48:00 ~2 min tests 📄log
✔️ 131b574 #12 2024-04-25 07:56:13 ~4 min tests 📄log
✔️ 131b574 #12 2024-04-25 07:58:12 ~5 min android 🤖apk 📲
✔️ 131b574 #12 2024-04-25 07:58:53 ~6 min android-e2e 🤖apk 📲
✔️ 131b574 #12 2024-04-25 08:00:35 ~8 min ios 📱ipa 📲
84bc5d8 #13 2024-04-25 08:58:03 ~5 min tests 📄log
✔️ 84bc5d8 #13 2024-04-25 08:58:43 ~5 min android-e2e 🤖apk 📲
✔️ 84bc5d8 #13 2024-04-25 09:00:58 ~8 min ios 📱ipa 📲
✔️ 84bc5d8 #13 2024-04-25 09:04:05 ~11 min android 🤖apk 📲
336f87d #14 2024-04-25 10:14:11 ~2 min tests 📄log
✔️ 336f87d #14 2024-04-25 10:18:04 ~6 min android 🤖apk 📲
✔️ 336f87d #14 2024-04-25 10:20:11 ~8 min android-e2e 🤖apk 📲
✔️ 336f87d #14 2024-04-25 10:20:17 ~8 min ios 📱ipa 📲
6e886c8 #15 2024-04-25 10:28:59 ~2 min tests 📄log
✔️ 6e886c8 #15 2024-04-25 10:33:34 ~6 min android 🤖apk 📲
✔️ 6e886c8 #15 2024-04-25 10:34:47 ~8 min ios 📱ipa 📲
✔️ 6e886c8 #15 2024-04-25 10:37:53 ~11 min android-e2e 🤖apk 📲
f1a73bc #16 2024-04-25 11:31:47 ~2 min tests 📄log
✔️ f1a73bc #16 2024-04-25 11:35:44 ~6 min android 🤖apk 📲
✔️ f1a73bc #16 2024-04-25 11:37:35 ~8 min ios 📱ipa 📲
✔️ f1a73bc #16 2024-04-25 11:38:32 ~9 min android-e2e 🤖apk 📲
228fc9a #17 2024-04-25 11:49:50 ~2 min tests 📄log
✔️ 228fc9a #17 2024-04-25 11:58:15 ~10 min android-e2e 🤖apk 📲
✔️ 228fc9a #17 2024-04-25 11:58:22 ~10 min ios 📱ipa 📲
✔️ 228fc9a #17 2024-04-25 11:58:23 ~11 min android 🤖apk 📲
✔️ 890663d #19 2024-04-25 12:11:27 ~3 min tests 📄log
✔️ 890663d #19 2024-04-25 12:13:16 ~5 min android-e2e 🤖apk 📲
✔️ 890663d #19 2024-04-25 12:14:20 ~6 min android 🤖apk 📲
✔️ 890663d #19 2024-04-25 12:15:50 ~8 min ios 📱ipa 📲
93c858e #20 2024-04-25 13:20:00 ~4 min tests 📄log
36af720 #21 2024-04-25 13:25:54 ~3 min tests 📄log
✔️ 36af720 #21 2024-04-25 13:28:12 ~5 min android-e2e 🤖apk 📲
✔️ 36af720 #21 2024-04-25 13:31:46 ~9 min android 🤖apk 📲
✔️ 36af720 #21 2024-04-25 13:31:54 ~9 min ios 📱ipa 📲
fab270d #22 2024-04-25 13:38:59 ~4 min tests 📄log
✔️ fab270d #22 2024-04-25 13:43:20 ~9 min ios 📱ipa 📲
✔️ fab270d #22 2024-04-25 13:46:00 ~11 min android-e2e 🤖apk 📲
✔️ fab270d #22 2024-04-25 13:46:13 ~12 min android 🤖apk 📲
c0231c6 #23 2024-04-25 13:53:19 ~3 min tests 📄log
✔️ c0231c6 #23 2024-04-25 13:57:45 ~8 min ios 📱ipa 📲
✔️ c0231c6 #23 2024-04-25 13:58:05 ~8 min android-e2e 🤖apk 📲
✔️ c0231c6 #23 2024-04-25 13:58:44 ~9 min android 🤖apk 📲
c36d913 #24 2024-04-25 14:11:51 ~2 min tests 📄log
c787345 #25 2024-04-25 14:17:48 ~2 min tests 📄log
8ef4460 #26 2024-04-25 14:22:10 ~2 min tests 📄log
1c0e556 #27 2024-04-25 14:30:59 ~2 min tests 📄log
✔️ 1c0e556 #27 2024-04-25 14:34:21 ~5 min android-e2e 🤖apk 📲
✔️ 1c0e556 #27 2024-04-25 14:35:14 ~6 min android 🤖apk 📲
d2f6dcb #28 2024-04-25 14:39:13 ~3 min tests 📄log
✔️ d2f6dcb #28 2024-04-25 14:41:18 ~5 min android-e2e 🤖apk 📲
✔️ d2f6dcb #28 2024-04-25 14:44:38 ~9 min android 🤖apk 📲
✔️ d2f6dcb #28 2024-04-25 14:46:03 ~10 min ios 📱ipa 📲
e01694f #29 2024-04-25 14:54:06 ~3 min tests 📄log
✔️ e01694f #29 2024-04-25 14:56:16 ~5 min android-e2e 🤖apk 📲
✔️ e01694f #29 2024-04-25 14:58:52 ~8 min ios 📱ipa 📲
✔️ e01694f #29 2024-04-25 14:59:35 ~9 min android 🤖apk 📲
bc22785 #30 2024-04-25 15:06:12 ~3 min tests 📄log
✔️ f487eac #31 2024-04-25 15:14:57 ~7 min tests 📄log
✔️ f487eac #31 2024-04-25 15:17:34 ~9 min ios 📱ipa 📲
✔️ f487eac #31 2024-04-25 15:20:11 ~12 min android 🤖apk 📲
✔️ f487eac #31 2024-04-25 15:20:19 ~12 min android-e2e 🤖apk 📲
✔️ 8b79bae #32 2024-04-26 07:47:36 ~5 min tests 📄log
✔️ 8b79bae #32 2024-04-26 07:47:46 ~5 min android-e2e 🤖apk 📲
8b79bae #32 2024-04-26 07:50:33 ~8 min ios 📄log
✔️ 8b79bae #32 2024-04-26 07:51:29 ~9 min android 🤖apk 📲
06a8eee #33 2024-04-28 08:56:47 ~2 min tests 📄log
✔️ 06a8eee #33 2024-04-28 09:03:07 ~8 min ios 📱ipa 📲
✔️ 06a8eee #33 2024-04-28 09:05:02 ~10 min android-e2e 🤖apk 📲
✔️ 06a8eee #33 2024-04-28 09:05:09 ~10 min android 🤖apk 📲
✔️ 413d94f #34 2024-04-29 08:12:56 ~5 min tests 📄log
✔️ 413d94f #34 2024-04-29 08:13:22 ~6 min android 🤖apk 📲
✔️ 413d94f #34 2024-04-29 08:15:41 ~8 min ios 📱ipa 📲
✔️ 413d94f #34 2024-04-29 08:16:25 ~9 min android-e2e 🤖apk 📲
✔️ 995c5e3 #35 2024-04-29 21:14:15 ~5 min tests 📄log
✔️ 995c5e3 #35 2024-04-29 21:14:30 ~5 min android 🤖apk 📲
✔️ 995c5e3 #35 2024-04-29 21:16:57 ~8 min ios 📱ipa 📲
✔️ 995c5e3 #35 2024-04-29 21:17:49 ~9 min android-e2e 🤖apk 📲
✔️ 51301ba #36 2024-04-30 08:23:02 ~5 min tests 📄log
✔️ 51301ba #36 2024-04-30 08:23:18 ~5 min android 🤖apk 📲
✔️ 51301ba #36 2024-04-30 08:26:06 ~8 min ios 📱ipa 📲
✔️ 51301ba #36 2024-04-30 08:26:34 ~9 min android-e2e 🤖apk 📲
✔️ d7f4a3e #37 2024-04-30 08:36:42 ~5 min tests 📄log
✔️ d7f4a3e #37 2024-04-30 08:36:54 ~5 min android-e2e 🤖apk 📲
✔️ d7f4a3e #37 2024-04-30 08:39:35 ~8 min ios 📱ipa 📲
✔️ d7f4a3e #37 2024-04-30 08:40:34 ~9 min android 🤖apk 📲
857922b #39 2024-05-01 14:13:28 ~2 min tests 📄log
✔️ 857922b #39 2024-05-01 14:16:41 ~5 min android 🤖apk 📲
✔️ 857922b #39 2024-05-01 14:18:06 ~7 min android-e2e 🤖apk 📲
✔️ 857922b #39 2024-05-01 14:19:26 ~8 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9413912 #40 2024-05-01 16:38:30 ~5 min android-e2e 🤖apk 📲
✔️ 9413912 #40 2024-05-01 16:41:00 ~8 min ios 📱ipa 📲
✔️ 9413912 #40 2024-05-01 16:41:33 ~8 min tests 📄log
✔️ 9413912 #40 2024-05-01 16:44:20 ~11 min android 🤖apk 📲
✔️ 4f24cb6 #41 2024-05-03 15:11:52 ~5 min tests 📄log
✔️ 4f24cb6 #41 2024-05-03 15:12:11 ~6 min android 🤖apk 📲
✔️ 4f24cb6 #41 2024-05-03 15:14:32 ~8 min ios 📱ipa 📲
✔️ 4f24cb6 #41 2024-05-03 15:15:18 ~9 min android-e2e 🤖apk 📲

Comment on lines 35 to 41
(defn fetch-routes
[amount routes-can-be-fetched? bounce-duration-ms]
(if routes-can-be-fetched?
(debounce/debounce-and-dispatch
[:wallet/get-suggested-routes {:amount amount}]
bounce-duration-ms)
(rf/dispatch [:wallet/clean-suggested-routes])))
Copy link
Member Author

Choose a reason for hiding this comment

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

Just moved the function to the top

@briansztamfater briansztamfater force-pushed the refactor/routes-view branch 16 times, most recently from bc22785 to f487eac Compare April 25, 2024 15:07
Comment on lines 82 to 101
(fn [{:keys [db]} [error]]
(let [receiver-network-values (get-in db [:wallet :ui :send :receiver-network-values])
sender-network-values (get-in db [:wallet :ui :send :sender-network-values])
cleaned-sender-network-values (send-utils/clean-network-amounts sender-network-values)
cleaned-receiver-network-values (send-utils/clean-network-amounts receiver-network-values)]
{:db (-> db
(update-in [:wallet :ui :send]
dissoc
:route)
(assoc-in [:wallet :ui :send :sender-network-values] cleaned-sender-network-values)
(assoc-in [:wallet :ui :send :receiver-network-values] cleaned-receiver-network-values)
(assoc-in [:wallet :ui :send :loading-suggested-routes?] false)
(assoc-in [:wallet :ui :send :suggested-routes] {:best []}))
:fx [[:dispatch
[:toasts/upsert
{:id :send-transaction-error
:type :negative
:text (:message error)}]]]})))
Copy link
Member Author

Choose a reason for hiding this comment

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

We treat endpoint error as if no routes were found so user can retry the request, but we also show a toast to display the error

Comment on lines +228 to +243
:on-press (if no-routes-found?
#(rf/dispatch [:wallet/get-suggested-routes
{:amount (controlled-input/input-value
input-state)}])
on-confirm)}
Copy link
Member Author

Choose a reason for hiding this comment

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

If no routes where found (because of an error or because the getSuggestedRoutes returned a success response with empty routes), we show the user a Try again button so they can resend the request

Copy link
Member

@OmarBasem OmarBasem Apr 30, 2024

Choose a reason for hiding this comment

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

Is this something from the designs? (The Try again button)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is in the "No routes found" design

@briansztamfater briansztamfater marked this pull request as ready for review April 30, 2024 08:30
@briansztamfater briansztamfater moved this from REVIEW to E2E Tests in Pipeline for QA Apr 30, 2024
@briansztamfater briansztamfater moved this from E2E Tests to REVIEW in Pipeline for QA Apr 30, 2024
@VolodLytvynenko VolodLytvynenko self-assigned this Apr 30, 2024
src/quo/components/wallet/network_link/view.cljs Outdated Show resolved Hide resolved
Comment on lines 262 to 266
token-id (if token
(:symbol token)
(str (get-in collectible [:id :contract-id :address])
":"
(get-in collectible [:id :token-id])))
Copy link
Member

Choose a reason for hiding this comment

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

This can be a utility:

(defn format-token-id
  [token collectible]
(if token
                    (:symbol token)
                    (str (get-in collectible [:id :contract-id :address])
                         ":"
                         (get-in collectible [:id :token-id]))))

Comment on lines +228 to +243
:on-press (if no-routes-found?
#(rf/dispatch [:wallet/get-suggested-routes
{:amount (controlled-input/input-value
input-state)}])
on-confirm)}
Copy link
Member

@OmarBasem OmarBasem Apr 30, 2024

Choose a reason for hiding this comment

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

Is this something from the designs? (The Try again button)

src/status_im/contexts/wallet/send/routes/style.cljs Outdated Show resolved Hide resolved
@status-im-auto
Copy link
Member

83% of end-end tests have passed

Total executed tests: 52
Failed tests: 7
Expected to fail tests: 2
Passed tests: 43
IDs of failed tests: 727230,702809,702782,702957,727229,703391,702843 
IDs of expected to fail tests: 703495,703503 

Failed tests (7)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 1: Long press on `AssetElement`
    Device 1: Find `EditBox` by `accessibility id`: `address-text-input`

    critical/test_wallet.py:123: in test_wallet_send_asset_from_drawer
        self.wallet_1.send_asset_from_drawer(address=self.receiver['address'], asset_name='Ether',
    ../views/wallet_view.py:104: in send_asset_from_drawer
        self.address_text_input.send_keys(address)
    ../views/base_element.py:377: in send_keys
        self.find_element().send_keys(value)
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `address-text-input` 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
    



    2. test_wallet_send_eth, id: 727229

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 2: Text is 0.0314 ETH

    critical/test_wallet.py:112: in test_wallet_send_eth
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:98: in _check_balances_after_tx
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Eth amount in the senders wallet is 0.0403 but should be 0.0401
    E    Eth amount in the receivers wallet is 0.0314 but should be 0.0315
    



    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957

    Device 2: Tap on found: SendMessageButton
    # STEP: Checking unread indicators

    activity_center/test_activity_center.py:435: in test_activity_center_mentions
        self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: BaseElement by accessibility id:`activity-center-unread-count` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Device 1: Find BaseElement by xpath: //*[@content-desc=':chat-floating-screen']//*[starts-with(@text,'👨🏽‍🌾')]
    Device 1: Long press on BaseElement until expected element is shown

    critical/chats/test_1_1_public_chats.py:117: in test_1_1_chat_emoji_send_reply_and_open_link
        self.chat_1.quote_message(emoji_unicode)
    ../views/chat_view.py:1056: 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:331: in long_press_until_element_is_shown
        action.long_press(element).release().perform()
    ../../../../status-app-prs@tmp/venv/lib/python3.10/site-packages/appium/webdriver/common/touch_action.py:174: in perform
        self._driver.execute(Command.TOUCH_ACTION, params)
    ../../../../status-app-prs@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     The element 'By.xpath: //*[@content-desc=':chat-floating-screen']//*[starts-with(@text,'👨🏽‍🌾')]' is not linked to the same object in DOM anymore; 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: The element 'By.xpath: //*[@content-desc=':chat-floating-screen']//*[starts-with(@text,'👨🏽‍🌾')]' is not linked to the same object in DOM anymore
    E   	at io.appium.uiautomator2.model.ElementsCache.restore(ElementsCache.java:122)
    E   	at io.appium.uiautomator2.model.ElementsCache.get(ElementsCache.java:153)
    E   	at io.appium.uiautomator2.handler.Location.safeHandle(Location.java:23)
    E   	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
    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)
    



    Device sessions

    2. test_1_1_chat_send_image_save_and_share, id: 703391

    Device 2: Find Button by accessibility id: image-0
    Device 2: Click system back button

    critical/chats/test_1_1_public_chats.py:458: in test_1_1_chat_send_image_save_and_share
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Not expected image is shown to the receiver.
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

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

    critical/chats/test_public_chat_browsing.py:354: in test_community_message_edit
        self.channel_2.set_reaction(message_text_after_edit)
    ../views/chat_view.py:1068: in set_reaction
        self.chat_element_by_text(message).long_press_until_element_is_shown(element)
    ../views/base_element.py:327: in long_press_until_element_is_shown
        element = self.find_element()
    ../views/chat_view.py:116: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'Message AFTER edit 2 (Edited)')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809

    Device 1: Looking for a message by text: quote reply (one row)
    Device 2: Looking for a message by text: quote reply (one row)

    critical/chats/test_public_chat_browsing.py:981: in test_community_markdown_support
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     italic text in underscore is not displayed with markdown in community channel for the recipient (device 1)
    



    Device sessions

    Expected to fail tests (2)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495

    # STEP: Change device time so chat will be unmuted by timer
    Device 2: Long press on ChatElement

    critical/chats/test_group_chat.py:464: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Chat is still muted after timeout 
    

    [[Chat is not unmuted after expected time: https://github.com//issues/19627]]

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

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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

    5. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    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 TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    2. test_wallet_add_remove_watch_only_account, id: 727232
    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_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    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_edit_delete_message_when_offline, id: 704615
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    9. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

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

    1. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    2. test_community_mentions_push_notification, id: 702786
    Device sessions

    3. test_community_leave, id: 702845
    Device sessions

    4. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    @briansztamfater briansztamfater moved this from REVIEW to E2E Tests in Pipeline for QA May 1, 2024
    @VolodLytvynenko VolodLytvynenko moved this from E2E Tests to IN TESTING in Pipeline for QA May 1, 2024
    @status-im-auto
    Copy link
    Member

    88% of end-end tests have passed

    Total executed tests: 52
    Failed tests: 4
    Expected to fail tests: 2
    Passed tests: 46
    
    IDs of failed tests: 727230,704615,703202,703391 
    
    IDs of expected to fail tests: 703495,703503 
    

    Failed tests (4)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 1: Long press on `AssetElement`
    Device 1: Find `EditBox` by `accessibility id`: `address-text-input`

    critical/test_wallet.py:123: in test_wallet_send_asset_from_drawer
        self.wallet_1.send_asset_from_drawer(address=self.receiver['address'], asset_name='Ether',
    ../views/wallet_view.py:104: in send_asset_from_drawer
        self.address_text_input.send_keys(address)
    ../views/base_element.py:377: in send_keys
        self.find_element().send_keys(value)
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `address-text-input` 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
    



    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_send_image_save_and_share, id: 703391

    Device 2: Find Button by accessibility id: image-0
    Device 2: Click system back button

    critical/chats/test_1_1_public_chats.py:458: in test_1_1_chat_send_image_save_and_share
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Not expected image is shown to the receiver.
    



    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:798: in test_community_edit_delete_message_when_offline
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message 'message to delete' was not deleted for the receiver
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_reactions, id: 703202

    Device 1: Find Button by accessibility id: authors-for-reaction-5
    Device 1: Tap on found: Button

    critical/chats/test_group_chat.py:211: in test_group_chat_reactions
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Incorrect reactions count for member_2 after changing the reactions
    



    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_mute_chat, id: 703495

    # STEP: Change device time so chat will be unmuted by timer
    Device 2: Long press on ChatElement

    critical/chats/test_group_chat.py:464: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Chat is still muted after timeout 
    

    [[Chat is not unmuted after expected time: https://github.com//issues/19627]]

    Device sessions

    Passed tests (46)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    2. test_wallet_add_remove_watch_only_account, id: 727232
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    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_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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

    4. test_group_chat_offline_pn, id: 702808
    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 TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    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

    5. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

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

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    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_edit_message, id: 702855
    Device sessions

    6. test_1_1_chat_pin_messages, id: 702731
    Device sessions

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

    Copy link
    Member

    @OmarBasem OmarBasem left a comment

    Choose a reason for hiding this comment

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

    Great work!

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @briansztamfater, I'm a bit unsure about whether there should be the ability to include several routes, as shown in your screenshots. I hope not, since it's not implemented on the desktop. However, I can't understand how you achieved this on your screens, as shown in the description of the issue.

    I mean example:

    My user has more than 0.01 ETH on all networks. When I enter 0.03 into the send field, I expect to see several routes at once:

    • Sender: mainnet 0.01 -> Receiver: mainnet 0.01
    • Sender: optimism 0.01 -> Receiver: optimism 0.01
    • Sender: arbitrium 0.01 -> Receiver: arbitrium 0.01

    But instead, I see 'no routes are found'.
    image

    however, on your screen, I see all three routes.
    image

    @briansztamfater
    Copy link
    Member Author

    briansztamfater commented May 2, 2024

    Hi @VolodLytvynenko thanks for testing! Some clarifications regarding the screenshots in the description:
    Basically, in its current implementation in develop, the component does not support those kind of routing configuration. So, in this PR I refactored the whole component to support them, and I did some local tests with mocked data to test the UI behavior and took the screenshots. But ultimately, what is rendered it depends on the getSuggestedRoutes endpoint response. Unfortunately, I couldn't get those cases to be rendered without mocking locally, but now the component should be prepared to support them in case the algorithm returns data for those cases.
    If you are testing in Sepolia, currently bridges are not supported on Sepolia chains, so for complex routes that involves bridges it is probable that the algorithm returns no routes (which should render to the new "No routes found" design). For other cases that don't involve bridging, we should check the expected behavior for routes algorithm, this PR does not modify that, just renders the response, so maybe it is a status-go bug.

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @briansztamfater, thank you for the PR. I don't have any issues with it. I've asked a few questions regarding the display of network routes.

    https://discord.com/channels/624634427930312714/852533718790570015/1235591512860131448

    https://discord.com/channels/624634427930312714/852533718790570015/1235601862166581278

    https://discord.com/channels/624634427930312714/852533718790570015/1235616454351519774

    If you think it's best to wait for responses from the design team and make changes based on their answers before merging the PR, please let me know. Otherwise, if you believe it's fine to merge as is, than PR can be merged and I'll track any follow-ups related to the design team's replies separately

    @briansztamfater
    Copy link
    Member Author

    Thanks @VolodLytvynenko, I think it is better to merge this because some issues depends on this refactor and we can track any follow up on other issues. If it is okay, I'll merge it as soon as I get into my computer. Thanks again!

    @VolodLytvynenko
    Copy link
    Contributor

    Thanks @VolodLytvynenko, I think it is better to merge this because some issues depends on this refactor and we can track any follow up on other issues. If it is okay, I'll merge it as soon as I get into my computer. Thanks again!

    @briansztamfater thank you. You did a great job!

    @briansztamfater briansztamfater merged commit 355e144 into develop May 3, 2024
    6 checks passed
    @briansztamfater briansztamfater deleted the refactor/routes-view branch May 3, 2024 16:18
    Pipeline for QA automation moved this from IN TESTING to DONE May 3, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Development

    Successfully merging this pull request may close these issues.

    Refactor Network Routing Visualization in Wallet Send Flow to Support Complex Connection Scenarios
    5 participants