test: add marketplace wallet journey - #1220
Conversation
Greptile SummaryAdds stable Compose identifiers and documentation for the controlled Pubky marketplace wallet journey.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreen.kt | Standardizes request-row tags and adds a request-specific Pay-button identifier without changing payment behavior. |
| app/src/androidTest/java/to/bitkit/ui/screens/paymentrequests/PaymentRequestsScreenTest.kt | Updates identifier assertions and verifies that the incoming request exposes its Pay action. |
| app/src/main/java/to/bitkit/ui/screens/profile/PubkyAuthApprovalSheet.kt | Adds stable identifiers to the authorization and success actions. |
| app/src/main/java/to/bitkit/ui/settings/SettingsScreen.kt | Renames the contact-payments switch identifier to align with the documented journey. |
| journeys/pubky-marketplace/README.md | Defines the integration fixture, evidence contract, release provenance, and recorded acceptance runs. |
| journeys/pubky-marketplace/wallet-leg.xml | Encodes the seller-authorization, buyer-payment, broadcast, and confirmation journey. |
Sequence Diagram
sequenceDiagram
participant S as Seller Wallet
participant F as Marketplace Fixture
participant B as Buyer Wallet
participant C as Regtest Chain
S->>F: Authorize watch-only account claim
S->>B: Establish reciprocal linked contacts
F->>B: Deliver marketplace payment request
B->>B: Review and approve payment
B->>C: Broadcast transaction
F->>C: Detect zero-confirmation payment
F->>C: Mine one block
C-->>B: Confirm transaction
C-->>F: Confirm payment
F->>F: Complete marketplace purchase
Reviews (2): Last reviewed commit: "docs: record selector replay" | Re-trigger Greptile
b296556 to
496b457
Compare
496b457 to
0a0f7c8
Compare
piotr-iohk
left a comment
There was a problem hiding this comment.
QA LGTM on the identifiers + journey contract. Did not re-run the isolated marketplace fixture.
Checked latest (0a0f7c8b):
- Cited IDs exist on this branch:
PubkyAuthWatchOnlyConsent/Approve/Authorize/OK,ContactPaymentsToggle,PaymentRequestsSheet,PaymentRequestRow-<id>,PaymentRequestPay-<id>,ReviewAmount,ReviewContactRecipient,GRAB,SendSuccess,ActivityAmount,ActivityTxDetails. xmllint --noout journeys/pubky-marketplace/wallet-leg.xmlpasses.- Compose identifier tests in
PaymentRequestsScreenTestmatch the hyphenated tags. - CI green, including
e2e-tests-staging - pubky_paykit.
Notes, not blockers:
- Merge #1217 first. This PR’s
PaymentRequestRow-/PaymentRequestPay-tags are a subset of #1217 (that one also addsPaymentRequestDismiss-<id>). - PR body QA notes cite request
5db852f6-…/ txa3a427ca…. README records different accepted runs (ad1a8463-…, then selector replayb7f67854-…). Fine if those are separate replays — worth one line so we do not treat it as a mismatch later. - README says #1209 “preserves rejected incoming requests as visible history.” On #1217, parse rejects stay log-only; the visible-history / retry path is the explicit Pay terminal toast. Wording is slightly off.
I am not blocking on not replaying the Locks/Paykit Server fixture here. The journey is documentation of an accepted 2026-09-02 run, and the app-side selectors it needs are present.
0a0f7c8 to
9552ab5
Compare
| <action>Verify the fixture reports the seller and buyer as linked peers</action> | ||
| <action>Have the fixture create one marketplace purchase for the buyer and record its Payment Request id</action> | ||
| <action>Verify the request uses lowercase "btc", a regtest endpoint identifier, and a JSON endpoint value</action> | ||
| <action>Wait for the incoming requests sheet (id "PaymentRequestsSheet")</action> |
There was a problem hiding this comment.
A fresh incoming request opens payment review automatically, so waiting here never produces PaymentRequestsSheet. Could we dismiss the automatic review and tap PaymentRequestsBell before checking the row and Pay identifiers?
jvsena42
left a comment
There was a problem hiding this comment.
Selector-parity pass looks right — I checked every tag the journey uses against bitkit-ios and all of them resolve there except one. Two notes below.
Also: the README pins Paykit Server 867fc883, the adb port maps and the homeserver key, but not the marketplace driver / Locks harness, so nobody else can replay this end to end yet. Is there a ref you can pin, like hardware-wallet/README.md does with bitkit-docker?
| </description> | ||
| <actions> | ||
| <action>Open the fixture setup auth URL in the seller wallet</action> | ||
| <action>Verify the watch-only consent screen (id "PubkyAuthWatchOnlyConsent") is visible</action> |
There was a problem hiding this comment.
Use testTag "X" instead of id "X". The 32 existing journey specs use testTag " 147 times and id " zero times.
s/(id "/(testTag "/ on lines 13, 14, 16, 17, 19, 21, 23, 27-33 and 36.
| modifier = Modifier.weight(1f), | ||
| modifier = Modifier | ||
| .weight(1f) | ||
| .testTag("PaymentRequestPay-${request.paymentRequestId}") |
There was a problem hiding this comment.
PaymentRequestPay-<id> is the only selector in this PR with no iOS counterpart — the iOS pay button (PaymentRequestsView.swift:82-90) has no accessibilityIdentifier, unlike the row at :104.
wallet-leg.xml:29 is written platform-neutrally and the README replays an Android buyer against an iOS seller, so the step won't resolve if the buyer leg runs on iOS. Either add the identifier on iOS or note in the README that this selector is Android-only.
Closes #1212
This PR:
Acceptance evidence covers the full controlled journey: seller watch-only claim, reciprocal linked-contact setup, fresh buyer funding, canonical Paykit delivery, payment approval, zero-confirmation detection, broadcast, one-block confirmation, paid request history, and Locks completion. This branch is rebased onto Android master merge
4527579; the approved original recording and acceptance evidence were captured at0a0f7c8b, and the base sync did not change Marketplace behavior, selectors, or fixtures.Description
PaymentRequestRow-<id>and addsPaymentRequestPay-<id>.PubkyAuthAuthorize,PubkyAuthOK, andContactPaymentsToggleidentifiers.Preview
bitkit-android-1212-journey.mp4
QA Notes
Manual Tests
5db852f6-d47a-43c4-8b17-fb7a654ac4dd→ review the accepted fallback seller identitypubky…apfiy, 15,000 sats, and 141-sat fee → swipe once → verify transactiona3a427ca69a3f1d3f26fb47f38182c8543fdbd997227ddb8a2dec1ef0e927166at zero confirmations → mine one regtest block → verify confirmed Android activity, paid request history without a Pay action, confirmed Paykit delivery, and completed Locks purchase.Automated Checks
PaymentRequestsScreenTest.kt: all five focused Compose tests passed at the original reviewed head, including the incoming row and Pay identifiers.just compile,just test, andjust lint: passed at original reviewed head0a0f7c8b.lightning_securitypassed on its isolated rerun after the first attempt hit a runner Docker host-port collision before test execution.9552ab55c9b9a3b9478e001d7b817abdf8755231includes master merge45275798727913fe264383e99c2fc0da522fa56e;git diff --check,just compile,just test, andjust lintpassed. Detekt reports only existing baseline findings outside this PR.cf96c9a637fd5b037ee4e34b5ea5ea77dd6049c71497d3cb22b4d221159e721c.e21ce4b0bea14e42c0bb437cd8d443deebe6e2ba40488c0b24dbaaad54ec05ec.xmllint --noout journeys/pubky-marketplace/wallet-leg.xml: passed at original reviewed head.