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

[#21476] Rework login and logout flow to always use biometrics #21628

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

ulisesmac
Copy link
Contributor

@ulisesmac ulisesmac commented Nov 14, 2024

fixes #21476

Summary

This PR implements the new flow defined in figma

Important changes

Moved the ns legacy.status-im.multiaccounts.logout.core to status-im.contexts.profile.logout.events and renamed its events consistently and analogous to our login events, additionally, it doesn't use rf/defn since it's deprecated.

This PR uses dispatch-sync to properly trigger updates on the react state when a user presses a profile to log-in. Here are videos showing the difference, look at the profile card:

  • dispatch:
Screen_Recording_20241113_235854_Status.Debug.mp4
  • dispatch-sync:
Screen_Recording_20241113_235826_Status.Debug.mp4

Additional fixes

To make the review easier, the changes not fully related to the feature had been split into two PRs:

  1. Code style improvements found while solving this issue:
  1. Partially solves

Testing notes

Please test the authentication flows, mainly logging in and logging out, but also changing the password and enabling/disabling biometrics on both Android and iOS.

Platforms

  • Android
  • iOS

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Nov 14, 2024

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9c44fd63 #1 2024-11-14 17:52:07 ~4 min tests 📄log
✔️ 9c44fd63 #1 2024-11-14 17:55:39 ~8 min android-e2e 🤖apk 📲
✔️ 9c44fd63 #1 2024-11-14 17:55:53 ~8 min android 🤖apk 📲
✔️ 9c44fd63 #1 2024-11-14 17:57:05 ~9 min ios 📱ipa 📲
✔️ 7be1be9 #2 2024-11-18 10:42:29 ~4 min tests 📄log
✔️ 7be1be9 #2 2024-11-18 10:46:44 ~8 min android-e2e 🤖apk 📲
✔️ 7be1be9 #2 2024-11-18 10:47:05 ~9 min android 🤖apk 📲
✔️ 7be1be9 #2 2024-11-18 10:47:24 ~9 min ios 📱ipa 📲
✔️ 70f7f64 #3 2024-11-19 01:56:04 ~4 min tests 📄log
✔️ 70f7f64 #3 2024-11-19 01:59:33 ~7 min android-e2e 🤖apk 📲
✔️ 70f7f64 #3 2024-11-19 02:00:09 ~8 min android 🤖apk 📲
✔️ 70f7f64 #3 2024-11-19 02:00:27 ~8 min ios 📱ipa 📲
✔️ ca3973b #4 2024-11-19 02:20:54 ~4 min tests 📄log
✔️ ca3973b #4 2024-11-19 02:24:26 ~8 min android-e2e 🤖apk 📲
✔️ ca3973b #4 2024-11-19 02:24:58 ~8 min android 🤖apk 📲
✔️ ca3973b #4 2024-11-19 02:25:20 ~8 min ios 📱ipa 📲
✔️ b3da606 #5 2024-11-19 03:19:52 ~4 min tests 📄log
✔️ b3da606 #5 2024-11-19 03:22:36 ~7 min android-e2e 🤖apk 📲
✔️ b3da606 #5 2024-11-19 03:24:23 ~8 min ios 📱ipa 📲
✔️ b3da606 #5 2024-11-19 03:30:15 ~14 min android 🤖apk 📲
✔️ 04b10bf #6 2024-11-19 14:42:49 ~5 min tests 📄log
✔️ 04b10bf #6 2024-11-19 14:44:54 ~7 min android 🤖apk 📲
✔️ 04b10bf #6 2024-11-19 14:45:40 ~8 min android-e2e 🤖apk 📲
✔️ 04b10bf #6 2024-11-19 14:46:51 ~9 min ios 📱ipa 📲
d9b5ae7 #7 2024-11-19 17:27:10 ~2 min tests 📄log
✔️ d9b5ae7 #7 2024-11-19 17:32:38 ~7 min android-e2e 🤖apk 📲
✔️ d9b5ae7 #7 2024-11-19 17:33:10 ~8 min android 🤖apk 📲
✔️ d9b5ae7 #7 2024-11-19 17:34:01 ~9 min ios 📱ipa 📲
ca66447 #11 2024-11-19 19:27:24 ~2 min tests 📄log
✔️ ca66447 #11 2024-11-19 19:31:18 ~6 min android-e2e 🤖apk 📲
✔️ ca66447 #11 2024-11-19 19:31:44 ~7 min android 🤖apk 📲
✔️ ca66447 #11 2024-11-19 19:33:21 ~8 min ios 📱ipa 📲
✔️ 6080cef #13 2024-11-19 20:05:41 ~4 min tests 📄log
✔️ 6080cef #13 2024-11-19 20:08:25 ~7 min android 🤖apk 📲
✔️ 6080cef #13 2024-11-19 20:08:39 ~7 min android-e2e 🤖apk 📲
7009e1e #14 2024-11-19 20:13:02 ~3 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 037af86 #15 2024-11-19 20:19:58 ~4 min tests 📄log
✔️ 037af86 #15 2024-11-19 20:21:37 ~6 min android-e2e 🤖apk 📲
✔️ 037af86 #15 2024-11-19 20:23:28 ~8 min android 🤖apk 📲
✔️ 037af86 #15 2024-11-19 20:24:21 ~9 min ios 📱ipa 📲
✔️ 368bfbe #16 2024-11-20 18:49:52 ~4 min tests 📄log
✔️ 368bfbe #16 2024-11-20 18:52:37 ~7 min android 🤖apk 📲
✔️ 368bfbe #16 2024-11-20 18:53:05 ~8 min android-e2e 🤖apk 📲
✔️ 368bfbe #16 2024-11-20 18:54:55 ~9 min ios 📱ipa 📲

(rf/reg-event-fx
:profile.logout/logout
(fn [_]
;; We need to disable notifications before starting the logout process
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Inherited comment from the previous implementation. I tested the app without the dispatch-later and everything seemed to work. But I decided to preserve the behaviour.

@flexsurfer It'd be great if you are able to provide some context on this comment.

Copy link
Member

Choose a reason for hiding this comment

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

i'm afraid i can't help. might be @Parveshdhull could help

Copy link
Member

@flexsurfer flexsurfer left a comment

Choose a reason for hiding this comment

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

thanks, left a few comments

src/status_im/contexts/profile/logout/events.cljs Outdated Show resolved Hide resolved
(rf/reg-event-fx
:profile.logout/logout
(fn [_]
;; We need to disable notifications before starting the logout process
Copy link
Member

Choose a reason for hiding this comment

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

i'm afraid i can't help. might be @Parveshdhull could help

@status-im-auto
Copy link
Member

25% of end-end tests have passed

Total executed tests: 8
Failed tests: 5
Expected to fail tests: 1
Passed tests: 2
IDs of failed tests: 727230,727231,740490,727229,703133 
IDs of expected to fail tests: 702843 

Failed tests (5)

Click to expand
  • Rerun failed tests

  • Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231

    # STEP: Adding new regular account
    Device 1: Find `Button` by `accessibility id`: `add-account`

    critical/test_wallet.py:255: in test_wallet_add_remove_regular_account
        self.wallet_view.add_regular_account(account_name=new_account_name)
    ../views/wallet_view.py:161: in add_regular_account
        self.add_account_button.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 accessibility id: `add-account` 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_balance_mainnet, id: 740490

    Device 1: Tap on found: Button
    ## Sign in (password: qwerty1234)

    critical/test_wallet.py:219: in test_wallet_balance_mainnet
        self.sign_in_view.sign_in()
    ../views/sign_in_view.py:342: in sign_in
        self.password_input.wait_for_visibility_of_element(10)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: EditBox by accessibility id:`password-input` is not found on the screen after wait_for_visibility_of_element
    



    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    ## Recover access(password:qwerty1234, keycard:False)
    Device 1: Wait for element Button for max 20s and click when it is available

    critical/chats/test_public_chat_browsing.py:161: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.sign_in.recover_access(passphrase=waku_user.seed, second_user=True)
    ../views/sign_in_view.py:298: in recover_access
        self.show_profiles_button.wait_and_click(20)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Button by accessibility id:`show-profiles` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    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:163: 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:42: 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

    ## Sign in (password: qwerty1234)
    ## Sign in (password: qwerty1234)

    critical/test_wallet.py:146: in test_wallet_send_eth
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:85: in _check_balances_after_tx
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:52: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:713: in reopen_app
        sign_in_view.sign_in(password)
    ../views/sign_in_view.py:342: in sign_in
        self.password_input.wait_for_visibility_of_element(10)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: EditBox by accessibility id:`password-input` is not found on the screen after wait_for_visibility_of_element
    



    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

    Passed tests (2)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    @VolodLytvynenko VolodLytvynenko removed their assignment Nov 15, 2024
    @VolodLytvynenko
    Copy link
    Contributor

    Hi @yevh-berdnyk, could you take a look at the E2E tests in this PR? The flow has changed, which seems to have broken our E2E runs.

    @VolodLytvynenko
    Copy link
    Contributor

    unassigning myself from this PR. Face id has broken on my ios :(

    @status-im-auto
    Copy link
    Member

    25% of end-end tests have passed

    Total executed tests: 8
    Failed tests: 5
    Expected to fail tests: 1
    Passed tests: 2
    
    IDs of failed tests: 727230,727231,740490,727229,703133 
    
    IDs of expected to fail tests: 702843 
    

    Failed tests (5)

    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:163: 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:42: 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

    ## Sign in (password: qwerty1234)
    ## Sign in (password: qwerty1234)

    critical/test_wallet.py:146: in test_wallet_send_eth
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:85: in _check_balances_after_tx
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:52: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:713: in reopen_app
        sign_in_view.sign_in(password)
    ../views/sign_in_view.py:342: in sign_in
        self.password_input.wait_for_visibility_of_element(10)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: EditBox by accessibility id:`password-input` is not found on the screen after wait_for_visibility_of_element
    



    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    ## Recover access(password:qwerty1234, keycard:False)
    Device 1: Wait for element Button for max 20s and click when it is available

    critical/chats/test_public_chat_browsing.py:161: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.sign_in.recover_access(passphrase=waku_user.seed, second_user=True)
    ../views/sign_in_view.py:298: in recover_access
        self.show_profiles_button.wait_and_click(20)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Button by accessibility id:`show-profiles` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231

    # STEP: Adding new regular account
    Device 1: Find Button by accessibility id: add-account

    critical/test_wallet.py:255: in test_wallet_add_remove_regular_account
        self.wallet_view.add_regular_account(account_name=new_account_name)
    ../views/wallet_view.py:161: in add_regular_account
        self.add_account_button.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 accessibility id: `add-account` 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_balance_mainnet, id: 740490

    Device 1: Tap on found: Button
    ## Sign in (password: qwerty1234)

    critical/test_wallet.py:219: in test_wallet_balance_mainnet
        self.sign_in_view.sign_in()
    ../views/sign_in_view.py:342: in sign_in
        self.password_input.wait_for_visibility_of_element(10)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: EditBox by accessibility id:`password-input` is not found on the screen after wait_for_visibility_of_element
    



    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

    Passed tests (2)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    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

    @Horupa-Olena Horupa-Olena self-assigned this Nov 18, 2024
    @Horupa-Olena Horupa-Olena force-pushed the 21476-fix-biometrics-in-profile-switching-main branch from 9c44fd6 to 7be1be9 Compare November 18, 2024 10:37
    Copy link
    Contributor

    @ilmotta ilmotta left a comment

    Choose a reason for hiding this comment

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

    Switching profiles with biometrics is much better now with this PR.

    But I did notice one problem and I'm sharing the iOS screencasts @ulisesmac. The first video is 2.31 from the production build, the second video is the PR's build. In the PR build I sometimes see a loading spinner after logout, something I've never seen before after logout. When the spinner doesn't appear, I also get the impression the initial animation showing the list of profiles is clunky, unlike what's in the production build.

    Prod build
    https://github.com/user-attachments/assets/f9e02fdf-49ec-408f-8807-f6a54fd5bb79

    PR build
    https://github.com/user-attachments/assets/23fec410-55d8-4488-b9f0-2b68d9bbfc91

    src/status_im/contexts/keycard/migrate/success/view.cljs Outdated Show resolved Hide resolved
    src/status_im/contexts/profile/events.cljs Show resolved Hide resolved
    @yevh-berdnyk yevh-berdnyk requested a review from churik as a code owner November 19, 2024 01:51
    @status-im-auto
    Copy link
    Member

    50% of end-end tests have passed

    Total executed tests: 8
    Failed tests: 3
    Expected to fail tests: 1
    Passed tests: 4
    
    IDs of failed tests: 727230,703133,727229 
    
    IDs of expected to fail tests: 702843 
    

    Failed tests (3)

    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:163: 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:42: 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

    ## Sign in (password: qwerty1234)
    Device 2: Getting username card by 'qwerty1234'

    critical/test_wallet.py:146: in test_wallet_send_eth
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:85: in _check_balances_after_tx
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:52: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    ../views/base_view.py:713: in reopen_app
        sign_in_view.sign_in(password)
    ../views/sign_in_view.py:342: in sign_in
        self.get_user_profile_by_name(user_name).click()
    ../views/sign_in_view.py:406: in get_user_profile_by_name
        return expected_element if expected_element.is_element_displayed(10) else self.driver.fail(
    base_test_case.py:180: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
     Device 1: User qwerty1234 is not found!
    



    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    ## Recover access(password:qwerty1234, keycard:False)
    Device 1: Wait for element Button for max 20s and click when it is available

    critical/chats/test_public_chat_browsing.py:161: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.sign_in.recover_access(passphrase=waku_user.seed, second_user=True)
    ../views/sign_in_view.py:298: in recover_access
        self.show_profiles_button.wait_and_click(20)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Button by accessibility id:`show-profiles` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

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

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    @yevh-berdnyk yevh-berdnyk force-pushed the 21476-fix-biometrics-in-profile-switching-main branch from 70f7f64 to ca3973b Compare November 19, 2024 02:16
    @status-im-auto
    Copy link
    Member

    75% of end-end tests have passed

    Total executed tests: 8
    Failed tests: 1
    Expected to fail tests: 1
    Passed tests: 6
    
    IDs of failed tests: 703133 
    
    IDs of expected to fail tests: 702843 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133

    # STEP: Check that can login with different user
    Device 1: Wait for element `Button` for max 30s and click when it is available

    critical/chats/test_public_chat_browsing.py:220: in test_restore_multiaccount_with_waku_backup_remove_profile_switch
        self.sign_in.show_profiles_button.wait_and_click()
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Button by accessibility id:`show-profiles` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

    Passed tests (6)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    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
    2. test_wallet_balance_mainnet, id: 740490

    @yevh-berdnyk yevh-berdnyk force-pushed the 21476-fix-biometrics-in-profile-switching-main branch from ca3973b to b3da606 Compare November 19, 2024 03:15
    @status-im-auto
    Copy link
    Member

    88% of end-end tests have passed

    Total executed tests: 8
    Failed tests: 0
    Expected to fail tests: 1
    Passed tests: 7
    
    IDs of expected to fail tests: 702843 
    

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

    Passed tests (7)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    @Horupa-Olena
    Copy link

    Switching profiles with biometrics is much better now with this PR.

    But I did notice one problem and I'm sharing the iOS screencasts @ulisesmac. The first video is 2.31 from the production build, the second video is the PR's build. In the PR build I sometimes see a loading spinner after logout, something I've never seen before after logout. When the spinner doesn't appear, I also get the impression the initial animation showing the list of profiles is clunky, unlike what's in the production build.

    Prod build https://github.com/user-attachments/assets/f9e02fdf-49ec-408f-8807-f6a54fd5bb79

    PR build https://github.com/user-attachments/assets/23fec410-55d8-4488-b9f0-2b68d9bbfc91

    @ulisesmac Thank you for your PR. The PR is ready to be merged, but this comment is still unresolved. I need to understand whether a re-test will be required or not.

    Will there be any changes to this?

    Copy link
    Member

    @clauxx clauxx left a comment

    Choose a reason for hiding this comment

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

    Looks good, just left some small comments 👍

    @@ -183,22 +182,21 @@
    :render-fn profile-card}]]))

    (defn password-input
    [processing error]
    (let [auth-method (rf/sub [:auth-method])
    Copy link
    Member

    Choose a reason for hiding this comment

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

    why lift the auth-method sub to the parent if it's only used in this component?

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Hi @clauxx, thanks for noticing.

    The behaviour is a bit different, this subscription has been replaced by another one that calculates the auth-method for all the profiles instead of calculating it for the pressed profile. this change let us have a better UX when the user switches profiles.

    It comes from the parent because there the auth-method is stored in the profile.

    LMK if you have another question!

    @VolodLytvynenko VolodLytvynenko force-pushed the 21476-fix-biometrics-in-profile-switching-main branch from b3da606 to 04b10bf Compare November 19, 2024 14:37
    @ulisesmac
    Copy link
    Contributor Author

    Switching profiles with biometrics is much better now with this PR.
    But I did notice one problem and I'm sharing the iOS screencasts @ulisesmac. The first video is 2.31 from the production build, the second video is the PR's build. In the PR build I sometimes see a loading spinner after logout, something I've never seen before after logout. When the spinner doesn't appear, I also get the impression the initial animation showing the list of profiles is clunky, unlike what's in the production build.
    Prod build https://github.com/user-attachments/assets/f9e02fdf-49ec-408f-8807-f6a54fd5bb79
    PR build https://github.com/user-attachments/assets/23fec410-55d8-4488-b9f0-2b68d9bbfc91

    @ulisesmac Thank you for your PR. The PR is ready to be merged, but this comment is still unresolved. I need to understand whether a re-test will be required or not.

    Will there be any changes to this?

    Hi @ilmotta @Horupa-Olena

    I'm investigating this issue now. Thank you so much @ilmotta for paying attention to this detail. I'll check how to improve it, btw on Android the logout process is faster. I'll post a follow up comment with the results.

    @ulisesmac ulisesmac force-pushed the 21476-fix-biometrics-in-profile-switching-main branch 2 times, most recently from a263581 to 6080cef Compare November 19, 2024 20:00
    @ulisesmac
    Copy link
    Contributor Author

    ulisesmac commented Nov 19, 2024

    @ilmotta @Horupa-Olena

    The implementation has been fixed and the comments solved, here's the final result of logging out.

    iOS:

    Screen.Recording.2024-11-19.at.2.16.56.p.m.mov

    Android:

    video_2024-11-19_14-25-32.mp4

    @Horupa-Olena
    Copy link

    @ulisesmac Thank you for your fix!
    Everything looks good on my side; you can go ahead and merge this PR.

    ulisesmac and others added 8 commits November 20, 2024 12:44
    - Move logout logic to a new namespace, the implementation no longer uses `rf/defn`
    rename and move logout effect
    
    WIP
    
    Improve logging out flow
    
    Rename keyword to `:profile/logout`
    * Fix warning: "null is not an image" in login
    
    * Fix biometric icons
    @ulisesmac ulisesmac force-pushed the 21476-fix-biometrics-in-profile-switching-main branch from 037af86 to 368bfbe Compare November 20, 2024 18:44
    @ulisesmac ulisesmac merged commit ac0a115 into develop Nov 20, 2024
    5 checks passed
    @ulisesmac ulisesmac deleted the 21476-fix-biometrics-in-profile-switching-main branch November 20, 2024 19:51
    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.

    Onboarding - Streamline profile switching with biometric authentication
    10 participants