status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

WIP: Asset to Pay / Asset to Receive

Open alwx opened this issue 1 year ago • 1 comments

fixes #20332 fixes #20333

Summary

...

Documentation change PR (review please): https://github.com/status-im/status.im/pull/xxx

Review notes

Testing notes

Platforms

  • Android
  • iOS
  • macOS
  • Linux
  • Windows

Areas that maybe impacted

Functional
  • 1-1 chats
  • public chats
  • group chats
  • wallet / transactions
  • dapps / app browsing
  • account recovery
  • new account
  • user profile updates
  • networks
  • mailservers
  • fleet
  • bootnodes
Non-functional
  • battery performance
  • CPU performance / speed of the app
  • network consumption

Steps to test

  • Open Status
  • ...
  • Step 3, etc.

Before and after screenshots comparison

Figma (if available) iOS (if available) Android (if available)
Please embed Image/Video here of the before and after. Please embed Image/Video here of the before and after. Please embed Image/Video here of the before and after.

status: ready

alwx avatar Aug 28 '24 14:08 alwx

Jenkins Builds

Click to see older builds (114)
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:x: 2ea82bd5 #1 2024-08-28 14:31:48 ~6 min tests :page_facing_up:log
:heavy_check_mark: 2ea82bd5 #1 2024-08-28 14:35:17 ~9 min android-e2e :robot:apk :calling:
:heavy_check_mark: 2ea82bd5 #1 2024-08-28 14:36:46 ~10 min android :robot:apk :calling:
:heavy_check_mark: 2ea82bd5 #1 2024-08-28 15:08:57 ~43 min ios :iphone:ipa :calling:
:x: 966bc97d #2 2024-08-29 13:23:21 ~2 min tests :page_facing_up:log
:heavy_check_mark: 966bc97d #2 2024-08-29 13:27:07 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 966bc97d #2 2024-08-29 13:27:30 ~6 min android :robot:apk :calling:
:x: 966bc97d #2 2024-08-29 13:30:33 ~9 min ios :page_facing_up:log
:x: 29ecd468 #3 2024-08-29 13:40:23 ~8 min tests :page_facing_up:log
:heavy_check_mark: 29ecd468 #3 2024-08-29 13:41:35 ~9 min ios :iphone:ipa :calling:
:heavy_check_mark: 29ecd468 #3 2024-08-29 13:44:26 ~12 min android-e2e :robot:apk :calling:
:heavy_check_mark: 29ecd468 #3 2024-08-29 13:46:30 ~14 min android :robot:apk :calling:
:x: 63c18d4f #4 2024-08-30 15:11:01 ~3 min tests :page_facing_up:log
:heavy_check_mark: 63c18d4f #4 2024-08-30 15:15:16 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 63c18d4f #4 2024-08-30 15:15:57 ~8 min android :robot:apk :calling:
:heavy_check_mark: 63c18d4f #4 2024-08-30 15:16:55 ~9 min ios :iphone:ipa :calling:
:x: 306115ac #5 2024-09-04 13:08:37 ~2 min tests :page_facing_up:log
:heavy_check_mark: 306115ac #5 2024-09-04 13:13:13 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 306115ac #5 2024-09-04 13:13:33 ~7 min android :robot:apk :calling:
:heavy_check_mark: 306115ac #5 2024-09-04 13:16:56 ~11 min ios :iphone:ipa :calling:
:x: de3d5b4d #8 2024-09-06 13:27:09 ~2 min tests :page_facing_up:log
:heavy_check_mark: de3d5b4d #8 2024-09-06 13:30:57 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: de3d5b4d #8 2024-09-06 13:31:27 ~6 min android :robot:apk :calling:
:heavy_check_mark: de3d5b4d #8 2024-09-06 13:35:08 ~10 min ios :iphone:ipa :calling:
:x: ccc04e4e #9 2024-09-06 18:49:18 ~2 min tests :page_facing_up:log
:heavy_check_mark: ccc04e4e #9 2024-09-06 18:54:19 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: ccc04e4e #9 2024-09-06 18:54:32 ~7 min android :robot:apk :calling:
:heavy_check_mark: ccc04e4e #9 2024-09-06 18:59:28 ~12 min ios :iphone:ipa :calling:
:x: 6c706ab4 #10 2024-09-06 19:05:13 ~2 min tests :page_facing_up:log
:heavy_check_mark: 6c706ab4 #10 2024-09-06 19:09:12 ~6 min android :robot:apk :calling:
:heavy_check_mark: 6c706ab4 #10 2024-09-06 19:09:50 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 6c706ab4 #10 2024-09-06 19:15:46 ~13 min ios :iphone:ipa :calling:
:x: f1a2576c #11 2024-09-08 13:04:35 ~3 min tests :page_facing_up:log
:heavy_check_mark: f1a2576c #11 2024-09-08 13:08:24 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: f1a2576c #11 2024-09-08 13:09:20 ~7 min android :robot:apk :calling:
:x: e9f6227a #12 2024-09-08 13:13:38 ~2 min tests :page_facing_up:log
:heavy_check_mark: e9f6227a #12 2024-09-08 13:18:06 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: e9f6227a #12 2024-09-08 13:18:14 ~7 min android :robot:apk :calling:
:heavy_check_mark: e9f6227a #12 2024-09-08 13:21:02 ~10 min ios :iphone:ipa :calling:
:x: 7ea1adc5 #13 2024-09-09 08:19:41 ~2 min tests :page_facing_up:log
:heavy_check_mark: 7ea1adc5 #13 2024-09-09 08:24:18 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 7ea1adc5 #13 2024-09-09 08:24:43 ~7 min android :robot:apk :calling:
:heavy_check_mark: 7ea1adc5 #13 2024-09-09 08:26:43 ~9 min ios :iphone:ipa :calling:
:x: bcdc558c #14 2024-09-09 09:44:53 ~2 min tests :page_facing_up:log
:heavy_check_mark: bcdc558c #14 2024-09-09 09:49:24 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: bcdc558c #14 2024-09-09 09:49:50 ~7 min android :robot:apk :calling:
:heavy_check_mark: bcdc558c #14 2024-09-09 09:51:43 ~9 min ios :iphone:ipa :calling:
:x: 9a210d40 #15 2024-09-12 09:27:30 ~2 min tests :page_facing_up:log
:heavy_check_mark: 9a210d40 #15 2024-09-12 09:32:26 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 9a210d40 #15 2024-09-12 09:33:54 ~9 min android :robot:apk :calling:
:heavy_check_mark: 9a210d40 #15 2024-09-12 09:38:25 ~13 min ios :iphone:ipa :calling:
:x: dbe880ad #16 2024-09-13 08:28:48 ~2 min tests :page_facing_up:log
:heavy_check_mark: dbe880ad #16 2024-09-13 08:33:22 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: dbe880ad #16 2024-09-13 08:33:46 ~7 min android :robot:apk :calling:
:heavy_check_mark: dbe880ad #16 2024-09-13 08:36:45 ~10 min ios :iphone:ipa :calling:
:x: 4534d554 #17 2024-09-13 16:31:57 ~2 min tests :page_facing_up:log
:heavy_check_mark: 4534d554 #17 2024-09-13 16:36:33 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 4534d554 #17 2024-09-13 16:36:55 ~7 min android :robot:apk :calling:
:heavy_check_mark: 4534d554 #17 2024-09-13 16:39:46 ~10 min ios :iphone:ipa :calling:
:x: c4a84bb8 #18 2024-09-16 07:19:56 ~2 min tests :page_facing_up:log
:heavy_check_mark: c4a84bb8 #18 2024-09-16 07:24:25 ~7 min android :robot:apk :calling:
:heavy_check_mark: c4a84bb8 #18 2024-09-16 07:24:27 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: c4a84bb8 #18 2024-09-16 07:30:39 ~13 min ios :iphone:ipa :calling:
:x: 1866a489 #20 2024-09-16 14:44:00 ~2 min tests :page_facing_up:log
:heavy_check_mark: 1866a489 #20 2024-09-16 14:47:36 ~6 min android :robot:apk :calling:
:heavy_check_mark: 1866a489 #20 2024-09-16 14:47:52 ~6 min android-e2e :robot:apk :calling:
:x: 606fbf28 #21 2024-09-16 14:55:13 ~2 min tests :page_facing_up:log
:heavy_check_mark: 606fbf28 #21 2024-09-16 14:59:18 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 606fbf28 #21 2024-09-16 15:01:36 ~9 min android :robot:apk :calling:
:heavy_check_mark: 606fbf28 #21 2024-09-16 15:05:18 ~12 min ios :iphone:ipa :calling:
:x: e8975982 #23 2024-09-19 12:02:31 ~2 min tests :page_facing_up:log
:x: fe3aa38b #24 2024-09-19 12:08:24 ~2 min tests :page_facing_up:log
:heavy_check_mark: fe3aa38b #24 2024-09-19 12:13:15 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: fe3aa38b #24 2024-09-19 12:14:42 ~8 min android :robot:apk :calling:
:x: 052e412c #25 2024-09-19 12:24:21 ~3 min tests :page_facing_up:log
:heavy_check_mark: 052e412c #25 2024-09-19 12:29:04 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 052e412c #25 2024-09-19 12:30:33 ~9 min android :robot:apk :calling:
:heavy_check_mark: 052e412c #25 2024-09-19 12:31:12 ~10 min ios :iphone:ipa :calling:
:x: cd210eee #26 2024-09-20 15:06:23 ~2 min tests :page_facing_up:log
:heavy_check_mark: cd210eee #26 2024-09-20 15:10:10 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: cd210eee #26 2024-09-20 15:10:36 ~7 min android :robot:apk :calling:
:heavy_check_mark: cd210eee #26 2024-09-20 15:22:05 ~18 min ios :iphone:ipa :calling:
:x: 82fa774a #27 2024-09-25 06:32:48 ~2 min tests :page_facing_up:log
:heavy_check_mark: 82fa774a #27 2024-09-25 06:37:33 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 82fa774a #27 2024-09-25 06:38:02 ~7 min android :robot:apk :calling:
:heavy_check_mark: 82fa774a #27 2024-09-25 06:42:29 ~12 min ios :iphone:ipa :calling:
:x: 97a86405 #28 2024-09-25 08:26:38 ~2 min tests :page_facing_up:log
:heavy_check_mark: 97a86405 #28 2024-09-25 08:29:56 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 97a86405 #28 2024-09-25 08:31:41 ~7 min android :robot:apk :calling:
:heavy_check_mark: 97a86405 #28 2024-09-25 08:35:50 ~12 min ios :iphone:ipa :calling:
:x: dd2fcae2 #29 2024-09-25 08:41:08 ~2 min tests :page_facing_up:log
:heavy_check_mark: dd2fcae2 #29 2024-09-25 08:45:10 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: dd2fcae2 #29 2024-09-25 08:46:16 ~8 min android :robot:apk :calling:
:heavy_check_mark: dd2fcae2 #29 2024-09-25 08:51:03 ~12 min ios :iphone:ipa :calling:
:x: 3d440d6b #30 2024-09-25 13:06:05 ~2 min tests :page_facing_up:log
:heavy_check_mark: 3d440d6b #30 2024-09-25 13:10:36 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 3d440d6b #30 2024-09-25 13:11:02 ~7 min android :robot:apk :calling:
:heavy_check_mark: 3d440d6b #30 2024-09-25 13:17:01 ~13 min ios :iphone:ipa :calling:
:x: 97cb567d #32 2024-09-25 15:03:12 ~2 min tests :page_facing_up:log
:heavy_check_mark: 97cb567d #32 2024-09-25 15:07:36 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 97cb567d #32 2024-09-25 15:07:51 ~7 min android :robot:apk :calling:
:heavy_check_mark: 97cb567d #32 2024-09-25 15:12:47 ~12 min ios :iphone:ipa :calling:
:x: e8f1fd37 #34 2024-09-26 12:37:04 ~2 min tests :page_facing_up:log
:heavy_check_mark: e8f1fd37 #34 2024-09-26 12:40:50 ~6 min android :robot:apk :calling:
:heavy_check_mark: e8f1fd37 #34 2024-09-26 12:41:42 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: e8f1fd37 #34 2024-09-26 12:47:33 ~13 min ios :iphone:ipa :calling:
:x: 6c7666d3 #35 2024-09-26 18:25:10 ~2 min tests :page_facing_up:log
:heavy_check_mark: 6c7666d3 #35 2024-09-26 18:28:28 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: 6c7666d3 #35 2024-09-26 18:29:46 ~7 min android :robot:apk :calling:
:heavy_check_mark: 6c7666d3 #35 2024-09-26 18:34:21 ~12 min ios :iphone:ipa :calling:
:x: f6b3a922 #36 2024-09-26 18:47:08 ~2 min tests :page_facing_up:log
:heavy_check_mark: f6b3a922 #36 2024-09-26 18:50:36 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: f6b3a922 #36 2024-09-26 18:51:59 ~7 min android :robot:apk :calling:
:heavy_check_mark: f6b3a922 #36 2024-09-26 18:56:12 ~11 min ios :iphone:ipa :calling:
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:x: 231cc5bf #37 2024-09-27 07:12:38 ~2 min tests :page_facing_up:log
:heavy_check_mark: 231cc5bf #37 2024-09-27 07:17:10 ~7 min android-e2e :robot:apk :calling:
:heavy_check_mark: 231cc5bf #37 2024-09-27 07:17:42 ~7 min android :robot:apk :calling:
:heavy_check_mark: 231cc5bf #37 2024-09-27 07:21:44 ~11 min ios :iphone:ipa :calling:
:heavy_check_mark: d333e181 #39 2024-09-27 10:17:44 ~4 min tests :page_facing_up:log
:heavy_check_mark: d333e181 #39 2024-09-27 10:21:44 ~8 min android-e2e :robot:apk :calling:
:heavy_check_mark: d333e181 #39 2024-09-27 10:22:12 ~9 min android :robot:apk :calling:
:heavy_check_mark: d333e181 #39 2024-09-27 10:25:21 ~12 min ios :iphone:ipa :calling:

status-im-auto avatar Aug 28 '24 14:08 status-im-auto

:heavy_check_mark: status-mobile/prs/android-e2e/PR-21140#8 :small_blue_diamond: ~6 min 25 sec :small_blue_diamond: de3d5b4d :small_blue_diamond: :package: android-e2e package

status-im-auto avatar Sep 06 '24 13:09 status-im-auto

Hi @alwx

It'd be great if you add a section with the steps to test and also some demo screenshots or video of it working to the description. It'll also help QA to test this PR

There has been a lot of files changed, so any additional note on the code will also help. :+1:

Thank you!

ulisesmac avatar Sep 09 '24 22:09 ulisesmac

If it depends on #21139 maybe would be better to use #21139 branch (feature/20380) as the base branch so we can review the relevant changes in this PR

briansztamfater avatar Sep 10 '24 04:09 briansztamfater

Does this PR includes integration within the swap flow or just the screens? In case is just the screens, maybe add a way to open them so QA can test them in isolation, and add intruction in the PR description.

briansztamfater avatar Sep 13 '24 01:09 briansztamfater

@briansztamfater @status-im/mobile-qa the integration is done as well. This is how it works:

https://github.com/user-attachments/assets/fe09a495-0404-47e9-a311-77903a6dbd93

alwx avatar Sep 16 '24 07:09 alwx

Hi @alwx, could you please resolve the existing conflicts and rebase the current PR if it's ready for testing? Thanks!

VolodLytvynenko avatar Sep 19 '24 11:09 VolodLytvynenko

@VolodLytvynenko seems like this PR has already been tested in https://github.com/status-im/status-mobile/pull/21269 because that PR is based on this one?

alwx avatar Sep 19 '24 11:09 alwx

@VolodLytvynenko seems like this PR has already been tested in #21269 because that PR is based on this one?

@alwx got it. Thanx for clarification

VolodLytvynenko avatar Sep 19 '24 12:09 VolodLytvynenko

@VolodLytvynenko But did the rebase

alwx avatar Sep 19 '24 12:09 alwx

0% of end-end tests have passed

Total executed tests: 7
Failed tests: 7
Expected to fail tests: 0
Passed tests: 0
IDs of failed tests: 727231,727230,702745,702742,703133,702843,727229 

Failed tests (7)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Test setup failed: critical/chats/test_public_chat_browsing.py:308: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: 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'
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: 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'
    



    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Test setup failed: critical/test_wallet.py:201: in prepare_devices
        self.sign_in_view = SignInView(self.drivers[0])
    ../views/sign_in_view.py:194: in __init__
        self.enter_seed_phrase_next_button = Button(self.driver, translation_id="enter-seed-phrase")
    ../views/base_element.py:427: in __init__
        super(Button, self).__init__(driver, **kwargs)
    ../views/base_element.py:36: in __init__
        self.set_locator()
    ../views/base_element.py:45: in set_locator
        text = transl[self.translation_id]
     'enter-seed-phrase'
    



    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Test setup failed: critical/chats/test_public_chat_browsing.py:23: in prepare_devices
        self.sign_in = SignInView(self.drivers[0])
    ../views/sign_in_view.py:194: in __init__
        self.enter_seed_phrase_next_button = Button(self.driver, translation_id="enter-seed-phrase")
    ../views/base_element.py:427: in __init__
        super(Button, self).__init__(driver, **kwargs)
    ../views/base_element.py:36: in __init__
        self.set_locator()
    ../views/base_element.py:45: in set_locator
        text = transl[self.translation_id]
     'enter-seed-phrase'
    



    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Test setup failed: critical/chats/test_public_chat_browsing.py:23: in prepare_devices
        self.sign_in = SignInView(self.drivers[0])
    ../views/sign_in_view.py:194: in __init__
        self.enter_seed_phrase_next_button = Button(self.driver, translation_id="enter-seed-phrase")
    ../views/base_element.py:427: in __init__
        super(Button, self).__init__(driver, **kwargs)
    ../views/base_element.py:36: in __init__
        self.set_locator()
    ../views/base_element.py:45: in set_locator
        text = transl[self.translation_id]
     'enter-seed-phrase'
    



    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    Test setup failed: critical/test_wallet.py:23: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: 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_wallet_send_eth, id: 727229
    Test setup failed: critical/test_wallet.py:23: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: 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'
    



    status-im-auto avatar Sep 19 '24 13:09 status-im-auto

    Hi @alwx thank you for PR. Take a look found issues.

    ISSUE 1: Unsupported tokens by network are shown in the "Asset to Pay" / "Asset to Receive" list

    Steps:

    1. Restore a user account that holds tokens unsupported on certain networks but available on several networks.
    2. Select a token available on multiple networks (e.g., ETH).
    3. Choose the Optimism or Arbitrum network from the available options in the drawer.
    4. Navigate to the swap page.
    5. Open the "Asset to Pay" or "Asset to Receive" list.
    6. Check whether unsupported tokens for the current network are displayed

    Actual Result:

    Unsupported tokens for the selected network are shown in the "Asset to Pay" / "Asset to Receive" list, this leads to that we can prosseds

    e.g., Arbitrum token not supported on Optimism network Optimism token not supported on Arbitrum network

    https://github.com/user-attachments/assets/9306ab2c-3889-430d-b776-576c735d0e8a

    Expected Result:

    Only tokens supported by the selected network should be displayed in the "Asset to Pay" / "Asset to Receive" list.

    VolodLytvynenko avatar Sep 19 '24 16:09 VolodLytvynenko

    ISSUE 2 Blinks occur after tapping the search field

    Steps:

    1. Go to the swap page.
    2. Open "Select asset to pay" or "Asset to receive."
    3. Tap the search field.

    Actual result:

    • On Android, the screen blinks after tapping the search asset field.

    https://github.com/user-attachments/assets/cddf72b0-c579-4a68-a55a-14775b930bf8

    • On iOS, the keyboard does not open smoothly after tapping the search asset field.

    https://github.com/user-attachments/assets/ba1efedc-1bb9-4527-ab92-32057bda8245

    Expected result:

    No blinks or on Android. The keyboard should open smoothly on iOS without delay.

    Devices:

    • Pixel 7a, Android 13
    • iPhone 11 Pro Max, IOS 17

    VolodLytvynenko avatar Sep 19 '24 16:09 VolodLytvynenko

    ISSUE 3: The 'Approve' button is shown, inspite the approve button is not related to certain token

    Steps:

    1. Go to swap page
    2. Select any ERC-20 non-approved token (e.g. DAI)
    3. Enter some value (e.g. 1 DAI)
    4. Open asset to pay screen
    5. Select any other token (e.g. ETH or token which already approved)

    Actual result:

    • The 'Approve' button is shown, inspite the approve button is not related to ETH token, this button appears only for ERC-20 tokens

    https://github.com/user-attachments/assets/8896a77a-de43-4232-9198-dca68292c57d

    Expected result:

    After selecting a new token, the "Approve" button should appear for tokens only for those that require approval

    VolodLytvynenko avatar Sep 19 '24 16:09 VolodLytvynenko

    I believe this issue is related to issue 3

    ISSUE 4: "Review Swap" button is enabled after selection new token within Asset to Pay screen even when the user lacks sufficient tokens to perform the swap

    Steps:

    1. Restore a user account with at least 2 tokens.
    2. Navigate to the swap page.
    3. Select an ERC-20 approved token (e.g., DAI).
    4. Enter a valid available amount (e.g., 1 DAI).
    5. Open the "Asset to Pay" screen.
    6. Select a token that the user does not have enough balance for (e.g., Wrapped Bitcoin or ETH).

    Actual result:

    The "Review Swap" button remains enabled, allowing the user to proceed with the swap, even though there aren't enough tokens for the transaction.

    https://github.com/user-attachments/assets/0e49e444-339d-4238-9d36-650312f1cebb

    Expected result:

    The "Review Swap" button should be disabled if the user doesn't have sufficient assets for the newly selected token.

    Devices:

    Pixel 7a, Android 13 iPhone 11 Pro Max, iOS 17

    VolodLytvynenko avatar Sep 19 '24 16:09 VolodLytvynenko

    ISSUE 5: The default tokens are shown as disabled on "Asset to Pay" page if those tokens are with 0 value

    Steps:

    1. Create new account or restore an account without any assets
    2. Go to "Asset to Pay" page

    Actual result:

    Default tokens like SNT, DAI, and ETH are shown as disabled in the "Your assets on Mainnet" section if they have a 0 balance. image

    Expected result:

    Tokens with a 0 balance should not be displayed. Only tokens with available assets should be shown.image

    VolodLytvynenko avatar Sep 23 '24 10:09 VolodLytvynenko

    PR_ISSUE 6: "Popular assets on "network" " section is not shown within "Asset to Pay" sheet

    Steps:

    1. Open Asset to Pay sheet

    Actual result:

    image

    Expected result:

    Popular assets on sheet is shown on "Asset to Pay" sheet image

    Devices:

    • Pixel 7a, Android 13
    • iPhone 11 Pro Max, IOS 17

    VolodLytvynenko avatar Sep 23 '24 11:09 VolodLytvynenko

    ISSUE 7: The token is not disabled in the "Asset to Pay" sheet if the same token is already selected in the "Receive" section

    Steps:

    1. Go to the swap page.
    2. Select a token for the "Receive" section (e.g., ETH).
    3. Open the "Asset to Pay" sheet.

    Actual result:

    The same token (e.g., ETH) is not disabled in the "Asset to Pay" sheet even though it is already selected in the "Receive" section.

    https://github.com/user-attachments/assets/ec6759ea-e3ac-4b0c-8b45-40d5ea03a721

    Expected result:

    The token selected in the "Receive" section should be disabled in the "Asset to Pay" sheet to prevent swaping on the same token

    How it works on a desktop:

    https://github.com/user-attachments/assets/ac33b76e-4fef-463d-818d-7ca68f8560eb

    VolodLytvynenko avatar Sep 23 '24 11:09 VolodLytvynenko

    @VolodLytvynenko ready to be re-checked

    alwx avatar Sep 25 '24 08:09 alwx

    57% of end-end tests have passed

    Total executed tests: 7
    Failed tests: 3
    Expected to fail tests: 0
    Passed tests: 4
    
    IDs of failed tests: 727230,703133,727229 
    

    Failed tests (3)

    Click to expand
  • Rerun failed tests

  • 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:244: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:192: 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

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Expected amount of confirmations is 7, in fact 2632
    Expected amount of confirmations is 7, in fact 2708
    critical/test_wallet.py:174: in test_wallet_send_asset_from_drawer
        self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
    ../support/api/network_api.py:131: in wait_for_confirmation_of_transaction
        pytest.fail('The last transaction was not confirmed, address is %s, still has %s confirmations' % (
     The last transaction was not confirmed, address is 0x83DFF07F40642Fb42FEBB5deB6A314c8b725749E, still has 2708 confirmations
    



    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.06929 ETH
    critical/test_wallet.py:159: in test_wallet_send_eth
        self.errors.verify_no_errors()
    base_test_case.py:192: 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.4139 but should be 0.4138
    E    Eth amount in the receivers wallet is 0.0693 but should be 0.0694
    



    Passed tests (4)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    status-im-auto avatar Sep 25 '24 08:09 status-im-auto

    33% of end-end tests have passed

    Total executed tests: 3
    Failed tests: 2
    Expected to fail tests: 0
    Passed tests: 1
    
    IDs of failed tests: 727230,727229 
    

    Failed tests (2)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    critical/test_wallet.py:163: in test_wallet_send_asset_from_drawer
        self.wallet_1.navigate_back_to_wallet_view()
    ../views/base_view.py:455: in navigate_back_to_wallet_view
        while not element.is_element_displayed(1) and counter <= attempts:
    ../views/base_element.py:221: in is_element_displayed
        return self.wait_for_visibility_of_element(sec, ignored_exceptions=ignored_exceptions)
    ../views/base_element.py:145: in wait_for_visibility_of_element
        .until(expected_conditions.visibility_of_element_located((self.by, self.locator)))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:86: in until
        value = method(self._driver)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:152: in _predicate
        return _element_if_visible(driver.find_element(*locator))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webdriver.py:409: in find_element
        return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     A session is either terminated or not started
    E   Stacktrace:
    E   NoSuchDriverError: A session is either terminated or not started
    E       at asyncHandler (/mnt/sauce/appium/appium-v2.11.0/packages/base-driver/lib/protocol/protocol.js:309:15)
    E       at /mnt/sauce/appium/appium-v2.11.0/packages/base-driver/lib/protocol/protocol.js:512:15
    E       at Layer.handle [as handle_request] (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/layer.js:95:5)
    E       at next (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/route.js:149:13)
    E       at Route.dispatch (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/route.js:119:3)
    E       at Layer.handle [as handle_request] (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/layer.js:95:5)
    E       at /mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:284:15
    E       at param (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:365:14)
    E       at param (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:376:14)
    E       at Function.process_params (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:421:3)
    E       at next (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:280:10)
    E       at logger (/mnt/sauce/appium/appium-v2.11.0/node_modules/morgan/index.js:144:5)
    E       at Layer.handle [as handle_request] (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/layer.js:95:5)
    E       at trim_prefix (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:328:13)
    E       at /mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:286:9
    E       at Function.process_params (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:346:12)
    E       at next (/mnt/sauce/appium/appium-v2.11.0/node_modules/express/lib/router/index.js:280:10)
    E       at /mnt/sauce/appium/appium-v2.11.0/node_modules/body-parser/lib/read.js:137:5
    E       at AsyncResource.runInAsyncScope (node:async_hooks:204:9)
    E       at invokeCallback (/mnt/sauce/appium/appium-v2.11.0/node_modules/raw-body/index.js:238:16)
    E       at done (/mnt/sauce/appium/appium-v2.11.0/node_modules/raw-body/index.js:227:7)
    E       at IncomingMessage.onEnd (/mnt/sauce/appium/appium-v2.11.0/node_modules/raw-body/index.js:287:7)
    E       at IncomingMessage.emit (node:events:513:28)
    E       at endReadableNT (node:internal/streams/readable:1359:12)
    E       at processTicksAndRejections (node:internal/process/task_queues:82:21)
    



    2. test_wallet_send_eth, id: 727229

    Expected amount of confirmations is 7, in fact 16547
    Expected amount of confirmations is 7, in fact 16633
    critical/test_wallet.py:142: in test_wallet_send_eth
        self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
    ../support/api/network_api.py:131: in wait_for_confirmation_of_transaction
        pytest.fail('The last transaction was not confirmed, address is %s, still has %s confirmations' % (
     The last transaction was not confirmed, address is 0x83DFF07F40642Fb42FEBB5deB6A314c8b725749E, still has 16633 confirmations
    



    Passed tests (1)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    status-im-auto avatar Sep 25 '24 10:09 status-im-auto

    Hi @alwx thank you for fixes. Take a look found issues:

    Issue 1 is not fully resolved yet. Tokens not supported by the current network can still be found and selected. However, our validation prevents transactions from proceeding with these tokens, so this issue can be considered a follow-up.

    Steps:

    1. Navigate to the swap page.
    2. Open the "Asset to Pay" or "Asset to Receive" list.
    3. Search for unsupported tokens (example: if network is Optimism, then search for Arb token)
    4. Check whether unsupported tokens for the current network are displayed

    Actual Result:

    Unsupported tokens for the selected network are shown in the "Asset to Pay" / "Asset to Receive" list

    https://github.com/user-attachments/assets/db40e1c2-5333-464e-a4c8-f7093f1da436

    VolodLytvynenko avatar Sep 25 '24 11:09 VolodLytvynenko

    @alwx Apologies for message https://github.com/status-im/status-mobile/pull/21140#issuecomment-2373767725. Ignore it please. Issue is fixed

    VolodLytvynenko avatar Sep 25 '24 11:09 VolodLytvynenko

    Issue 2 is not fixed yet; the blinks are still shown. However, this can be considered a follow-up.

    • Pixel 7a, Android 13

    https://github.com/user-attachments/assets/c19bd477-d0c8-498f-b2de-7ba69b8d588c

    • iPhone 11 Pro Max, IOS 17

    https://github.com/user-attachments/assets/8f564a5a-155c-4308-9957-a0cd3a98e430

    VolodLytvynenko avatar Sep 25 '24 11:09 VolodLytvynenko

    issue 3 is fixed

    VolodLytvynenko avatar Sep 25 '24 11:09 VolodLytvynenko

    ISSUE 8: Receive value is not recalculated correctly when new token is selected within Asset to Receive sheet until autorefresh

    Steps:

    1. Go swap page
    2. Prefulfill into Send field
    3. Change token in recieve value
    4. Check recalculation in receive value

    Actual result:

    The value in the Receive field is incorrectly calculated. For example:

    • Initial conversion: DAI 1 -> ETH 0.00037
    • After changing ETH to USDC, it shows: DAI 0.01 -> USDC 378915182.67 instead of DAI 0.01 -> USDC 0.0096.

    https://github.com/user-attachments/assets/06344560-5591-4abd-b1b8-775bed3af093

    Expected result:

    When the token is changed, the data should be recalculated and displayed correctly. An update or upload statement should be shown reflecting the new calculation.

    VolodLytvynenko avatar Sep 25 '24 12:09 VolodLytvynenko

    issue 4 is fixed

    VolodLytvynenko avatar Sep 25 '24 12:09 VolodLytvynenko

    Current issue is with very low priority and can be considered in 2.32 as follow up

    issue 5 is partially fixed. The default tokens are no longer shown as disabled, which is resolved. However, when switching to Network 2, tokens like SNT, DAI, and ETH that exist on Network 1 are shown with a value of 0 on the "Your assets on Mainnet" section, even though they are not present on Network 2

    Steps:

    1. Create new account or restore an account with snt, dai or eth only on Network 1
    2. Select Network 2 for swapping on which tokens are not present, but present on Network 1
    3. Go to "Asset to Pay" page

    Actual result:

    Default tokens (SNT, DAI, ETH) are displayed with a 0 value in the "Your assets on Mainnet" section, even though they are available on Network 1 but not on Network 2, while Network 2 is selected.

    image

    Expected result:

    Tokens should not be shown in "Your assets on Mainnet" section if they are not available on the currently selected network. https://figma.com/design/AD2JSKg0I8dZcylyiGa62O/Swap-for-Mobile?node-id=76-130105&node-type=frame&t=mccNGM33NrJBogCP-0

    VolodLytvynenko avatar Sep 25 '24 13:09 VolodLytvynenko

    issue 6 is fixed

    VolodLytvynenko avatar Sep 25 '24 13:09 VolodLytvynenko

    issue 7 is fixed

    VolodLytvynenko avatar Sep 25 '24 13:09 VolodLytvynenko