Skip to content

Commit 0181bdf

Browse files
authored
fix: flaky test Account syncing - Multiple SRPs adds accounts across multiple SRPs and sync them (#37410)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** A PR which changes the text from Create Account to Add Account was merged yesterday: #37288 This introduces flakiness in our e2e, as we had a condition to mitigate flakiness, which relied on Creating Account message which now has changed. This PR updates the copy, so we mitigate the flakiness again. See in the logs how we waited for Creating account .. and since this message is never there anymore, we jump into the next step causing the spec to fail. We should wait until the account creating has completed, by using the new copy. <img width="1018" height="195" alt="image" src="https://github.com/user-attachments/assets/982a32ef-79b7-4d12-8caf-6545f60f0100" /> <img width="1152" height="785" alt="image" src="https://github.com/user-attachments/assets/718bac6e-5fe9-412c-b47f-b3bb475e1a3b" /> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37410?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Check ci ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates e2e selector to check for `Adding account...` instead of `Creating account...` before opening the multichain account menu. > > - **Tests (e2e)** > - In `test/e2e/page-objects/pages/account-list-page.ts`: > - Replace `creatingAccountMessage` with `addingAccountMessage` (`'Creating account...'` -> `'Adding account...'`). > - Update `openMultichainAccountMenu` to assert absence of `addingAccountMessage` before proceeding. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2a8f851. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 7ac842b commit 0181bdf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/e2e/page-objects/pages/account-list-page.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class AccountListPage {
7171
private readonly addImportedAccountButton =
7272
'[data-testid="multichain-account-menu-popover-add-imported-account"]';
7373

74+
private readonly addingAccountMessage = {
75+
text: 'Adding account...',
76+
tag: 'p',
77+
};
78+
7479
private readonly addSnapAccountButton = {
7580
text: 'Add account Snap',
7681
tag: 'button',
@@ -87,11 +92,6 @@ class AccountListPage {
8792
private readonly closeMultichainAccountsPageButton =
8893
'.multichain-page-header button[aria-label="Back"]';
8994

90-
private readonly creatingAccountMessage = {
91-
text: 'Creating account...',
92-
tag: 'p',
93-
};
94-
9595
private readonly addMultichainWalletButton =
9696
'[data-testid="account-list-add-wallet-button"]';
9797

@@ -548,7 +548,7 @@ class AccountListPage {
548548
`Open multichain account menu in account list for account ${options.accountLabel}`,
549549
);
550550
// To ensure no pending Create Account action is in progress
551-
await this.driver.assertElementNotPresent(this.creatingAccountMessage, {
551+
await this.driver.assertElementNotPresent(this.addingAccountMessage, {
552552
waitAtLeastGuard: largeDelayMs,
553553
});
554554

0 commit comments

Comments
 (0)