Skip to content

Reach 100% Ruby coverage and add browser regression tests - #44

Merged
samuel-williams-shopify merged 5 commits into
mainfrom
complete-test-coverage
Sep 27, 2026
Merged

samuel-williams-shopify merged 5 commits into
mainfrom
complete-test-coverage

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

This closes the missing Ruby and template coverage with fixture-backed tests for guide ordering and navigation, reference pages, supplemental Markdown, releases, fallbacks, and exported Bake tasks. Coverage now includes unloaded task/controller files too, with no new exclusions.

The tests also expose and fix asymmetric guide ordering (missing orders now default to zero, with names breaking ties), supplemental documentation resolving against the working directory, missing guides/references returning errors instead of 404s, and crashes with empty READMEs, empty Markdown headings, or guides without introductions. Empty headings use the existing title fallbacks and preserve following content in rendering and documentation tasks.

Coverage Before After
Measured Ruby/template line coverage 819/911 (89.9%) 1,054/1,054 (100%)
Ruby tests 24 70
Browser cases in CI 0 24

The new Chromium suite checks mobile/desktop layouts in light/dark mode, local links and decoded fragment targets under a GitHub Pages subpath, sidebar/deep-link behavior, Mermaid and syntax highlighting, keyboard disclosures, table spacing/overflow, and successful/unavailable search. It builds a real fixture site and reuses the documentation workflow's pinned Pagefind fork. Browser checks are behavioral tests, not a claim of 100% JavaScript coverage.

Validation:

  • Clean Ruby coverage run: 70 tests, 197 assertions, 100% measured line coverage; covered:validate passes.
  • RuboCop, documentation coverage (96/96 public definitions), and web package checks pass.
  • All 24 browser cases pass in CI, including real Pagefind search and fragment validation. The link check also correctly rejects a deliberately removed cross-page method anchor.

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Use existing fallback titles, skip empty headings during section lookup, and preserve introductory content. Cover document titles, rendered guides and homepages, section replacement, and description extraction.

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Fetch each destination once and match decoded URL fragments against IDs and named anchors. Exercise empty fragments, duplicate headings, named anchors, and encoded cross-page Ruby method references.

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
@samuel-williams-shopify
samuel-williams-shopify merged commit c4fd25a into main Sep 27, 2026
22 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the complete-test-coverage branch September 27, 2026 22:04

This branch was successfully deployed

1 active deployment
github-pages-preview — 8bd42d95 Deployed Sep 27, 2026 by samuel-williams-shopify via deploy #206
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