Skip to content

Wait longer for verify results and use the issuer-name test id in Playwright tests - #288

Merged
ottonomy merged 1 commit into
mainfrom
test/verify-wait-and-issuer-locator
Nov 25, 2026
Merged

ottonomy merged 1 commit into
mainfrom
test/verify-wait-and-issuer-locator

Conversation

@ottonomy

Copy link
Copy Markdown
Contributor

Two Playwright tests needed a retry when the full suite ran against the deployed staging site (PLAYWRIGHT_TEST_URL=https://verifierplus.staging.dccommons.org, 9 workers) during the verifier-plus 3.0.0 Lambda acceptance run. Neither was caused by the deployment; this is test hardening only. No app code changes, no skipped tests, retries unchanged.

What changed and why

  • verifyText.spec.ts "testing vc: issued by test issuer" used getByText('DCC did:web for testing'). Once both the issuer name and the issuer link render, that matches two elements and strict mode fails. This case now checks getByTestId(TestId.IssuerName) has that text; the other cases still use getByText.
  • Waiting after Verify. /api/verify fetches DID documents, status lists and registries; on the deployed site under parallel load it can take longer than Playwright's 5-second default (slowest invocation seen 2.9 s, more under load). A new VERIFY_RESULT_TIMEOUT_MS (20 s, inside the 30 s per-test limit) in tests/helpers/resultLog.ts is applied to the first expectation after clicking Verify in:
    • log.spec.ts (the log tests, plus the tampered and unresolvable did document error checks)
    • verifyURL.spec.ts (waits for the result log before the per-line checks)
    • verifyText.spec.ts (same /api/verify path, same exposure)

Local validation

  • npm test (vitest): 164 passed, 33 skipped.
  • Playwright against a local production build (npm run build, then CREDENTIAL_STORE=memory EXCHANGES=off npm start), 9 workers:
    • the three changed specs, DesktopChrome + MobileChrome, --retries=0: 34 passed;
    • full suite (API, DesktopChrome, MobileChrome, Lambda): 110 passed, none retried, 2 skipped (wallet exchange, skipped with exchanges off).

Not re-run against staging; the local runs show the tests pass but don't recreate staging's slower responses.

🤖 Generated with Claude Code

Against the deployed staging site with 9 workers, two Playwright tests
needed a retry:

- verifyText "issued by test issuer" used getByText('DCC did:web for
  testing'), which matches both the issuer name and the issuer link once
  both render, so strict mode fails. It now checks the issuer-name test id.
- The first check after clicking Verify used Playwright's 5-second
  default, but /api/verify fetches DID documents, status lists and
  registries and can be slower than that under parallel load. The first
  post-Verify expectation in log, verifyURL and verifyText now waits up
  to VERIFY_RESULT_TIMEOUT_MS (20 s, within the 30 s test timeout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ottonomy
ottonomy merged commit aa5cb20 into main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant