Skip to content

test: argument quoting, clipboard fallback, and landing page visual regression - #212

Merged
0xsamuel1 merged 1 commit into
soroban-testkit:mainfrom
maja507:test/issues-208-209-210-211-copy-quoting-visual
Oct 16, 2026
Merged

0xsamuel1 merged 1 commit into
soroban-testkit:mainfrom
maja507:test/issues-208-209-210-211-copy-quoting-visual

Conversation

@maja507

@maja507 maja507 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor
  • testkit.test.ts: regression tests for buildCommand's argument quoting across coverage, limits, and audit — unquoted when the path has no spaces, quoted when it does, and the unquoted default-path fallbacks.
  • clipboard.ts: extracts the copy logic into copyToClipboard, adding an execCommand-based fallback for browsers/contexts where navigator.clipboard isn't available; App.tsx's copy button now uses it.
  • clipboard.test.ts: covers the Clipboard API path, the no-Clipboard-API fallback, and the fallback-rejected case.
  • App.test.tsx: browser-level (RTL/jsdom) tests that clicking Copy writes the command generated for the currently-active tab, and that copying still works with no Clipboard API present.
  • playwright.config.ts + tests/visual/landing.spec.ts: adds visual regression coverage for the landing page (hero, modules, the command workbench per tab, full page), run as a separate visual-regression CI job.

Setup note for #210: this introduces @playwright/test as a new devDependency and a test:visual / test:visual:update script. Per this session's "no installs" constraint I did not run npm install or generate screenshots, so there are no baseline images yet — the visual-regression CI job will fail until someone runs npm run test:visual:update once (with the dev server building successfully) and commits the resulting tests/visual/__screenshots__/ baselines.

Closes #208,
Closes #209,
Closes #210,
Closes #211.

…sual regression

- testkit.test.ts: add quoting regression tests across coverage/limits/audit
  (unquoted when no spaces, quoted when spaces, default-path fallbacks)
- clipboard.ts: extract copyToClipboard with an execCommand fallback for
  browsers without navigator.clipboard, used by App.tsx's copy button
- clipboard.test.ts: cover the Clipboard API path, the no-Clipboard-API
  fallback, and the case where the fallback copy is rejected
- App.test.tsx: browser-level tests that clicking Copy writes the
  currently-generated command to the clipboard, for the active tab, and
  that copying still succeeds with no Clipboard API present
- playwright.config.ts, tests/visual/landing.spec.ts: add visual regression
  coverage for the landing page (hero, modules, command workbench per tab,
  full page), wired into CI as a separate job
@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@maja507 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@0xsamuel1
0xsamuel1 merged commit 9ae4889 into soroban-testkit:main Oct 16, 2026
0 of 2 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

2 participants