rastrillo / fiesta Public

Test evidence: Port the depth, light, matrix and switch drives, and hold every theme and shell to the SEED baseline open

On branch fiesta-1

Test evidence for Task 8 of the Fiesta packaging, copied from the implementer's report so it sits on the branch.

Commits

  • e6a1567 Port the depth, light, matrix and switch drives, and hold every theme and shell to the SEED baseline
  • Fix round 1: 78f245d Correct the switch-hover record, keep foreign links out of the parity rewrite, and quieten the switch reset
  • Copy follow-up: c0004a6 Example titles and the layout note in Fiesta's words

Preservation tests on their first run

All 53 tests in the fourteen ported files passed on their first run, in one invocation:

ok  	amadan.net/rastrillo/fiesta/check	219.468s   (53 --- PASS, 0 --- FAIL)

Slowest: TestEveryThemeRendersAsItDidExceptDay 69.0 s, TestTheLightStaysWithinItsFrameBudget 18.1 s (light.js adds 0.96 ms a frame: 2.20 with, 1.24 without, budget 2.0).

RED and GREEN: TestParityLinksAreRewritten, written first

$ go test -count=1 -run '^TestParityLinksAreRewritten$' ./check/
check/parity_test.go:30:9: undefined: parityLinks
FAIL	amadan.net/rastrillo/fiesta/check [build failed]

then --- PASS: TestParityLinksAreRewritten (0.00s).

GREEN: the parity drive on the identical CSS

--- PASS: TestEveryThemeAndShellRendersAsTheBaseline (56.52s)
    --- PASS: TestEveryThemeAndShellRendersAsTheBaseline/day (24.11s)
    --- PASS: TestEveryThemeAndShellRendersAsTheBaseline/plain (17.65s)
    --- PASS: TestEveryThemeAndShellRendersAsTheBaseline/signal (14.76s)

Negative controls

(a) css/themes/day.css with --rst-accent: light-dark(#d61f1f, #ff7a7a):

--- FAIL: TestEveryThemeAndShellRendersAsTheBaseline/day (14.52s)
        parity_browser_test.go:159: day: light  #b-danger renders differently from the baseline: pixel 0,8 differs by 141
        parity_browser_test.go:159: day: light  #b-primary renders differently from the baseline: pixel 10,8 differs by 15
        …

(b) The brief's shell.css control cannot fail (shell.css holds only the phone-width view transitions the drive skips): one animation line deleted, /day PASS. Run instead with a phone-width rule on the sidebar rail appended to a scratch shell.css:

--- FAIL: TestEveryThemeAndShellRendersAsTheBaseline/day (15.17s)
        parity_browser_test.go:167: day: layout-sidebar at 390px in light renders differently from the baseline: pixel 0,0 differs by 252
        parity_browser_test.go:167: day: layout-sidebar at 390px in dark renders differently from the baseline: pixel 0,0 differs by 243

Preservation control, the two [rst-switch]:hover rules cut from a scratch tokens.css: the parity drive fails on the hover #sw, #sw-on, #tb cells in all three themes (FAIL check 88.195s); the record of which preservation tests also see it was corrected in fix round 1.

Shard pass and the gate

browser.check~1of3   ok  80.690s
browser.check~2of3   ok  84.851s
browser.check~3of3   ok  90.340s
make ci              exit 0, 246 s wall (browser.internal.harness 6.7s; ~1of3 71.3s, ~2of3 81.9s, ~3of3 79.3s)

Fix round 1 (78f245d)

Every control ran in a scratch copy (git archive e6a1567 | tar -x).

Control 1, tokens.css lines 2052-2053 (the two [rst-switch]:hover rules) cut, four tests run together:

--- PASS: TestEveryThemeRendersAsItDidExceptDay (46.14s)            (the matrix leaves day out, by design)
--- FAIL: TestEveryThemeAndShellRendersAsTheBaseline (44.63s)
--- FAIL: TestTheKnobIsLitAndTheTrackSheenFollowsIt (1.92s)
    switch_browser_test.go:366: #s hovered has no 40px sheen
    switch_browser_test.go:366: #head hovered has no 40px sheen      (in each of the three legs)
--- FAIL: TestTheTrackSitsInAndTheKnobLiftsOnHover
    switch_day_browser_test.go:172: day: #off hovered has knob box-shadow "…", at rest "…"; the knob should lift, with a longer contact shadow and a deeper knob shadow

Control 2, plain.css line 211 --rst-shadow-knob set to a 3px red ring, a mutation the matrix can see:

    matrix_browser_test.go:366: light  #sw renders differently under the new tokens.css: pixel 8,21 differs by 77
    matrix_browser_test.go:366: light hover #tb renders differently under the new tokens.css: pixel 46,23 differs by 50
--- FAIL: TestEveryThemeRendersAsItDidExceptDay (47.72s)
    --- FAIL: TestEveryThemeRendersAsItDidExceptDay/plain (6.74s)       (the other seven subtests PASS)

Mutation 1, parityLinks returns its input unchanged:

--- FAIL: TestParityLinksAreRewritten (0.00s)
    parity_test.go:79: the rewritten layout does not link <link rel="stylesheet" href="tokens.css">
    parity_test.go:83: a relative link survived the rewrite:
        <link rel="stylesheet" href="../../css/tokens.css">

Mutation 2, the scheme-and-host guard removed, so a foreign URL flattens too:

--- FAIL: TestParityLinksAreRewritten (0.00s)
    parity_test.go:102: the rewrite of foreign and root links:
         got  <head><link rel="stylesheet" href="face.css"><script defer src="lib.js"></script>…
         want <head><link rel="stylesheet" href="https://fonts.example/face.css"><script defer src="//cdn.example/lib.js"></script>…

Covering tests after the edits: TestEveryThemeAndShellRendersAsTheBaseline PASS (45.76s), TestASwitchSlidesAndSnaps PASS (8.05s), TestParityLinksAreRewritten PASS. Shard pass: ~1of3 ok 75.4s, ~2of3 ok 79.8s, ~3of3 ok 80.6s; make ci exit 0, 252s wall.