feat: migrate accounts tests to the new framework#17452
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
|
|
There was a problem hiding this comment.
Bug: Checkbox and Button Selector Issues
The ChangePasswordView class has two issues:
- The
iUnderstandCheckBoxgetter usesMatchers.getElementByText()with an ID constant (ChoosePasswordSelectorsIDs.I_UNDERSTAND_CHECKBOX_ID) instead ofMatchers.getElementByID(), removing platform-specific handling and likely breaking checkbox interaction. - The
submitButtongetter's text selector was changed fromChoosePasswordSelectorsIDs.RESET_PASSWORD_BUTTON_TEXT('Reset password') toChoosePasswordSelectorsIDs.SAVE_PASSWORD_BUTTON_TEXT('Save'), which may cause tests to fail if the UI button text has not been updated.
e2e/pages/Settings/SecurityAndPrivacy/ChangePasswordView.ts#L23-L54
Bug: Incomplete Test: Missing Visibility Assertion
The iOS-only test "backgrounds then relaunches without needing password on default auto-lock setting" is incomplete. It lacks the crucial assertion to verify WalletView.container is visible after relaunching, which was present in the previous implementation. Additionally, the test contains commented-out debugging code and a debug log statement.
e2e/specs/accounts/auto-lock.spec.ts#L23-L30
metamask-mobile/e2e/specs/accounts/auto-lock.spec.ts
Lines 23 to 30 in 0cfb7ce
Bug: Async Call Not Awaited Causes Tap Failure
The tapAccountIndex method calls this.getMultiselectElement(index), which returns a Promise<DetoxElement>, but the call is not awaited. This results in a Promise object being passed to Gestures.tap() instead of the resolved DetoxElement, causing the tap gesture to fail.
e2e/pages/wallet/AccountListBottomSheet.ts#L99-L102
metamask-mobile/e2e/pages/wallet/AccountListBottomSheet.ts
Lines 99 to 102 in 0cfb7ce
Bug: Async Identifier Handling Fails Scroll Operations
The scrollViewIdentifier getter returns a Promise<DetoxMatcher> but is not awaited when passed to Gestures.scrollToElement. This affects methods such as scrollToDone and scrollToRevealPrivateKey, causing scroll operations to fail because scrollToElement receives a Promise instead of the required identifier.
e2e/pages/Settings/SecurityAndPrivacy/SecurityAndPrivacyView.ts#L132-L141
e2e/pages/Settings/SecurityAndPrivacy/RevealPrivateKeyView.ts#L89-L92
Was this report helpful? Give feedback by reacting with 👍 or 👎
|



Description
This PR aims to migrate the specs under accounts to TS and the new framework.
All regression tests under Accounts are passing properly.
All tests are independent from each other.
PR stats
🚀 14 Page Object files migrated
🚀 13 Selector files migrated
🚀 9 spec files migrated, fixed and using independent tests
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist