Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set spending cap screen #20727

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

briansztamfater
Copy link
Member

@briansztamfater briansztamfater commented Jul 11, 2024

fixes #20336

Summary

This PR implements Set Spending Cap screen, no backend integration yet and some data is hardcoded for now, but UI should be functional and most of the logic should be in place

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • wallet / transactions

Steps to test

  • Open Status
  • Log in
  • Open wallet
  • Select an account
  • Tap on Swap
  • Select an asset in asset to pay screen
  • Tap on Set spending cap button to navigate to Set spending cap screen
  • Verify UI looks as expected

status: ready

@briansztamfater briansztamfater self-assigned this Jul 11, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Jul 11, 2024

Jenkins Builds

Click to see older builds (56)
Commit #️⃣ Finished (UTC) Duration Platform Result
54450d3 #1 2024-07-11 16:25:28 ~2 min tests 📄log
✔️ 54450d3 #1 2024-07-11 16:30:44 ~7 min android-e2e 🤖apk 📲
✔️ 54450d3 #1 2024-07-11 16:30:49 ~7 min android 🤖apk 📲
✔️ 54450d3 #1 2024-07-11 16:32:00 ~9 min ios 📱ipa 📲
6144b1a #2 2024-07-12 13:52:57 ~2 min tests 📄log
✔️ 6144b1a #2 2024-07-12 13:56:41 ~6 min android 🤖apk 📲
✔️ 6144b1a #2 2024-07-12 13:57:21 ~7 min android-e2e 🤖apk 📲
✔️ 6144b1a #2 2024-07-12 14:00:38 ~10 min ios 📱ipa 📲
270f97d #3 2024-07-12 18:43:15 ~2 min tests 📄log
✔️ 270f97d #3 2024-07-12 18:47:06 ~6 min android-e2e 🤖apk 📲
✔️ 270f97d #3 2024-07-12 18:47:55 ~7 min android 🤖apk 📲
✔️ 270f97d #3 2024-07-12 18:49:27 ~8 min ios 📱ipa 📲
ee39b82 #4 2024-07-12 19:31:39 ~2 min tests 📄log
✔️ ee39b82 #4 2024-07-12 19:35:13 ~6 min android-e2e 🤖apk 📲
✔️ ee39b82 #4 2024-07-12 19:36:24 ~7 min android 🤖apk 📲
✔️ ee39b82 #4 2024-07-12 19:38:24 ~9 min ios 📱ipa 📲
33ecc0e #5 2024-07-12 20:42:40 ~2 min tests 📄log
e6dc11d #6 2024-07-12 20:48:20 ~2 min tests 📄log
✔️ e6dc11d #6 2024-07-12 20:52:15 ~6 min android-e2e 🤖apk 📲
✔️ e6dc11d #6 2024-07-12 20:53:16 ~7 min android 🤖apk 📲
✔️ e6dc11d #6 2024-07-12 20:54:43 ~8 min ios 📱ipa 📲
84d1505 #8 2024-07-14 03:58:38 ~2 min tests 📄log
✔️ 84d1505 #8 2024-07-14 04:03:34 ~7 min android-e2e 🤖apk 📲
✔️ 84d1505 #8 2024-07-14 04:03:35 ~7 min android 🤖apk 📲
✔️ 84d1505 #8 2024-07-14 04:05:41 ~9 min ios 📱ipa 📲
3108604 #9 2024-07-15 23:45:37 ~2 min tests 📄log
✔️ 3108604 #9 2024-07-15 23:49:13 ~6 min android-e2e 🤖apk 📲
✔️ 3108604 #9 2024-07-15 23:50:23 ~7 min android 🤖apk 📲
✔️ 3108604 #9 2024-07-15 23:51:57 ~8 min ios 📱ipa 📲
137bae2 #10 2024-07-16 00:13:10 ~2 min tests 📄log
137bae2 #10 2024-07-16 00:13:22 ~2 min ios 📄log
✔️ 137bae2 #10 2024-07-16 00:16:51 ~6 min android 🤖apk 📲
✔️ 137bae2 #10 2024-07-16 00:18:01 ~7 min android-e2e 🤖apk 📲
4e6d1f4 #11 2024-07-16 16:46:46 ~2 min tests 📄log
✔️ 4e6d1f4 #11 2024-07-16 16:51:49 ~7 min android-e2e 🤖apk 📲
✔️ 4e6d1f4 #11 2024-07-16 16:51:57 ~7 min android 🤖apk 📲
✔️ 4e6d1f4 #11 2024-07-16 16:53:24 ~8 min ios 📱ipa 📲
af8ed51 #12 2024-07-16 17:07:41 ~2 min tests 📄log
✔️ af8ed51 #12 2024-07-16 17:11:22 ~6 min android-e2e 🤖apk 📲
✔️ af8ed51 #12 2024-07-16 17:12:20 ~7 min android 🤖apk 📲
✔️ af8ed51 #12 2024-07-16 17:13:56 ~8 min ios 📱ipa 📲
c9b99ec #13 2024-07-16 19:43:20 ~2 min tests 📄log
✔️ c9b99ec #13 2024-07-16 19:46:30 ~6 min android-e2e 🤖apk 📲
901cb38 #14 2024-07-16 19:49:30 ~2 min tests 📄log
✔️ 901cb38 #14 2024-07-16 19:52:46 ~6 min android 🤖apk 📲
✔️ 901cb38 #14 2024-07-16 19:53:55 ~7 min android-e2e 🤖apk 📲
✔️ 901cb38 #14 2024-07-16 19:55:15 ~8 min ios 📱ipa 📲
dbca863 #15 2024-07-16 20:06:51 ~2 min tests 📄log
✔️ 4c8af0d #16 2024-07-16 20:12:50 ~4 min tests 📄log
✔️ 4c8af0d #16 2024-07-16 20:16:04 ~7 min android-e2e 🤖apk 📲
✔️ 4c8af0d #16 2024-07-16 20:16:06 ~7 min android 🤖apk 📲
✔️ 4c8af0d #16 2024-07-16 20:17:21 ~8 min ios 📱ipa 📲
✔️ f07f0be #17 2024-07-18 19:11:15 ~4 min tests 📄log
✔️ f07f0be #17 2024-07-18 19:12:55 ~6 min android 🤖apk 📲
✔️ f07f0be #17 2024-07-18 19:14:07 ~7 min android-e2e 🤖apk 📲
✔️ f07f0be #17 2024-07-18 19:15:28 ~8 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ db69a3a #18 2024-07-19 20:44:53 ~4 min tests 📄log
✔️ db69a3a #18 2024-07-19 20:46:37 ~6 min android-e2e 🤖apk 📲
✔️ db69a3a #18 2024-07-19 20:48:01 ~7 min android 🤖apk 📲
✔️ db69a3a #18 2024-07-19 20:49:18 ~8 min ios 📱ipa 📲
✔️ 221e281 #19 2024-07-22 11:42:52 ~4 min tests 📄log
✔️ 221e281 #19 2024-07-22 11:44:50 ~6 min android-e2e 🤖apk 📲
✔️ 221e281 #19 2024-07-22 11:45:21 ~6 min android 🤖apk 📲
✔️ 221e281 #19 2024-07-22 11:47:27 ~8 min ios 📱ipa 📲

@briansztamfater briansztamfater force-pushed the feat/set-spending-cap-ui branch 12 times, most recently from af8ed51 to c9b99ec Compare July 16, 2024 19:40
@briansztamfater briansztamfater changed the title [WIP] feat: set spending cap screen feat: set spending cap screen Jul 16, 2024
@briansztamfater briansztamfater force-pushed the feat/set-spending-cap-ui branch 3 times, most recently from dbca863 to 4c8af0d Compare July 16, 2024 20:08
@briansztamfater briansztamfater marked this pull request as ready for review July 16, 2024 21:25
@ajayesivan
Copy link
Contributor

Copy link
Contributor

@ajayesivan ajayesivan left a comment

Choose a reason for hiding this comment

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

Amazing work 🎉

Copy link
Contributor

@mohsen-ghafouri mohsen-ghafouri left a comment

Choose a reason for hiding this comment

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

LGTM, just one small comment :)

{:footer-container-padding 0
:header [quo/page-nav
{:icon-name :i/close
:on-press on-close-action
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:on-press on-close-action
:on-press navigation/navigate-back

from this package [utils.navigation :as navigation]

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

@briansztamfater
Copy link
Member Author

Error after slide to swap: https://github.com/user-attachments/assets/80c6bbe5-fd1e-423e-9dbc-6548f5eddbb4

@ajayesivan Fixed the issue and added a temporary alert to prevent the error.

Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 🙌

@mariia-skrypnyk
Copy link

Hi @briansztamfater !

 Is it correct that this PR should skip manual QA part?

@briansztamfater
Copy link
Member Author

Hi @briansztamfater !

 Is it correct that this PR should skip manual QA part?

HI @mariia-skrypnyk! QA is not strictly required in this case because this PR only includes screen UI with hardcoded data, so it is better to finish integration before involving QA.

@status-im-auto
Copy link
Member

57% of end-end tests have passed

Total executed tests: 7
Failed tests: 2
Expected to fail tests: 1
Passed tests: 4
IDs of failed tests: 727230,727229 
IDs of expected to fail tests: 727232 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    # STEP: Getting ETH amount in the wallet of the sender before transaction
    Device 1: Find `Button` by `xpath`: `//android.view.ViewGroup[contains(@content-desc,'Account 1')]`

    critical/test_wallet.py:161: in test_wallet_send_asset_from_drawer
        sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
    critical/test_wallet.py:43: in _get_balances_before_tx
        self.wallet_1.get_account_element().click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//android.view.ViewGroup[contains(@content-desc,'Account 1')]` 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: Tap on found: Button
    Device 2: Find ChatsTab by accessibility id: chats-stack-tab

    critical/test_wallet.py:134: in test_wallet_send_eth
        self.wallet_2.chats_tab.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: ChatsTab by accessibility id: `chats-stack-tab` 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
    



    Expected to fail tests (1)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: Find EditBox by accessibility id: add-address-to-watch
    Device 1: Type 0x8d2413447ff297d30bdc475f6d5cb00254685aae to EditBox

    critical/test_wallet.py:249: in test_wallet_add_remove_watch_only_account
        self.wallet_view.add_watch_only_account(address=address_to_watch, account_name=new_account_name)
    ../views/wallet_view.py:163: in add_watch_only_account
        self.account_has_activity_label.wait_for_visibility_of_element()
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Text by accessibility id:`account-has-activity` is not found on the screen after wait_for_visibility_of_element 
    

    [[Missing networks in account address, https://github.com//issues/20166]]

    Device sessions

    Passed tests (4)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    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

    @briansztamfater
    Copy link
    Member Author

    @status-im/mobile-qa Can you check failed e2e tests please? Thanks in advance!

    @status-im-auto
    Copy link
    Member

    71% of end-end tests have passed

    Total executed tests: 7
    Failed tests: 1
    Expected to fail tests: 1
    Passed tests: 5
    
    IDs of failed tests: 727229 
    
    IDs of expected to fail tests: 727232 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. 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.00809 ETH`

    critical/test_wallet.py:156: in test_wallet_send_eth
        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))]))
     Sender balance is not updated on Etherscan, it is 0.4916 but expected to be 0.4917
    



    Expected to fail tests (1)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: Find EditBox by accessibility id: add-address-to-watch
    Device 1: Type 0x8d2413447ff297d30bdc475f6d5cb00254685aae to EditBox

    critical/test_wallet.py:249: in test_wallet_add_remove_watch_only_account
        self.wallet_view.add_watch_only_account(address=address_to_watch, account_name=new_account_name)
    ../views/wallet_view.py:163: in add_watch_only_account
        self.account_has_activity_label.wait_for_visibility_of_element()
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Text by accessibility id:`account-has-activity` is not found on the screen after wait_for_visibility_of_element 
    

    [[Missing networks in account address, https://github.com//issues/20166]]

    Device sessions

    Passed tests (5)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    @pavloburykh
    Copy link
    Contributor

    @briansztamfater thanks! PR is ready for merge.

    Signed-off-by: Brian Sztamfater <brian@status.im>
    @briansztamfater briansztamfater merged commit 4b7c906 into develop Jul 22, 2024
    6 checks passed
    @briansztamfater briansztamfater deleted the feat/set-spending-cap-ui branch July 22, 2024 11:50
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: DONE
    Development

    Successfully merging this pull request may close these issues.

    Trigger Set spending cap Drawer
    7 participants