Skip to content

test(bridge): migrate from Cypress to Playwright#372

Open
fionnachan wants to merge 31 commits into
masterfrom
playwright-migration-w-testnode
Open

test(bridge): migrate from Cypress to Playwright#372
fionnachan wants to merge 31 commits into
masterfrom
playwright-migration-w-testnode

Conversation

@fionnachan

@fionnachan fionnachan commented Jun 26, 2026

Copy link
Copy Markdown
Member

Closes FS-1566

Copilot AI review requested due to automatic review settings June 26, 2026 16:56
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-portal Ready Ready Preview Jul 21, 2026 1:09pm

Request Review

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

Migrates the arb-token-bridge-ui E2E suite from Cypress/Synpress to Playwright + Synpress v3 Playwright commands, and updates CI workflows to run the new Playwright E2E matrix against a service-container testnode. Also includes related infra/code adjustments (local testnode network config generation, RPC URL selection tweaks, and minor test fixes) to support CI stability.

Changes:

  • Replaced Cypress E2E specs/support code with Playwright specs, fixtures, and globalSetup-based chain/wallet preparation.
  • Updated GitHub Actions E2E workflow to run Playwright, use a testnode service container, and publish/restore build artifacts via workflow artifacts.
  • Added small runtime improvements (authenticated Alchemy RPC override for a whitelisted Orbit chain; batch route gating; amount2 deep-link behavior) and tightened withdrawal test helpers.

Reviewed changes

Copilot reviewed 66 out of 70 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/arb-token-bridge-ui/tests/support/index.ts Removed Cypress support bootstrap (MetaMask/network setup + log collector).
packages/arb-token-bridge-ui/tests/support/commands.ts Removed Cypress custom command implementations (replaced by Playwright actions helpers).
packages/arb-token-bridge-ui/tests/e2e/specs/withdrawNativeToken.cy.ts Removed Cypress withdraw-native spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts Removed Cypress withdraw-ERC20 spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts Removed Cypress withdraw-CCTP spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/urlQueryParam.cy.ts Removed Cypress URL query-param spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/txHistory.cy.ts Removed Cypress tx-history spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/switchNetworks.cy.ts Removed Cypress network-switching spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/redeemRetryable.cy.ts Removed Cypress redeem-retryable spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/readClassicDeposits.cy.ts Removed Cypress classic-deposits spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/login.cy.ts Removed Cypress login/balance spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/importToken.cy.ts Removed Cypress import-token spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/depositNativeToken.cy.ts Removed Cypress deposit-native spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/depositERC20.cy.ts Removed Cypress deposit-ERC20 spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/depositCctp.cy.ts Removed Cypress deposit-CCTP spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/batchDeposit.cy.ts Removed Cypress batch-deposit spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specs/approveToken.cy.ts Removed Cypress approve-token spec (ported to Playwright).
packages/arb-token-bridge-ui/tests/e2e/specfiles.json Updated spec matrix file patterns to Playwright spec filenames.
packages/arb-token-bridge-ui/tests/e2e/README.md Removed Cypress-oriented E2E README.
packages/arb-token-bridge-ui/tests/e2e/playwright/synpress.d.ts Added TS ambient module declarations for Synpress v3 Playwright command modules.
packages/arb-token-bridge-ui/tests/e2e/playwright/support/common.ts Added Playwright-shaped replacements for Cypress env/tasks + node-side helpers.
packages/arb-token-bridge-ui/tests/e2e/playwright/support/actions.ts Added Playwright action helpers replacing Cypress custom commands.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/withdrawNativeToken.spec.ts Added Playwright withdraw-native spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/withdrawERC20.spec.ts Added Playwright withdraw-ERC20 spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/withdrawCctp.spec.ts Added Playwright withdraw-CCTP spec (CCTP config).
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/urlQueryParam.spec.ts Added Playwright URL query-param spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/txHistory.spec.ts Added Playwright tx-history spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/switchNetworks.spec.ts Added Playwright network-switching spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/redeemRetryable.spec.ts Added Playwright redeem-retryable spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/readClassicDeposits.spec.ts Added Playwright classic-deposits spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/login.spec.ts Added Playwright login/balance spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/importToken.spec.ts Added Playwright import-token spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/depositNativeToken.spec.ts Added Playwright deposit-native spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/depositERC20.spec.ts Added Playwright deposit-ERC20 spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/depositCctp.spec.ts Added Playwright deposit-CCTP spec (CCTP config).
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/batchDeposit.spec.ts Added Playwright batch-deposit spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/specs/approveToken.spec.ts Added Playwright approve-token spec.
packages/arb-token-bridge-ui/tests/e2e/playwright/README.md Added Playwright E2E documentation and layout/architecture notes.
packages/arb-token-bridge-ui/tests/e2e/playwright/globalSetup.cctp.ts Added CCTP globalSetup to fund wallet + pre-create burns and write config.
packages/arb-token-bridge-ui/tests/e2e/playwright/globalSetup.ts Added regular/orbit globalSetup to prep chains, deploy/fund tokens, and write config.
packages/arb-token-bridge-ui/tests/e2e/playwright/fixtures.ts Added worker-scoped MetaMask persistent context and e2eEnv fixture.
packages/arb-token-bridge-ui/tests/e2e/playwright/e2eConfig.ts Added JSON-based config read/write for Playwright globalSetup → workers.
packages/arb-token-bridge-ui/tests/e2e/getCommonSynpressConfig.ts Removed Cypress/Synpress shared config helper.
packages/arb-token-bridge-ui/tests/e2e/cypress.d.ts Removed Cypress command type declarations.
packages/arb-token-bridge-ui/tests/e2e/cctp.json Removed Cypress CCTP spec list.
packages/arb-token-bridge-ui/tests/e2e/browser.config.ts Removed Cypress Chrome-for-testing browser config.
packages/arb-token-bridge-ui/synpress.cctp.config.ts Removed Cypress Synpress CCTP config.
packages/arb-token-bridge-ui/synpress-plugins.d.ts Removed Cypress Synpress plugins module declaration.
packages/arb-token-bridge-ui/src/util/withdrawals/tests/fetchWithdrawalsTestHelpers.ts Updated Arbitrum RPC test helper provider to include explicit chainId.
packages/arb-token-bridge-ui/src/util/withdrawals/tests/fetchETHWithdrawalsTestHelpers.ts Updated ETH withdrawals test helper provider to include explicit chainId.
packages/arb-token-bridge-ui/src/util/withdrawals/tests/fetchBatchedWithdrawals.test.ts Stabilized mocking of fetchWithdrawals and restores spies.
packages/arb-token-bridge-ui/src/util/rpc/alchemy.ts Added authenticated Alchemy RPC override for a whitelisted Orbit chain.
packages/arb-token-bridge-ui/src/util/networksNitroTestnode.ts Switched local testnode network definitions to generated JSON.
packages/arb-token-bridge-ui/src/util/networksNitroTestnode.generated.json Added generated local testnode network JSON (overwritten in CI).
packages/arb-token-bridge-ui/src/util/networks.ts Uses authenticated Alchemy RPC URL for custom chains.
packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts Added batch-fetch block range config for chainId 869.
packages/arb-token-bridge-ui/src/components/TransferPanel/TransferPanelMain/SourceNetworkBox.tsx Ensures amount2 deep-links open the batch input from an always-mounted component.
packages/arb-token-bridge-ui/src/components/TransferPanel/hooks/useRoutesUpdater.ts Skips non-canonical route quotes for batch transfers and supports amount2 deep-links.
packages/arb-token-bridge-ui/playwright.config.ts Added Playwright config for regular/orbit E2E suite.
packages/arb-token-bridge-ui/playwright.cctp.config.ts Added Playwright config for CCTP E2E suite.
packages/arb-token-bridge-ui/package.json Added Playwright devDependency, removed Cypress-only logging dep, adjusted tooling deps.
packages/arb-token-bridge-ui/.gitignore Ignored Playwright outputs and generated .e2e-config.json.
package.json Switched test:e2e scripts to Playwright; updated overrides including @playwright/test.
audit-ci.jsonc Added ignores for newly documented advisory chain from E2E tooling deps.
.github/workflows/monitoring.yml Updated setup-node action version and pinned Node 22.
.github/workflows/formatSpecfiles.js Updated matrix generation (Playwright spec patterns + testnode tag mapping).
.github/workflows/e2e-tests.yml Reworked E2E CI to use Playwright + testnode service container; split CCTP job.
.github/workflows/build.yml Published build artifacts via workflow artifacts (parameterized name).
.github/actions/restore-build-artifacts/action.yml Restored build artifacts via download-artifact with selectable artifact name.

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

Comment on lines +76 to +78
if (process.env.HEADLESS_MODE) {
browserArgs.push('--headless=new');
}
Comment on lines +26 to +28
if (!process.env.PRIVATE_KEY_USER) {
throw new Error('PRIVATE_KEY_USER variable missing.');
}
fionnachan added 17 commits July 9, 2026 12:04
Expand the Playwright e2e foundation to cover the whole suite and remove the
shared Cypress harness:

- globalSetup ports the Cypress setupNodeEvents chain prep (ERC20/WETH deploy +
  fund, approvals, custom-gas-token, redeem-retryable tx) and fires the
  activity/assertion loops; globalSetup.cctp covers the CCTP testnet setup
- fixtures use a worker-scoped MetaMask context (set up once per worker) pinned
  to MetaMask 11.15.0, plus an e2eEnv config fixture
- support/common.ts and support/actions.ts port the network helpers and all
  Cypress custom commands as page-based async functions
- remove synpress.config.ts, synpress.cctp.config.ts, tests/support, and the
  Cypress-only config/types
fionnachan and others added 10 commits July 9, 2026 12:05
Replace the Cypress GitHub Action with a Playwright run (start app, wait, then
`pnpm test:e2e <spec>`, orbit variants via env), update the spec matrix to
Playwright filenames, and drop the unused cctp.json.
Convert the test-e2e-cctp job from the Cypress GitHub Action to a Playwright
run (install chromium, start app, wait, `pnpm test:e2e:cctp`) so every e2e job
runs on Playwright. Archive Playwright artifacts (test-results, playwright-report)
instead of Cypress videos/screenshots, and rename the leftover
CYPRESS_RECORD_VIDEO env var to RECORD_VIDEO across the workflow and both
Playwright configs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fionnachan
fionnachan force-pushed the playwright-migration-w-testnode branch from 2c1d28c to c85d505 Compare July 9, 2026 11:05
@fionnachan fionnachan changed the title test(WIP): playwright and testnode migration test(bridge): migrate from Cypress to Playwright Jul 9, 2026
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