Skip to content

feat: migrate accounts tests to the new framework#17452

Merged
christopherferreira9 merged 6 commits into
mainfrom
christopher/migrate-accounts-tests
Jul 22, 2025
Merged

feat: migrate accounts tests to the new framework#17452
christopherferreira9 merged 6 commits into
mainfrom
christopher/migrate-accounts-tests

Conversation

@christopherferreira9

@christopherferreira9 christopherferreira9 commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

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

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@github-actions

Copy link
Copy Markdown
Contributor

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.

@christopherferreira9 christopherferreira9 changed the title Christopher/migrate accounts tests feat: migrate account tests to the new framework Jul 22, 2025
@christopherferreira9 christopherferreira9 changed the title feat: migrate account tests to the new framework feat: migrate accounts tests to the new framework Jul 22, 2025
@christopherferreira9 christopherferreira9 added team-qa QA team No QA Needed Apply this label when your PR does not need any QA effort. Run Smoke E2E labels Jul 22, 2025
@github-actions

github-actions Bot commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 32ad8e4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0edf0f6d-6455-4bd4-b6b0-87aed10d872a

Note

  • You can rerun any failed steps by opening the Bitrise build, tapping Rebuild on the upper right then Rebuild unsuccessful Workflows
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@github-actions

github-actions Bot commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 030afd5
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8bfdbed6-1f91-4a3b-b34b-468775e4f51e

Note

  • You can rerun any failed steps by opening the Bitrise build, tapping Rebuild on the upper right then Rebuild unsuccessful Workflows
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@github-actions

github-actions Bot commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 0cfb7ce
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/05120e5f-a593-49dd-be96-ea5c0d6f1a36

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@christopherferreira9 christopherferreira9 marked this pull request as ready for review July 22, 2025 15:55
@christopherferreira9 christopherferreira9 requested a review from a team as a code owner July 22, 2025 15:55

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Checkbox and Button Selector Issues

The ChangePasswordView class has two issues:

  1. The iUnderstandCheckBox getter uses Matchers.getElementByText() with an ID constant (ChoosePasswordSelectorsIDs.I_UNDERSTAND_CHECKBOX_ID) instead of Matchers.getElementByID(), removing platform-specific handling and likely breaking checkbox interaction.
  2. The submitButton getter's text selector was changed from ChoosePasswordSelectorsIDs.RESET_PASSWORD_BUTTON_TEXT ('Reset password') to ChoosePasswordSelectorsIDs.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

get iUnderstandCheckBox(): DetoxElement {
return Matchers.getElementByText(
ChoosePasswordSelectorsIDs.I_UNDERSTAND_CHECKBOX_ID,
);
}
get submitButton(): DetoxElement {
return Matchers.getElementByText(
ChoosePasswordSelectorsIDs.SAVE_PASSWORD_BUTTON_TEXT,
);
}
async typeInConfirmPasswordInputBox(PASSWORD: string): Promise<void> {
await Gestures.typeText(this.passwordInput, PASSWORD, {
hideKeyboard: true,
elemDescription: 'Confirm password input box',
});
}
async reEnterPassword(PASSWORD: string): Promise<void> {
await Gestures.typeText(this.confirmPasswordInput, PASSWORD, {
hideKeyboard: true,
elemDescription: 'Confirm password input box re-enter',
});
}
async tapIUnderstandCheckBox(): Promise<void> {
await Gestures.waitAndTap(this.iUnderstandCheckBox, {
elemDescription: 'I understand checkbox',
});
}

Fix in CursorFix in Web


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

},
async () => {
await device.sendToHome();
// await TestHelpers.launchApp();
logger.debug('launching app');
await device.launchApp({ newInstance: false });
},
);

Fix in CursorFix in Web


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

}
async tapAccountIndex(index: number): Promise<void> {
await Gestures.tap(this.getMultiselectElement(index));
}

Fix in CursorFix in Web


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

async scrollToRevealPrivateKey(): Promise<void> {
await Gestures.scrollToElement(
this.revealPrivateKeyButton,
this.scrollViewIdentifier,
{
elemDescription: 'Reveal private key button',
},
);
}

e2e/pages/Settings/SecurityAndPrivacy/RevealPrivateKeyView.ts#L89-L92

async scrollToDone(): Promise<void> {
await Gestures.scrollToElement(this.doneButton, this.scrollViewIdentifier);
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@sonarqubecloud

Copy link
Copy Markdown

@cmd-ob cmd-ob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work!

@christopherferreira9 christopherferreira9 added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 1a3e131 Jul 22, 2025
72 of 86 checks passed
@christopherferreira9 christopherferreira9 deleted the christopher/migrate-accounts-tests branch July 22, 2025 17:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2025
@metamaskbot metamaskbot added the release-7.53.0 Issue or pull request that will be included in release 7.53.0 label Jul 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.53.0 Issue or pull request that will be included in release 7.53.0 team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants