test(e2e): spec cross-chain swaps - #8039
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…into e2e-tests/p4
|
## What changed - Adds a new `apps/cowswap-e2e-tests` Playwright + Synpress suite: project config, a mock-wallet fixture (viem-backed, instant signing, no MetaMask extension), a per-worker RPC proxy, and page objects for the Swap/Limit/TWAP/Account/Trade flows. - Mocks for `api.cow.fi`/`barn.api.cow.fi` (orders, quotes, trades, appData, etc., recorded from the live barn API), balances/allowances, node RPC calls, LaunchDarkly flags, and the Safe SDK. - Two new CI workflows: `e2e-pw-smoke` (runs `@smoke`-tagged tests on PRs touching frontend/e2e/libs code) and `e2e-pw-nightly` (full suite, 4-way sharded, cron + manual dispatch) — replacing the previously disabled Cypress job in `ci.yml`. `.mergify.yml`'s merge gate switches from `check-success=Cypress` to `check-success=smoke`. - Drops the old `cowswap-frontend-e2e` (Cypress) app from `enabledApps` and its now-unused deps/patches. - `AGENTS.md`/`README.md` docs for the new suite (architecture, mocking mechanics, known flakiness and how it was diagnosed). - No `cowswap-frontend` production code changes. ## Why - Replaces the disabled Cypress e2e setup with a faster, mock-first Playwright suite that doesn't need a live testnet/relayer for most scenarios, and wires it into CI as a PR-gating smoke check plus a nightly full run. ## QA Testing Reviewer note: - Pure test-infrastructure change with no production code diff — nothing to browser-test here. The suite's actual test coverage is added in the stacked [PR #8038](#8038) (market orders) and [PR #8039](#8039) (cross-chain). Developer verification: - `smoke` CI check passed on this PR (no specs exist yet at this point in the stack, so it currently confirms the pipeline wiring itself). ## Preview URLs | Surface | URL | | --- | --- | | swap-dev - branch preview URL | https://swap-dev-git-e2e-tests-p1-cowswap-dev.vercel.app | | explorer-dev - branch preview URL | https://explorer-dev-git-e2e-tests-p1-cowswap-dev.vercel.app | | widget-configurator - branch preview URL | https://widget-configurator-git-e2e-tests-p1-cowswap-dev.vercel.app | | storybook - branch preview URL | https://storybook-git-e2e-tests-p1-cowswap-dev.vercel.app | | cowfi - branch preview URL | https://cowfi-git-e2e-tests-p1-cowswap.vercel.app | --------- Co-authored-by: cowswap-release-sync[bot] <274575433+cowswap-release-sync[bot]@users.noreply.github.com> Co-authored-by: Elena <70885163+elena-zh@users.noreply.github.com> Co-authored-by: elena-zh <elena@cow.fi> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…into e2e-tests/p4
…into e2e-tests/p4
…into e2e-tests/p4
|
Confirmed, this was a real bug — fixed:
Verified with |
What changed
nestedRpcCallRegistry.test.ts, covering the RPC-call tracking shared across bridge specs.cross-chain-swaps.spec.ts— 8@smokePlaywright tests covering: the cross-chain UI's entry point from the Swap form, a NEAR-provider swap, a Bungee-provider swap, an ETH-flow (native ETH) source sent cross-chain, a swap to Solana (SOL/SPL destination), a swap to Bitcoin (BTC destination), and two calculation-parity checks (swap form "Receive" vs. bridge widget "Expected to receive", and bridge "Min. to deposit" vs. swap "Min. to receive").Why
QA Testing
Reviewer note:
smokeCI check is the verification for this PR.Developer verification:
pnpm e2e:smoke(orpnpm --filter @cowprotocol/cowswap-e2e-pw exec playwright test cross-chain-swaps.spec.ts) runs the new spec locally.Preview URLs