Skip to content
CCPEDIAby Unity Nodes
OPENPull Request

test: move the portfolio e2e tests into their own project

#3124by pascalhonegger-daCreated 04-12-2026

Summary

Same move as #3122, for portfolio. The Playwright suite and the OTC trade scripts move to e2e/portfolio. The app keeps only its runtime dependencies.

 example-portfolio
-  implicit: wallet-gateway-remote, mock-oauth2
-  dev: core-wallet-test-utils, @playwright/test, tsx, @inquirer/prompts
-  src/lib/synchronizer.ts        # imported test-utils at runtime
+  src/**/*.test.ts                # vitest
+e2e-portfolio
+  wallet-gateway-remote, mock-oauth2, example-portfolio, core-wallet-test-utils
+  tests/, scripts/otc-trade*.ts

Three commits:

  1. Registry URL and instrument mapping checks become unit tests. They only call pure functions, but ran in Playwright against LocalNet. They now run with vitest next to the code, so the e2e suite no longer imports app internals.
  2. wallet-sdk exports localNetGlobalSynchronizer. The published portfolio app imported this selector from the private core-wallet-test-utils at runtime, which put test utilities in its bundle. The docs examples depended on test-utils only for this selector. It is opt-in and LocalNet-only, so the SDK still never picks a synchronizer on its own.
  3. The suite moves to e2e/portfolio. This drops the last conformance exclusion for an app that hosts e2e tests.

Part of #3102 and #3103

Evidence

  • Before: building example-portfolio built 44 projects, including the remote gateway, all signing drivers and the SQL stores. A change to wallet-gateway-remote rebuilt and linted the app. After: 29 projects. A gateway, driver or store change selects only e2e-portfolio, not the app. pnpm nx conformance:check passes without the example-portfolio exclusion. The new unit tests and wallet-sdk's localNetGlobalSynchronizer tests pass.

Merge Danger

Door: two-way

Blast Radius: CI, wallet-sdk API

wallet-sdk gains an export. Nothing is removed. The portfolio Playwright report uploads from e2e/portfolio/playwright-report/. The OTC trade script moves with the suite: pnpm --filter example-portfolio otc-trade becomes pnpm --filter e2e-portfolio otc-trade.