test: e2e tests expansion to verify developer options and open payments - #2224
Draft
bosbaber wants to merge 2 commits into
Draft
test: e2e tests expansion to verify developer options and open payments#2224bosbaber wants to merge 2 commits into
bosbaber wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Playwright-BDD e2e suite to cover an end-to-end Open Payments purchase flow by introducing an in-process “Mock Open Payments Client App (MOPCA)” and supporting helpers/config to run it against the local TestNet stack.
Changes:
- Add a new Open Payments purchase feature/scenario that provisions merchant + customer users, generates developer keys, runs MOPCA, and verifies settlement via the wallet UI.
- Introduce MOPCA (HTTPS server) and DB/UI helpers to fetch wallet address + developer key metadata needed to authenticate Open Payments client requests.
- Update e2e config/scripts to support local TLS trust and resolve
mopca.testnet.test, plus minor local-stack compose restart policy tweaks.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds locked deps for e2e (@interledger/open-payments, cross-env). |
| local/scripts/local-tools.sh | Adds mopca.testnet.test to the optional local hosts helper. |
| local/rafiki.yaml | Changes restart policy to unless-stopped. |
| local/mockgatehub.yaml | Changes restart policy to unless-stopped. |
| e2e/tsconfig.json | Includes new mopca/**/*.ts sources in TS compilation. |
| e2e/README.md | Documents the new Open Payments purchase scenario and local TLS/host behavior. |
| e2e/playwright.config.ts | Increases test timeout and maps mopca.testnet.test to loopback for Chromium. |
| e2e/package.json | Sets NODE_EXTRA_CA_CERTS for e2e runs and adds new devDependencies. |
| e2e/mopca/server.ts | Adds the in-process MOPCA HTTPS server and Open Payments flow implementation. |
| e2e/helpers/op-merchant.ts | Adds DB + UI helpers to generate/read developer key material and wallet address URLs. |
| e2e/features/steps/open-payments-purchase.steps.ts | Adds step definitions implementing the Open Payments purchase workflow. |
| e2e/features/steps/fixtures.ts | Adds scenario-scoped state/teardown for merchant/customer contexts and MOPCA. |
| e2e/features/open-payments-purchase.feature | Adds the new BDD feature/scenario. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Comment on lines
+232
to
+235
| /** | ||
| * Listen on an OS-assigned free port bound to loopback and return the | ||
| * `mopca.testnet.test` base URL (which also resolves to loopback via /etc/hosts). | ||
| */ |
| return this.client.incomingPayment.create( | ||
| { url: walletAddress.resourceServer, accessToken }, | ||
| { | ||
| expiresAt: new Date(Date.now() + 6000 * 60 * 5).toISOString(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.