Skip to content

test(e2e): Account Management automation#981

Open
blockqa wants to merge 2 commits into
mainfrom
test/e2e-account-management
Open

test(e2e): Account Management automation#981
blockqa wants to merge 2 commits into
mainfrom
test/e2e-account-management

Conversation

@blockqa

@blockqa blockqa commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Account Management E2E tests — new Playwright coverage (e2e/tests/account-management.spec.ts + AccountManagementPage) for: create account, import private key (incl. XP-Chain and duplicate-key confirmation), recovery phrase, Ledger, keystore v4/v6, and invalid keystore. Adds the required data-testids to the Account Management source components, plus constants, CI secrets, and the keystore S3 sync. Mapped to TestRail via custom_automation_id ACC-001…ACC-009 (smoke = create-account; rest regression).
  • Smoke workflow fix — build the extension from the PR merge ref instead of github.head_ref, so the build and the tests run against the same commit (previously a stale branch could build an extension missing newer testids/DOM the tests expect).

Add E2E coverage for Account Management (create account, import private
key incl. XP-Chain and duplicate, recovery phrase, Ledger, keystore
v4/v6, invalid keystore) with supporting data-testids, page object,
constants, and CI secrets/keystore S3 sync.

Also build the extension from the PR merge ref in the smoke workflow so
the build and tests run against the same commit.
@blockqa blockqa requested review from a team as code owners July 13, 2026 15:53
Copilot AI review requested due to automatic review settings July 13, 2026 15:53

Copilot AI 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.

Pull request overview

Adds end-to-end automation for the Account Management area of the Core extension, including new Playwright coverage and the UI test hooks required to make those flows reliably automatable. Also updates CI workflows to align the built extension commit with the tests and to sync keystore fixtures from S3.

Changes:

  • Added Playwright E2E spec + page object for Account Management flows (create account, import private key incl. duplicate, recovery phrase, Ledger, keystore v4/v6, invalid keystore).
  • Added/propagated data-testid attributes across Account Management UI components and shared primitives (wallet cards, address items, recovery phrase grid, etc.).
  • Updated E2E GitHub Actions workflows to avoid building from a stale ref and to download keystore fixtures from S3.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
e2e/tests/account-management.spec.ts New Playwright spec covering Account Management flows and assertions.
e2e/pages/extension/AccountManagementPage.ts New page object encapsulating Account Management interactions and navigation.
e2e/constants.ts Adds env-backed constants for private key + keystore fixtures and expected XP address.
e2e/.gitignore Ignores downloaded keystore fixture directories to prevent committing secrets.
e2e/.env.example Documents new env vars/secrets required for Account Management import tests.
apps/next/src/pages/AccountManagement/components/Wallets/components/AccountListItem/AccountListItem.tsx Adds data-testid to account list rows for stable selectors.
apps/next/src/pages/AccountManagement/components/ImportPrivateKey/components/ImportPrivateKeyForm.tsx Adds testids for private key input and import button.
apps/next/src/pages/AccountManagement/components/ImportPrivateKey/components/DuplicatedAccountConfirmation.tsx Adds testids for duplicate import screen and confirm button.
apps/next/src/pages/AccountManagement/components/ImportKeystoreFile/components/KeystoreFileUpload.tsx Adds testids for keystore file input and “Next” button.
apps/next/src/pages/AccountManagement/components/ImportKeystoreFile/components/KeystoreFilePassword.tsx Adds testids for keystore password input and import button.
apps/next/src/pages/AccountManagement/components/ImportKeystoreFile/components/KeystoreFileError.tsx Adds testids for keystore error screen and “Try again” button.
apps/next/src/pages/AccountManagement/components/AddOrCreateWallet/components/FeatureFlaggedListItem.tsx Threads optional testId through feature-flagged list items.
apps/next/src/pages/AccountManagement/components/AddOrCreateWallet/components/AccountListItem.tsx Applies data-testid to add-wallet menu list items when provided.
apps/next/src/pages/AccountManagement/components/AddOrCreateWallet/AddOrConnectWalletButton.tsx Adds testid to open the add/connect wallet menu.
apps/next/src/pages/AccountManagement/components/AddOrCreateWallet/AddOrConnectWallet.tsx Adds testids for the add-wallet import options (private key, seedphrase, ledger, keystore).
apps/next/src/pages/AccountManagement/components/AddOrCreateWallet/AddAccountButton/AddAccountButton.tsx Adds testid to “Add account” action.
apps/next/src/pages/AccountManagement/components/AccountDetails/components/AddressesCard.tsx Passes testid to the X/P-chain address row for verification.
apps/next/src/components/WalletCard/WalletCard.tsx Adds wallet-level testid and account-count testid for stable selectors.
apps/next/src/components/RecoveryPhraseForm/WordsGrid.tsx Adds per-word data-testid hooks for recovery phrase import automation.
apps/next/src/components/Header/components/HeaderAccount/HeaderAccount.tsx Adds testid to open Account Management from the header.
apps/next/src/components/ConnectLedger/ConnectAvalanche.tsx Adds testid to the Ledger connection title for assertions.
apps/next/src/components/Address/AddressItem.tsx Adds optional testid and data-address attribute to support address assertions.
.github/workflows/e2e_smoke_tests.yaml Stops building from github.head_ref and adds keystore S3 sync for runs that need it.
.github/workflows/e2e_regression_tests.yaml Adds keystore S3 sync and secrets wiring needed for the new regression tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/tests/account-management.spec.ts Outdated
Comment thread e2e/pages/extension/AccountManagementPage.ts
Comment thread .github/workflows/e2e_smoke_tests.yaml
Comment thread e2e/constants.ts Outdated
Comment thread e2e/tests/account-management.spec.ts Outdated
Comment thread e2e/tests/account-management.spec.ts Outdated
Comment thread e2e/tests/account-management.spec.ts Outdated
- Use TEST_CONFIG.wallet/keystore instead of re-parsing env in the spec
- Wait for the keystore import button to be enabled before clicking
- Skip missing fixtures locally but fail loudly in CI (no silent coverage loss)
- Only sync keystore fixtures from S3 on full smoke-workflow runs
- Fix stale KEYSTORE_DIR doc reference in constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants