Skip to content

docs(testing): add Testing your document quickstart guide#116

Merged
DemchaAV merged 1 commit into
developfrom
docs/test-your-document-quickstart
Jun 1, 2026
Merged

docs(testing): add Testing your document quickstart guide#116
DemchaAV merged 1 commit into
developfrom
docs/test-your-document-quickstart

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

First doc landing in the v1.6.8 cycle. Adds a tutorial-style
quickstart for the existing semantic-layout snapshot API, sibling
to the existing reference-style
docs/operations/layout-snapshot-testing.md.

Came out of the v1.6.7 senior review session when surveying the
test/protection coverage of our presets and examples: the
semantic-layer story (LayoutSnapshot + LayoutSnapshotAssertions

  • a 12 KB reference doc) is well-published; what was missing was
    a "where do I start?" landing page for a developer who just
    wrote their first custom template and wants to lock its shape
    against engine refactors.

What the new doc covers

End-to-end recipe in five steps:

  1. Author the document with GraphCompose.document()...
  2. Add a LayoutSnapshotAssertions.assertMatches(...) test next
    to it
  3. Bless the first baseline with -Dgraphcompose.updateSnapshots=true
  4. Day-to-day: just ./mvnw test; any drift fails the build
  5. Intentional change → re-bless + commit the baseline diff in
    the same PR

Plus a "when to use which layer" table for the three protection
tiers (smoke / layout snapshot / pixel-level visual). Mentions
that the pixel-level visual harness
(PdfVisualRegression + ImageDiff) is currently test-only
and is queued for promotion to public
com.demcha.compose.testing.visual.* as v1.6.8 / v1.7.0 Track N.

What this PR does NOT touch

  • No code changes. Pure docs + README link.
  • layout-snapshot-testing.md (the long reference) — untouched.
    It stays as the deep dive; the new quickstart links into it
    whenever the reader needs more detail.
  • The public testing API surface — already shipped in v1.6.x.
    This doc just makes it more discoverable.

Why land it before Track N1

The doc covers what is already-public API today
(LayoutSnapshotAssertions, LayoutSnapshotJson, the
-Dgraphcompose.updateSnapshots flag). The pixel-level
mention is forward-looking and accurate. No reason to gate the
discoverability win on N1 (promote PdfVisualRegression); that
PR will simply add a sibling guide.

Test plan

  • ./mvnw test -pl . -Dtest=VersionConsistencyGuardTest,DocumentationCoverageTest,DocumentationExamplesTest (doc guards expected to remain green — pure additions, no API touch).
  • Code snippets in the doc compile against the current public
    API (manual review — uses GraphCompose.document(),
    DocumentSession, LayoutSnapshotAssertions.assertMatches,
    all stable from v1.6.0+).

New docs/operations/test-your-document.md — a tutorial-style
end-to-end recipe for protecting a custom document or template
with automated tests. Five steps from "author the document" to
"CI guards the shape on every PR", with a quick layer-selection
table (smoke / layout snapshot / pixel-level visual).

Complements the existing reference-style layout-snapshot-testing.md
(deep dive on the public API, pipeline position, downstream-project
adoption, CI policy). The new doc is the "where do I start"
landing page; the existing doc remains the lookup-friendly
reference.

- README's "What can I do with this?" table row now links to
  BOTH docs so the quickstart is the first thing a new reader
  finds.
- CHANGELOG entry under v1.6.8 Planned § Documentation.
- Pixel-level visual gate is mentioned as "queued for v1.6.8 /
  v1.7.0 Track N" — accurate per the private taskboard; the
  guide does not block on N1 because everything it documents
  for the layout-snapshot path uses already-public API
  (LayoutSnapshotAssertions, LayoutSnapshotJson, the
  -Dgraphcompose.updateSnapshots flag).
@DemchaAV DemchaAV merged commit c4f54d0 into develop Jun 1, 2026
11 checks passed
@DemchaAV DemchaAV deleted the docs/test-your-document-quickstart branch June 1, 2026 16:02
DemchaAV added a commit that referenced this pull request Jun 1, 2026
…mple (final audit)

A second audit pass after promoting the site to the official
Pages target, addressing inconsistencies the first pass missed:

- components/Pipeline.tsx — the §03 "How it works" §01 step's
  STEP1 source sample still used the legacy
  `flow.addSection(s -> s.addParagraph(...).addTable(rows))` shape
  with no section-name argument. Rewritten to mirror real DSL:
  `page.addSection("Summary", s -> s.addParagraph(p -> p.text(...))
  .addTable(t -> t.header(...).row(...)))`.

- components/Cta.tsx + components/PaperPage.tsx + lib/presets.tsx
  — every CV demo persona was the placeholder name
  "Avetik Demchaav" that drifted into the draft from earlier
  iterations. Canonical author per `pom.xml`, `README`, javadocs
  and the v1.6.6+ Maven Central release metadata is
  **Artem Demchyshyn**. Replaced across the three locations
  (Cta "Work with me" card, PaperCv CSS fallback for all three
  layout variants, Playground CV preset code sample). Matching
  email address pinned to `demchishynartem@gmail.com` — the same
  one the Central artefact's POM developer block carries.

- components/Cta.tsx — "v2 quickstart" link pointed at
  `docs/quickstart.md`, a file that does not exist in the repo
  (a pre-existing dead link in the draft). Redirected to
  `docs/operations/test-your-document.md` — the testing
  quickstart guide that landed in v1.6.8 (#116). Link text
  updated to "Testing quickstart" to match.

Verification: ./out static export still builds clean
(`next build` exits 0, 4 pages, 99.8 kB first-load JS).
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