test: move the portfolio e2e tests into their own project
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:
- 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.
wallet-sdkexportslocalNetGlobalSynchronizer. The published portfolio app imported this selector from the privatecore-wallet-test-utilsat 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.- 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-portfoliobuilt 44 projects, including the remote gateway, all signing drivers and the SQL stores. A change towallet-gateway-remoterebuilt and linted the app. After: 29 projects. A gateway, driver or store change selects onlye2e-portfolio, not the app.pnpm nx conformance:checkpasses without theexample-portfolioexclusion. The new unit tests andwallet-sdk'slocalNetGlobalSynchronizertests 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.