From e33e27890f81b9ddaa8016e71a70f602a353f5f9 Mon Sep 17 00:00:00 2001 From: SamuelSalas Date: Wed, 4 Dec 2024 15:13:27 -0600 Subject: [PATCH] test: Move files to Wallet folder (#12531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** We currently have a few of our page object files lingering outside of a specific folder. As part of our ongoing efforts to improve the organization and maintainability of our test automation codebase, we need to move Page Object files into their respective folders. This will help streamline the project structure, making it easier for team members to locate and manage the files. The folder where each of the remaining files should be moved have to reflect the functionality or feature on the app. This same structure should be reflected on the selectors folder. Files to relocate to the Wallet folder: - e2e/pages/AccountListView.js (this is not a complete view) - e2e/pages/EditAccountNameView.js - e2e/pages/LoginView.js - e2e/pages/TabBarComponent.js - e2e/pages/TokenOverview.js - e2e/pages/modals/AddAccountModal.js - e2e/pages/modals/ToastModal.js - e2e/pages/modals/AccountActionsModal.js - e2e/pages/modals/NftDetectionModal.js - e2e/pages/modals/WalletActionsModal.js ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** Regression https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c590e21e-b802-496e-96a7-19f927a20acd?tab=workflows ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- .../components/Toast/Toast.tsx | 2 +- .../AccountSelector.test.tsx | 12 +++--- .../AccountSelectorList.tsx | 4 +- .../UI/AssetOverview/AssetOverview.test.tsx | 2 +- .../UI/AssetOverview/AssetOverview.tsx | 2 +- .../UI/AssetOverview/Price/Price.tsx | 2 +- .../UI/CollectibleContractOverview/index.js | 4 +- .../LoginOptionsSwitch/LoginOptionsSwitch.tsx | 2 +- .../UI/Notification/BaseNotification/index.js | 2 +- .../AccountActions/AccountActions.test.tsx | 20 +++++----- .../Views/AccountActions/AccountActions.tsx | 14 +++---- .../AccountConnectMultiSelector.tsx | 4 +- .../AccountSelector/AccountSelector.test.tsx | 6 +-- .../Views/AccountSelector/AccountSelector.tsx | 6 +-- .../AddAccountActions/AddAccountActions.tsx | 6 +-- .../AssetDetailsActions.test.tsx | 2 +- .../AssetDetailsActions.tsx | 2 +- .../EditAccountName/EditAccountName.test.tsx | 2 +- .../Views/EditAccountName/EditAccountName.tsx | 2 +- app/components/Views/Login/index.js | 2 +- .../Views/MultiRpcModal/MultiRpcModal.tsx | 2 +- .../NFTAutoDetectionModal.tsx | 2 +- .../WalletActions/WalletActions.test.tsx | 36 ++++++++--------- .../Views/WalletActions/WalletActions.tsx | 14 +++---- app/util/regex/index.test.ts | 8 ++-- app/util/regex/index.ts | 4 +- e2e/api-specs/json-rpc-coverage.js | 2 +- .../AccountActionsBottomSheet.js} | 18 ++++----- .../AccountListBottomSheet.js} | 40 +++++++++---------- .../AddAccountBottomSheet.js} | 10 ++--- e2e/pages/{ => wallet}/EditAccountNameView.js | 6 +-- e2e/pages/{ => wallet}/LoginView.js | 6 +-- .../{modals => wallet}/NftDetectionModal.js | 2 +- e2e/pages/{ => wallet}/TabBarComponent.js | 6 +-- e2e/pages/{modals => wallet}/ToastModal.js | 2 +- e2e/pages/{ => wallet}/TokenOverview.js | 6 +-- .../WalletActionsBottomSheet.js} | 16 ++++---- .../AccountActionsBottomSheet.selectors.js} | 4 +- .../AccountListBottomSheet.selectors.js} | 7 ++-- .../AddAccountBottomSheet.selectors.js} | 2 +- .../{ => wallet}/EditAccountName.selectors.js | 4 +- .../{ => wallet}/LoginView.selectors.js | 0 .../NftDetectionModal.selectors.js | 0 .../{ => wallet}/TabBar.selectors.js | 0 .../ToastModal.selectors.js | 0 .../{ => wallet}/TokenOverview.selectors.js | 2 +- .../WalletActionsBottomSheet.selectors.js} | 2 +- .../accounts/aes/encryption-with-key.spec.js | 2 +- .../aes/encryption-with-password.spec.js | 2 +- .../accounts/aes/salt-generation.spec.js | 2 +- e2e/specs/accounts/auto-lock.spec.js | 4 +- .../accounts/change-account-name.spec.js | 22 +++++----- .../accounts/import-wallet-account.spec.js | 12 +++--- ...imported-account-remove-and-import.spec.js | 20 +++++----- e2e/specs/accounts/reveal-private-key.spec.js | 14 +++---- .../reveal-secret-recovery-phrase.spec.js | 2 +- e2e/specs/assets/nft-detection-modal.spec.js | 4 +- e2e/specs/browser/browser-tests.spec.js | 3 +- .../advanced-gas-fees.mock.spec.js | 6 +-- .../approve-custom-erc20.spec.js | 2 +- .../approve-default-erc20.spec.js | 2 +- .../increase-allowance-erc20.spec.js | 2 +- .../security-alert-send-eth.mock.spec.js | 6 +-- .../send-erc20-with-dapp.spec.js | 2 +- e2e/specs/confirmations/send-erc721.spec.js | 2 +- e2e/specs/confirmations/send-eth.spec.js | 8 ++-- .../set-approve-for-all-erc721.spec.js | 2 +- .../signatures/personal-sign.spec.js | 2 +- .../security-alert-typed-sign.mock.spec.js | 2 +- .../signatures/typed-sign-v3.spec.js | 2 +- .../signatures/typed-sign-v4.spec.js | 2 +- .../signatures/typed-sign.spec.js | 2 +- .../suggestedGasApi.mock.spec.js | 20 +++++----- .../permission-system-remove-network.spec.js | 2 +- ...on-system-revoke-multiple-accounts.spec.js | 16 ++++---- ...ssion-system-revoke-single-account.spec.js | 2 +- ...ssion-system-revoke-single-network.spec.js | 2 +- e2e/specs/networks/add-custom-rpc.spec.js | 2 +- ...c-after-adding-custom-name-account.spec.js | 24 +++++------ .../sync-after-onboarding.spec.js | 6 +-- .../onboarding-wizard-opt-in.spec.js | 4 +- .../permission-system-delete-wallet.spec.js | 6 +-- ...-system-revoking-multiple-accounts.spec.js | 16 ++++---- .../create-wallet-account.failing.js | 12 +++--- e2e/specs/quarantine/deeplinks.failing.js | 4 +- ...ystem-removing-imported-account.failing.js | 14 +++---- .../quarantine/send-to-contact.failing.js | 6 +-- .../quarantine/swap-token-chart.failing.js | 4 +- e2e/specs/ramps/offramp.spec.js | 6 +-- e2e/specs/ramps/onramp.spec.js | 8 ++-- e2e/specs/settings/addressbook-tests.spec.js | 8 ++-- e2e/specs/settings/contact-us.spec.js | 2 +- e2e/specs/settings/delete-wallet.spec.js | 4 +- e2e/specs/settings/fiat-on-testnets.spec.js | 2 +- .../swaps/swap-action-regression.spec.js | 6 +-- e2e/specs/swaps/swap-action-smoke.spec.js | 6 +-- e2e/specs/swaps/token-details.spec.js | 2 +- .../wallet/portfolio-connect-account.spec.js | 2 +- e2e/specs/wallet/request-token-flow.spec.js | 6 +-- e2e/specs/wallet/send-ERC-token.spec.js | 2 +- e2e/utils/Assertions.js | 2 +- e2e/viewHelper.js | 6 +-- wdio/screen-objects/AccountListComponent.js | 10 ++--- wdio/screen-objects/CommonScreen.js | 5 +-- wdio/screen-objects/LoginScreen.js | 2 +- wdio/screen-objects/Modals/AddAccountModal.js | 9 ++--- .../Modals/NotificationModal.js | 4 +- wdio/screen-objects/Modals/TabBarModal.js | 2 +- .../Modals/WalletActionModal.js | 6 +-- wdio/screen-objects/TokenOverviewScreen.js | 2 +- wdio/screen-objects/WalletMainScreen.js | 15 ++++--- .../Components/AddAccountModal.testIds.js | 2 - .../Components/Notification.testIds.js | 2 - .../testIDs/Screens/WalletView.testIds.js | 1 - 114 files changed, 334 insertions(+), 356 deletions(-) rename e2e/pages/{modals/AccountActionsModal.js => wallet/AccountActionsBottomSheet.js} (53%) rename e2e/pages/{AccountListView.js => wallet/AccountListBottomSheet.js} (68%) rename e2e/pages/{modals/AddAccountModal.js => wallet/AddAccountBottomSheet.js} (58%) rename e2e/pages/{ => wallet}/EditAccountNameView.js (66%) rename e2e/pages/{ => wallet}/LoginView.js (81%) rename e2e/pages/{modals => wallet}/NftDetectionModal.js (86%) rename e2e/pages/{ => wallet}/TabBarComponent.js (85%) rename e2e/pages/{modals => wallet}/ToastModal.js (91%) rename e2e/pages/{ => wallet}/TokenOverview.js (93%) rename e2e/pages/{modals/WalletActionsModal.js => wallet/WalletActionsBottomSheet.js} (52%) rename e2e/selectors/{Modals/AccountActionsModal.selectors.js => wallet/AccountActionsBottomSheet.selectors.js} (70%) rename e2e/selectors/{AccountListView.selectors.js => wallet/AccountListBottomSheet.selectors.js} (66%) rename e2e/selectors/{Modals/AddAccountModal.selectors.js => wallet/AddAccountBottomSheet.selectors.js} (67%) rename e2e/selectors/{ => wallet}/EditAccountName.selectors.js (56%) rename e2e/selectors/{ => wallet}/LoginView.selectors.js (100%) rename e2e/selectors/{Modals => wallet}/NftDetectionModal.selectors.js (100%) rename e2e/selectors/{ => wallet}/TabBar.selectors.js (100%) rename e2e/selectors/{Modals => wallet}/ToastModal.selectors.js (100%) rename e2e/selectors/{ => wallet}/TokenOverview.selectors.js (93%) rename e2e/selectors/{Modals/WalletActionsModal.selectors.js => wallet/WalletActionsBottomSheet.selectors.js} (81%) delete mode 100644 wdio/screen-objects/testIDs/Components/AddAccountModal.testIds.js delete mode 100644 wdio/screen-objects/testIDs/Components/Notification.testIds.js diff --git a/app/component-library/components/Toast/Toast.tsx b/app/component-library/components/Toast/Toast.tsx index aba3e1b9734..170b7543897 100644 --- a/app/component-library/components/Toast/Toast.tsx +++ b/app/component-library/components/Toast/Toast.tsx @@ -38,7 +38,7 @@ import { ToastVariants, } from './Toast.types'; import styles from './Toast.styles'; -import { ToastSelectorsIDs } from '../../../../e2e/selectors/Modals/ToastModal.selectors'; +import { ToastSelectorsIDs } from '../../../../e2e/selectors/wallet/ToastModal.selectors'; import { ButtonProps } from '../Buttons/Button/Button.types'; const visibilityDuration = 2750; diff --git a/app/components/UI/AccountSelectorList/AccountSelector.test.tsx b/app/components/UI/AccountSelectorList/AccountSelector.test.tsx index 506d7e6e37d..ec3a6c860fd 100644 --- a/app/components/UI/AccountSelectorList/AccountSelector.test.tsx +++ b/app/components/UI/AccountSelectorList/AccountSelector.test.tsx @@ -5,7 +5,7 @@ import renderWithProvider from '../../../util/test/renderWithProvider'; import AccountSelectorList from './AccountSelectorList'; import { useAccounts } from '../../../components/hooks/useAccounts'; import { View } from 'react-native'; -import { AccountListViewSelectorsIDs } from '../../../../e2e/selectors/AccountListView.selectors'; +import { AccountListBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountListBottomSheet.selectors'; import { backgroundState } from '../../../util/test/initial-root-state'; import { regex } from '../../../../app/util/regex'; import { @@ -140,10 +140,10 @@ describe('AccountSelectorList', () => { await waitFor(async () => { const businessAccountItem = await queryByTestId( - `${AccountListViewSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, + `${AccountListBottomSheetSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, ); const personalAccountItem = await queryByTestId( - `${AccountListViewSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${PERSONAL_ACCOUNT}`, + `${AccountListBottomSheetSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${PERSONAL_ACCOUNT}`, ); expect(within(businessAccountItem).getByText(regex.eth(1))).toBeDefined(); @@ -183,7 +183,7 @@ describe('AccountSelectorList', () => { expect(accounts.length).toBe(1); const businessAccountItem = await queryByTestId( - `${AccountListViewSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, + `${AccountListBottomSheetSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, ); expect(within(businessAccountItem).getByText(regex.eth(1))).toBeDefined(); @@ -251,7 +251,7 @@ describe('AccountSelectorList', () => { await waitFor(() => { const businessAccountItem = queryByTestId( - `${AccountListViewSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, + `${AccountListBottomSheetSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, ); expect(within(businessAccountItem).getByText(regex.eth(1))).toBeDefined(); @@ -272,7 +272,7 @@ describe('AccountSelectorList', () => { await waitFor(() => { const businessAccountItem = queryByTestId( - `${AccountListViewSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, + `${AccountListBottomSheetSelectorsIDs.ACCOUNT_BALANCE_BY_ADDRESS_TEST_ID}-${BUSINESS_ACCOUNT}`, ); expect(within(businessAccountItem).queryByText(regex.eth(1))).toBeNull(); diff --git a/app/components/UI/AccountSelectorList/AccountSelectorList.tsx b/app/components/UI/AccountSelectorList/AccountSelectorList.tsx index 31cd8eac7cb..499a3eacb96 100644 --- a/app/components/UI/AccountSelectorList/AccountSelectorList.tsx +++ b/app/components/UI/AccountSelectorList/AccountSelectorList.tsx @@ -35,7 +35,7 @@ import Routes from '../../../constants/navigation/Routes'; // Internal dependencies. import { AccountSelectorListProps } from './AccountSelectorList.types'; import styleSheet from './AccountSelectorList.styles'; -import { AccountListViewSelectorsIDs } from '../../../../e2e/selectors/AccountListView.selectors'; +import { AccountListBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountListBottomSheet.selectors'; import { WalletViewSelectorsIDs } from '../../../../e2e/selectors/wallet/WalletView.selectors'; const AccountSelectorList = ({ @@ -81,7 +81,7 @@ const AccountSelectorList = ({ return ( @@ -139,7 +139,7 @@ class CollectibleContractOverview extends PureComponent { icon="send" onPress={this.onSend} label={leftActionButtonText} - testID={SEND_BUTTON_ID} + testID={TokenOverviewSelectorsIDs.SEND_BUTTON} /> StyleSheet.create({ diff --git a/app/components/Views/AccountActions/AccountActions.test.tsx b/app/components/Views/AccountActions/AccountActions.test.tsx index 395735523c2..53a2d7571ea 100644 --- a/app/components/Views/AccountActions/AccountActions.test.tsx +++ b/app/components/Views/AccountActions/AccountActions.test.tsx @@ -10,7 +10,7 @@ import renderWithProvider from '../../../util/test/renderWithProvider'; import Engine from '../../../core/Engine'; import Routes from '../../../constants/navigation/Routes'; import AccountActions from './AccountActions'; -import { AccountActionsModalSelectorsIDs } from '../../../../e2e/selectors/Modals/AccountActionsModal.selectors'; +import { AccountActionsBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountActionsBottomSheet.selectors'; import { backgroundState } from '../../../util/test/initial-root-state'; import { MOCK_ACCOUNTS_CONTROLLER_STATE } from '../../../util/test/accountsControllerTestUtils'; @@ -116,16 +116,16 @@ describe('AccountActions', () => { }); expect( - getByTestId(AccountActionsModalSelectorsIDs.EDIT_ACCOUNT), + getByTestId(AccountActionsBottomSheetSelectorsIDs.EDIT_ACCOUNT), ).toBeDefined(); expect( - getByTestId(AccountActionsModalSelectorsIDs.VIEW_ETHERSCAN), + getByTestId(AccountActionsBottomSheetSelectorsIDs.VIEW_ETHERSCAN), ).toBeDefined(); expect( - getByTestId(AccountActionsModalSelectorsIDs.SHARE_ADDRESS), + getByTestId(AccountActionsBottomSheetSelectorsIDs.SHARE_ADDRESS), ).toBeDefined(); expect( - getByTestId(AccountActionsModalSelectorsIDs.SHOW_PRIVATE_KEY), + getByTestId(AccountActionsBottomSheetSelectorsIDs.SHOW_PRIVATE_KEY), ).toBeDefined(); }); @@ -135,7 +135,7 @@ describe('AccountActions', () => { }); fireEvent.press( - getByTestId(AccountActionsModalSelectorsIDs.VIEW_ETHERSCAN), + getByTestId(AccountActionsBottomSheetSelectorsIDs.VIEW_ETHERSCAN), ); expect(mockNavigate).toHaveBeenCalledWith('Webview', { @@ -152,7 +152,7 @@ describe('AccountActions', () => { state: initialState, }); - fireEvent.press(getByTestId(AccountActionsModalSelectorsIDs.SHARE_ADDRESS)); + fireEvent.press(getByTestId(AccountActionsBottomSheetSelectorsIDs.SHARE_ADDRESS)); expect(Share.open).toHaveBeenCalledWith({ message: '0xC4966c0D659D99699BFD7EB54D8fafEE40e4a756', @@ -165,7 +165,7 @@ describe('AccountActions', () => { }); fireEvent.press( - getByTestId(AccountActionsModalSelectorsIDs.SHOW_PRIVATE_KEY), + getByTestId(AccountActionsBottomSheetSelectorsIDs.SHOW_PRIVATE_KEY), ); expect(mockNavigate).toHaveBeenCalledWith( @@ -190,7 +190,7 @@ describe('AccountActions', () => { state: initialState, }); - fireEvent.press(getByTestId(AccountActionsModalSelectorsIDs.EDIT_ACCOUNT)); + fireEvent.press(getByTestId(AccountActionsBottomSheetSelectorsIDs.EDIT_ACCOUNT)); expect(mockNavigate).toHaveBeenCalledWith('EditAccountName', { selectedAccount: { @@ -218,7 +218,7 @@ describe('AccountActions', () => { ); fireEvent.press( - getByTestId(AccountActionsModalSelectorsIDs.REMOVE_HARDWARE_ACCOUNT), + getByTestId(AccountActionsBottomSheetSelectorsIDs.REMOVE_HARDWARE_ACCOUNT), ); const alertFnMock = Alert.alert as jest.MockedFn; diff --git a/app/components/Views/AccountActions/AccountActions.tsx b/app/components/Views/AccountActions/AccountActions.tsx index e8cd8e00345..720c9a53214 100644 --- a/app/components/Views/AccountActions/AccountActions.tsx +++ b/app/components/Views/AccountActions/AccountActions.tsx @@ -37,7 +37,7 @@ import styleSheet from './AccountActions.styles'; import Logger from '../../../util/Logger'; import { protectWalletModalVisible } from '../../../actions/user'; import Routes from '../../../constants/navigation/Routes'; -import { AccountActionsModalSelectorsIDs } from '../../../../e2e/selectors/Modals/AccountActionsModal.selectors'; +import { AccountActionsBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountActionsBottomSheet.selectors'; import { useMetrics } from '../../../components/hooks/useMetrics'; import { isHardwareAccount, @@ -366,7 +366,7 @@ const AccountActions = () => { actionTitle={strings('account_actions.edit_name')} iconName={IconName.Edit} onPress={goToEditAccountName} - testID={AccountActionsModalSelectorsIDs.EDIT_ACCOUNT} + testID={AccountActionsBottomSheetSelectorsIDs.EDIT_ACCOUNT} /> {isExplorerVisible && ( { } iconName={IconName.Export} onPress={viewInEtherscan} - testID={AccountActionsModalSelectorsIDs.VIEW_ETHERSCAN} + testID={AccountActionsBottomSheetSelectorsIDs.VIEW_ETHERSCAN} /> )} {selectedAddress && isHardwareAccount(selectedAddress) && ( )} { @@ -407,7 +407,7 @@ const AccountActions = () => { actionTitle={strings('accounts.remove_snap_account')} iconName={IconName.Close} onPress={showRemoveSnapAccountAlert} - testID={AccountActionsModalSelectorsIDs.REMOVE_SNAP_ACCOUNT} + testID={AccountActionsBottomSheetSelectorsIDs.REMOVE_SNAP_ACCOUNT} /> ) ///: END:ONLY_INCLUDE_IF diff --git a/app/components/Views/AccountConnect/AccountConnectMultiSelector/AccountConnectMultiSelector.tsx b/app/components/Views/AccountConnect/AccountConnectMultiSelector/AccountConnectMultiSelector.tsx index fbdad5268ee..2a7992fba0c 100644 --- a/app/components/Views/AccountConnect/AccountConnectMultiSelector/AccountConnectMultiSelector.tsx +++ b/app/components/Views/AccountConnect/AccountConnectMultiSelector/AccountConnectMultiSelector.tsx @@ -25,7 +25,7 @@ import Engine from '../../../../core/Engine'; // Internal dependencies. import { ConnectAccountBottomSheetSelectorsIDs } from '../../../../../e2e/selectors/Browser/ConnectAccountBottomSheet.selectors'; -import { AccountListViewSelectorsIDs } from '../../../../../e2e/selectors/AccountListView.selectors'; +import { AccountListBottomSheetSelectorsIDs } from '../../../../../e2e/selectors/wallet/AccountListBottomSheet.selectors'; import AddAccountActions from '../../AddAccountActions'; import styleSheet from './AccountConnectMultiSelector.styles'; import { @@ -355,7 +355,7 @@ const AccountConnectMultiSelector = ({ onPress={() => setScreen(AccountConnectMultiSelectorScreens.AddAccountActions) } - testID={AccountListViewSelectorsIDs.ACCOUNT_LIST_ADD_BUTTON_ID} + testID={AccountListBottomSheetSelectorsIDs.ACCOUNT_LIST_ADD_BUTTON_ID} /> {renderCtaButtons()} diff --git a/app/components/Views/AccountSelector/AccountSelector.test.tsx b/app/components/Views/AccountSelector/AccountSelector.test.tsx index c0382a68803..f306836197c 100644 --- a/app/components/Views/AccountSelector/AccountSelector.test.tsx +++ b/app/components/Views/AccountSelector/AccountSelector.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { screen } from '@testing-library/react-native'; import AccountSelector from './AccountSelector'; import { renderScreen } from '../../../util/test/renderWithProvider'; -import { AccountListViewSelectorsIDs } from '../../../../e2e/selectors/AccountListView.selectors'; +import { AccountListBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountListBottomSheet.selectors'; import Routes from '../../../constants/navigation/Routes'; import { AccountSelectorParams, @@ -140,7 +140,7 @@ describe('AccountSelector', () => { ); const accountsList = screen.getByTestId( - AccountListViewSelectorsIDs.ACCOUNT_LIST_ID, + AccountListBottomSheetSelectorsIDs.ACCOUNT_LIST_ID, ); expect(accountsList).toBeDefined(); }); @@ -158,7 +158,7 @@ describe('AccountSelector', () => { ); const addButton = screen.getByTestId( - AccountListViewSelectorsIDs.ACCOUNT_LIST_ADD_BUTTON_ID, + AccountListBottomSheetSelectorsIDs.ACCOUNT_LIST_ADD_BUTTON_ID, ); expect(addButton).toBeDefined(); }); diff --git a/app/components/Views/AccountSelector/AccountSelector.tsx b/app/components/Views/AccountSelector/AccountSelector.tsx index 15d7573f4fd..0565cb81bf0 100644 --- a/app/components/Views/AccountSelector/AccountSelector.tsx +++ b/app/components/Views/AccountSelector/AccountSelector.tsx @@ -24,7 +24,7 @@ import Button, { ButtonWidthTypes, } from '../../../component-library/components/Buttons/Button'; import AddAccountActions from '../AddAccountActions'; -import { AccountListViewSelectorsIDs } from '../../../../e2e/selectors/AccountListView.selectors'; +import { AccountListBottomSheetSelectorsIDs } from '../../../../e2e/selectors/wallet/AccountListBottomSheet.selectors'; // Internal dependencies. import { AccountSelectorProps, @@ -101,7 +101,7 @@ const AccountSelector = ({ route }: AccountSelectorProps) => { ensByAccountAddress={ensByAccountAddress} isRemoveAccountEnabled privacyMode={privacyMode} - testID={AccountListViewSelectorsIDs.ACCOUNT_LIST_ID} + testID={AccountListBottomSheetSelectorsIDs.ACCOUNT_LIST_ID} />