-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: Refactor WalletView file #10225
Conversation
Bitrise❌❌❌ Commit hash: 357c8d1 Note
|
Bitrise✅✅✅ Commit hash: 07af732 Note
|
Bitrise✅✅✅ Commit hash: fa228d6 Note
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Refactor the WalletView screen to follow the page object model as well as the current guidelines establish by the QA mobile team. As well to unify all the testIDs into one single object.
Summary
app/component-library/components/Pickers/PickerAccount/PickerAccount.tsx: Remove previous
generateTestId
with current testIDWalletViewSelectorsIDs.ACCOUNT_NAME_LABEL_TEXT
app/component-library/components/Pickers/PickerNetwork/PickerNetwork.tsx: Remove previous
generateTestId
with current testIDWalletViewSelectorsIDs.NAVBAR_NETWORK_TEXT
app/component-library/components/Toast/Toast.tsx: Remove previous
generateTestId
with current testIDToastSelectorsIDs.CONTAINER
app/components/UI/AccountOverview/index.js: Remove
currentCurrency
,newAssetTransaction
,toggleReceiveModal
props causing lint issues. Remove previousgenerateTestId
with current testIDWalletViewSelectorsIDs.ACCOUNT_ICON
,WalletViewSelectorsIDs. ACCOUNT_NAME_LABEL_INPUT
,WalletViewSelectorsIDs. ACCOUNT_NAME_LABEL_TEXT
app/components/UI/AddressCopy/AddressCopy.tsx: Remove previous
generateTestId
with current testIDWalletViewSelectorsIDs.ACCOUNT_COPY_BUTTON
,WalletViewSelectorsIDs. ACCOUNT_ADDRESS
app/components/UI/CollectibleContracts/index.js: Remove previous
generateTestId
with current testIDWalletViewSelectorsIDs. IMPORT_NFT_BUTTON
,WalletViewSelectorsIDs. NFT_TAB_CONTAINER
app/components/UI/Navbar/index.js: Remove previous
generateTestId
with current testIDAddContactViewSelectorsIDs.EDIT_BUTTON
,WalletViewSelectorsIDs.NAVBAR_NETWORK_BUTTON
app/components/UI/Tokens/index.test.tsx: Update
getByTestId
with current testIDAddContactViewSelectorsIDs. IMPORT_TOKEN_BUTTON
,WalletViewSelectorsIDs. TOKENS_CONTAINER
app/components/UI/Tokens/index.tsx: Remove previous
generateTestId
with current testIDAddContactViewSelectorsIDs. IMPORT_TOKEN_BUTTON
,WalletViewSelectorsIDs. TOKENS_CONTAINER
app/components/UI/WalletAccount/WalletAccount.test.tsx: Update
getByTestId
with current testIDWalletViewSelectorsIDs.ACCOUNT_ADDRESS
,WalletViewSelectorsIDs. ACCOUNT_COPY_BUTTON
,WalletViewSelectorsIDs. ACCOUNT_ICON
app/components/UI/WalletAccount/WalletAccount.tsx: Remove previous
generateTestId
with current testIDWalletViewSelectorsIDs.ACCOUNT_ADDRESS
,WalletViewSelectorsIDs. ACCOUNT_COPY_BUTTON
,WalletViewSelectorsIDs. ACCOUNT_ICON
app/components/Views/AccountActions/AccountActions.constants.ts: File removed
app/components/Views/AccountActions/AccountActions.test.tsx: Update
getByTestId
with current testIDs fromAccountActionsModalSelectorsIDs
object.app/components/Views/AccountActions/AccountActions.tsx: Remove previous
generateTestId
with current testIDs fromAccountActionsModalSelectorsIDs
object.app/components/Views/TransactionsView/index.js: Remove
generateTestId
app/components/Views/Wallet/index.test.tsx: Update
getByTestId
with current testIDCommonSelectorsIDs.FOX_ICON
,WalletViewSelectorsIDs.WALLET_SCAN_BUTTON
app/components/Views/Wallet/index.tsx: Remove
generateTestId
e2e/pages/Send/TransactionConfirmView.js: Remove
await
insideGestures.waitAndTap()
e2e/pages/WalletView.js: File Relocated
e2e/pages/wallet/WalletView.js: File refactor to POM
e2e/selectors/Common.selectors.js: Add
ANDROID_PROGRESS_BAR
testIde2e/selectors/Modals/AccountActionsModal.selectors.js: File created with already existing testIDs
e2e/selectors/TransactionConfirmView.selectors.js: Remove
eslint
exception linee2e/selectors/wallet/WalletView.selectors.js: Added testIDs located in other files.
e2e/specs/accounts/create-wallet-account.spec.js: Update
pages/wallet/WalletView
file path.e2e/specs/accounts/import-wallet-account.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/assets/import-tokens.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
. ImplementWalletView.tokenInWallet()
.e2e/specs/assets/nft-detection-modal.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/assets/token-detection-import-all.spec.js: Due to some inconsistencies when importing the wallet not showing the import token button, I decided to implement the fixture steps.
e2e/specs/confirmations/advanced-gas-fees.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
. Remove await insideawait Assertions.checkIfVisible()
e2e/specs/confirmations/approve-custom-erc20.spec.js: Update
Assertions. checkIfHasText()
toAssertions. checkIfElementToHaveText()
.e2e/specs/confirmations/increase-allowance-erc20.spec.js: Update
WalletView.checkIfHasText()
toAssertions. checkIfElementToHaveText()
.e2e/specs/networks/add-custom-rpc.spec.js:
e2e/specs/networks/connect-test-network.spec.js: Update
WalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
. UpdateAssertions. checkIfHasText()
toAssertions. checkIfElementToHaveText()
.e2e/specs/onboarding/onboarding-wizard-opt-in.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/permission-systems/permission-system-delete-wallet.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/quarantine/add-edit-custom-eth-mainnet.failing.js: Implement
Assertions.checkIfVisible(WalletView.container)
.e2e/specs/quarantine/contract-nickname.failing.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
. ImplementAssertions.checkIfVisible(WalletView.container)
.e2e/specs/quarantine/deeplinks.failing.js:
e2e/specs/quarantine/import-nft.failing.js: Implement
Assertions.checkIfVisible()
.e2e/specs/quarantine/permission-system-removing-imported-account.failing.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/settings/fiat-on-testnets.spec.js: Update
pages/wallet/WalletView
file path. CreateWalletView.totalBalance
. UpdateAssertions. checkIfHasText()
toAssertions. checkIfElementToHaveText()
.e2e/specs/swaps/swap-token-chart.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/swaps/token-details.spec.js: Update
pages/wallet/WalletView
file path.e2e/specs/wallet/portfolio-connect-account.spec.js: Update
pages/wallet/WalletView
file path. UpdateAssertions. checkIfHasText()
toAssertions. checkIfElementToHaveText()
.e2e/specs/wallet/request-token-flow.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/wallet/send-ERC-token.spec.js: Update
pages/wallet/WalletView
file path. UpdateWalletView.isVisible()
toAssertions.checkIfVisible(WalletView.container)
.e2e/specs/wallet/start-exploring.spec.js: Remove deprecated steps
e2e/utils/Assertions.js: Remove
checkIfHasText
method.e2e/viewHelper.js: Implement
Assertions.checkIfVisible()
forWalletView
andNetworkEducationModal
. Addawait Assertions.checkIfVisible(ToastModal.container)
stepswdio/screen-objects/AddContact.js: Update testIDs to current implementation.
wdio/screen-objects/CommonScreen.js: Update testIDs to current implementation.
wdio/screen-objects/Modals/WalletAccountModal.js: Update testIDs to current implementation.
wdio/screen-objects/WalletMainScreen.js: Update testIDs to current implementation, fix naming issues.
wdio/screen-objects/testIDs/Common.testIds.js: File removed
wdio/screen-objects/testIDs/Screens/WalletView.testIds.js: Walletview testIDs moved to unify file
Related issues
Fixes: #1848
Manual testing steps
Screenshots/Recordings
Smoke test: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/558e5890-c45c-4d8f-bba4-f8c0456cb4d1
Regression test: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/01e5fdff-34cf-4956-b54f-1588c4066139
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist