Test evidence: The CSS text gates, and every example's vocabulary held to a selector open
On branch fiesta-1
Test evidence for Task 7 of the Fiesta packaging, copied from the implementer's report so it sits on the branch.
Commits
- 72cec58 The CSS text gates, and every example's vocabulary held to a selector
- Fix round 1: b371b6a Restore the nine SEED doc comments in css_test.go, and hold the unstyled map to the element it names
Preservation tests
Every preservation test passed on its first run: go test ./check/ -count=1 -skip '<the four new tests>', ok, 76 tests, all PASS by name.
RED: the new gates against an emptied manifest
Scratch copy under $TMPDIR, examples/examples.json replaced by {"examples":[],"idioms":{}}:
$ go test -buildvcs=false ./check/ -count=1 -run 'TestEveryExampleAttributeAndClassIsStyled|TestEverySelectorAppearsInAnExample|TestTheSearchFormSitsInASearchLandmark|TestTheSidebarRailFootIsOneProfileMenu'
--- FAIL: TestEveryExampleAttributeAndClassIsStyled (0.00s)
coverage_test.go:199: read 0 example states, want more than 100; a set this small is a broken manifest, not a design system
--- FAIL: TestEverySelectorAppearsInAnExample (0.00s)
coverage_test.go:232: read 0 example states, want more than 100; a set this small is a broken manifest, not a design system
--- FAIL: TestTheSearchFormSitsInASearchLandmark (0.00s)
coverage_test.go:276: examples.json has no example "list-bar-search"
--- FAIL: TestTheSidebarRailFootIsOneProfileMenu (0.00s)
coverage_test.go:297: examples.json has no example "layout-sidebar"
FAILIn the real repo, the first run with an empty selectorsWithoutAnExample listed 32 misses (the map is that list verbatim) and the two unstyledByDesign findings.
GREEN
--- PASS: TestEveryExampleAttributeAndClassIsStyled (0.01s)
--- PASS: TestEverySelectorAppearsInAnExample (0.01s)
--- PASS: TestTheSearchFormSitsInASearchLandmark (0.00s)
--- PASS: TestTheSidebarRailFootIsOneProfileMenu (0.00s)go test ./check/ -count=1: ok (1.55s), 80 tests. make ci: exit 0 (browser.internal.harness 5.8s, browser.check 7.2s).
Negative controls (scratch copy)
An example nonesuch/default holding <div rst-nonesuch> added to the manifest:
--- FAIL: TestEveryExampleAttributeAndClassIsStyled (0.01s)
coverage_test.go:213: example nonesuch/default writes rst-nonesuch, which neither tokens.css nor shell.css has a selector forcss/themes/day.css line 203 --rst-text: light-dark(#999, #ededf0):
--- FAIL: TestThemeTokenContrastMeetsWCAG (0.00s)
--- FAIL: TestThemeTokenContrastMeetsWCAG/day/light (0.00s)
contrast_test.go:397: --rst-text (#999) on --rst-surface (#ffffff) = 2.85:1, want >= 4.5:1 (body text on a card)
contrast_test.go:397: --rst-text (#999) on --rst-bg (#fbfbfc) = 2.75:1, want >= 4.5:1 (body text)
... (eight pairs in all)Fix round 1 (b371b6a)
The nine doc comments were restored by a script from SEED's ui/ui_test.go; a second script then compared the doc block above every top-level declaration in each ported file with its SEED source:
check/css_test.go vs ui/ui_test.go + ui/stageart_test.go same=42 diff=5
check/contrast_test.go vs ui/contrast_test.go same=12 diff=0
check/contrast_face_test.go same=7 diff=0
check/derived_test.go same=23 diff=0
check/sizing_test.go same=19 diff=1
check/header_rule_test.go / depth_media_test.go / rows_test.go / button_test.go / spelling_test.go diff=0Each of the six differences is a deliberate reword (a plan id, or a reference Fiesta cannot make).
Whole class tokens (Minor 3), proved in a scratch copy with class="rst-m" added to <p rst-count-line> in examples/layout-sidebar/default.html:
=== old coverage_test.go (72cec58) + class="rst-m" in layout-sidebar/default
ok amadan.net/rastrillo/fiesta/check 0.016s
=== fixed coverage_test.go + the same mutation
coverage_test.go:246: example layout-sidebar/default writes .rst-m, which neither tokens.css nor shell.css has a selector for
FAILRuns: go test ./check/ -count=1 ok 1.563s; make ci exit 0 (browser.internal.harness 6.2s, browser.check 7.8s).