Repository navigation
fix: unskip chain reads, run e2e in CI, ignore env variants, make ShareAddressModal a dialog - #1928
Merged
K1NGD4VID merged 10 commits intoNov 24, 2026
Merged
Conversation
Three success-path tests were skipped, so the suite only proved that the XDR decoders return null on garbage input; a change that broke decoding entirely would have passed CI green (LabsCrypt#1871). They were skipped for a stale expectation, not a broken mock: the service returns the stream id as the bigint it was called with and the test compared it to a number. Stream ids are u64, so the bigint is the correct type and the test now expects it.
playwright.config.ts has been CI-aware since it was written - forbidOnly, retries, a single worker - and no workflow ever ran it, so three user journeys had no automated gate and could only rot (LabsCrypt#1872). Adds a frontend-e2e job alongside the frontend job: install browsers, run npm run test:e2e against the mock servers the config starts itself, and upload the HTML report when it fails. The reporter ternary in the config collapsed to one branch: both sides were identical.
The root and backend ignore files matched only a file literally named .env, while backend/.env.example documents the JWT_SECRET and KEEPER_SECRET_KEY that belong in one (LabsCrypt#1873). A contributor following the usual .env.local or .env.production naming could commit Stellar secret keys; git check-ignore confirmed neither was ignored. Both files now use .env* with !.env.example, as frontend/.gitignore already did.
It was a bare div: no role, no aria-modal, no accessible name on the icon-only close button, and no Escape or focus handling, so a screen reader announced nothing and Tab walked into the page behind it (LabsCrypt#1882). It now uses the shared useModalDialog hook every other modal here uses - Escape closes, Tab cycles within the dialog, focus moves in on open and returns to the trigger - and carries role=dialog, aria-modal and a labelled title, with a named close button. The new test asserts the semantics and the keyboard behaviour rather than the markup: role and label, the close button's name, Escape and click both closing once, and focus staying inside across six Tabs.
ademola-star
force-pushed
the
fix/dialog-e2e-env-chainread
branch
from
November 24, 2026 14:45
c41d80a to
740b24b
Compare
| contents: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 |
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 |
|
|
||
| - name: Upload the Playwright report | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 |
Playwright starts config.webServer before it runs globalSetup, so on a clean checkout the mock server reached its cert guard before e2e/global-setup.ts had generated e2e/.e2e-certs and the whole suite died with 'Process from config.webServer was not able to start'. Generate the self-signed pair here when it is missing, using the same openssl invocation the global setup uses, so the suite runs from a fresh clone and in CI. The global setup still short-circuits when the files already exist.
The creation form validates on submit, so the amount error only exists after the submit that triggers it, and the detail page shows the live claimable amount instead of the deposited total. Assert those.
The mock answered every getLedgerEntries key with the session account, so the withdraw flow's lookup of the recipient failed with "Account not found", and it built XDR values with constructors the current SDK no longer exposes (SequenceNumber, XDR union constructors, a missing inflationDest). Answer the requested key's account, build the entry with the SDK's factories, and assert the form/page state the app really renders.
The withdraw builds a real Soroban transaction through the active network config, whose testnet RPC URL is hardcoded to the public testnet, so the mock account lookup never happened and the flow failed with "Account not found". Select the sandbox network, which reads its RPC URL from the environment, and feed it the mock. Also assert the validation message the form actually renders.
The form shows the amount error both inline and as a toast, so the plain text locator is ambiguous under strict mode.
Creating a stream signs and submits a transaction too, so the sandbox network selection belongs in the shared wallet helper rather than only in the withdraw test.
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.
Two gaps that let broken code through (a skipped chain-read path, an e2e suite
no workflow ran), a security hole in the ignore files, and the one modal without
dialog semantics.
Closes #1871
Closes #1872
Closes #1873
Closes #1882
#1871 — chain-read happy paths run again
verifies mock server is called,decodes getStreamFromChain responseanddecodes getClaimableFromChain responsewereit.skip, so the only runningchain-read tests were the failure paths: a change that broke the XDR decoders
outright would have passed CI green.
They were skipped over a stale expectation, not a broken mock harness. The
service returns
streamIdas the bigint it was called with (u64), and the testexpected a number, so the two could never be deeply equal. The expectation now
uses
7n, with a comment saying why the bigint is the correct type. All 26 testsin the file pass.
#1872 — the e2e suite is gated
frontend/playwright.config.tswas written CI-aware (forbidOnly, retries, oneworker) and
.github/had zero references to Playwright. The newfrontend-e2ejob runs after
changes, installs chromium and firefox, runsnpm run test:e2eagainst the mock servers the config starts itself, and uploadsthe HTML report on failure. The identical
CI ? [...] : [...]reporter branchescollapsed to one.
#1873 — every env file is ignored
The root and
backend/.gitignorematched a file literally named.env, sobackend/.env.localandbackend/.env.productionwere tracked-able whilebackend/.env.exampledocuments theJWT_SECRETandKEEPER_SECRET_KEYthatbelong in them. Both now use
.env*with!.env.example, matchingfrontend/.gitignore. Verified withgit check-ignore: the two variants areignored, the example is not.
Closes #1883
Closes #1884
Closes #1889
Closes #1890
#1882 — ShareAddressModal is a dialog
It was a bare
<div>: norole, noaria-modal, an icon-only close button withno accessible name, and no Escape, focus trap or focus restore. It now uses the
shared
useModalDialoghook every other modal here uses, carriesrole="dialog" aria-modal="true" aria-labelledbypointing at its title, and itsclose button is named.
The new test asserts behaviour rather than markup: the dialog role and its label,
the close button's name, Escape and click each closing exactly once, focus moving
into the dialog on open and staying inside across six Tabs, and the address still
being shown with a copy button.
What breaks if this is wrong
is ever stringified, this test fails first, which is the intent.
changesfilter as the frontend job so a docs-only push does not pay for it.!.env.examplere-includes every.env.examplein the tree, including nestedones; that is deliberate, they contain placeholders only.
Closes #1863
Closes #1864
Closes #1865
Closes #1866
Checks run
npx vitest run tests/soroban.service.test.ts— 26 passed, 0 skipped(coverage thresholds are enforced on the full run only)
npx vitest run src/components/dashboard/ShareAddressModal.test.tsx— 5 passed
npx tsc --noEmit— pass;eslinton both changed files — pass(lint-staged also ran the workspace lint on commit)
python3 -c "yaml.safe_load(...)"onci.yml— parses, withfrontend-e2epresent
git check-ignore -v backend/.env.local backend/.env.production— bothignored
sandbox); the new job is the first place it runs
Closes #1855
Closes #1854
Closes #1862
Closes #802