rastrillo / fiesta Public

Test evidence: Build the release: one-file themes, stripped CSS and JS, string scripts, the sprite and a gate under 25 KiB open

On branch fiesta-1

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

Commits

  • a265414 Build the release: one-file themes, stripped CSS and JS, string scripts, the sprite and a gate under 25 KiB

The size line

$ make size
=== RUN   TestTheOneLinkIsUnder25KiBGzipped
    build_test.go:137: fiesta-plain.css: 152856 bytes, 22303 bytes gzipped (21.8 KiB of the 25.0 KiB limit)
    build_test.go:137: fiesta-signal.css: 152951 bytes, 22414 bytes gzipped (21.9 KiB of the 25.0 KiB limit)
    build_test.go:137: fiesta.css: 155770 bytes, 23018 bytes gzipped (22.5 KiB of the 25.0 KiB limit)
--- PASS: TestTheOneLinkIsUnder25KiBGzipped (0.02s)

RED: the dist tests under the stubs (Dist returning an empty map, CheckSize returning nil)

--- FAIL: TestTheOneLinkIsUnder25KiBGzipped (0.00s)
    build_test.go:132: the dist has no fiesta-plain.css
--- FAIL: TestTheSizeGateFailsAtTheLine (0.03s)
    build_test.go:184: fiesta-plain.css at 25600 gzipped bytes passed the gate; the line is 25600
    build_test.go:184: fiesta-signal.css at 25600 gzipped bytes passed the gate; the line is 25600
    build_test.go:184: fiesta.css at 25600 gzipped bytes passed the gate; the line is 25600
--- FAIL: TestTheBundlesAreTokensThenThemeStripped (0.00s)
    build_test.go:214: the dist has no fiesta-plain.css
--- FAIL: TestDistNeedsOnlyItsFS (0.00s)
    build_test.go:255: Dist built a release from a tree with no LICENSE
--- FAIL: TestTheDistHasNoComments (0.00s)
    build_test.go:305: the dist has no stylesheet
--- FAIL: TestTheSumsDescribeTheDist (0.00s)
    build_test.go:330: the dist has no SHA256SUMS
--- FAIL: TestTheSpriteHasEverySlug (0.00s)
    build_test.go:385: the dist has no icons.svg
--- FAIL: TestStandaloneIconsAreSVGDocuments (0.00s)
    build_test.go:439: the dist has 0 standalone icons, want one per slug: 12
--- FAIL: TestTheStringsScriptIsTheJSON (0.00s)
    build_test.go:480: the dist has no i18n/es.js
--- FAIL: TestVendoredAxeIsNotAShippedAsset (0.00s)
    build_test.go:512: the dist has 0 scripts, fewer than the 8 shipped
--- FAIL: TestTheDistIsDeterministic (0.00s)
    build_test.go:534: the dist's files are not the expected set:
FAIL	amadan.net/rastrillo/fiesta/internal/build	0.117s

Eleven of eleven red by name, the three the rulings call vacuous under the stub each on its precondition. The five strip tests passed under the stub, as a port of preservation tests should.

GREEN

--- PASS: TestTheOneLinkIsUnder25KiBGzipped (0.02s)
--- PASS: TestTheSizeGateFailsAtTheLine (0.03s)
--- PASS: TestTheBundlesAreTokensThenThemeStripped (0.01s)
--- PASS: TestDistNeedsOnlyItsFS / TestTheDistHasNoComments / TestTheSumsDescribeTheDist
--- PASS: TestTheSpriteHasEverySlug / TestStandaloneIconsAreSVGDocuments / TestTheStringsScriptIsTheJSON
--- PASS: TestVendoredAxeIsNotAShippedAsset / TestTheDistIsDeterministic
--- PASS: the five strip tests
ok  	amadan.net/rastrillo/fiesta/internal/build	0.231s

The three mutations, each in a scratch copy

Mutation 1, SHA256SUMS written by iterating the map instead of the sorted names:

--- FAIL: TestTheSumsDescribeTheDist (0.00s)
    build_test.go:348: SHA256SUMS is not one sorted line per file:
--- FAIL: TestTheDistIsDeterministic (0.01s)
    build_test.go:546: SHA256SUMS differs between two builds of the same tree

Mutation 2, a copied axe.min.js placed into the dist:

--- FAIL: TestTheDistHasNoComments (0.05s)
    build_test.go:298: axe.min.js does not open with the banner
--- FAIL: TestVendoredAxeIsNotAShippedAsset (0.00s)
    build_test.go:521: axe.min.js carries the vendored axe-core: it is test data and must not ship
--- FAIL: TestTheDistIsDeterministic (0.01s)
    build_test.go:539: the dist's files are not the expected set:

Mutation 3, a standalone icon left without xmlns:

--- FAIL: TestStandaloneIconsAreSVGDocuments (0.00s)
    build_test.go:453: icons/alert-triangle.svg's root is <svg> in namespace "", want <svg> in "http://www.w3.org/2000/svg"
    (and the same line for the other eleven slugs)

Restored: ok amadan.net/rastrillo/fiesta/internal/build 0.219s.

The browser tests

--- PASS: TestTheReleaseRendersAsTheSource (38.03s)      (day, plain, signal, one file and separate files: six pairs identical pixel for pixel)
--- PASS: TestTheReleaseScriptsDriveTheJourneys (10.02s) (switch drag, scheme remember, select filter, calendar open)
--- PASS: TestTheReleaseWorksFromAnotherOrigin (0.61s)
ok  	amadan.net/rastrillo/fiesta/check	48.671s
release_browser_test.go:265: icons/check.svg: complete true, natural 150x150, decode ""

make ci

make gofmt, make no-rastrillo, make size: ok
==> make root / staticcheck / govulncheck / gitleaks   ok
==> make browser.internal.harness   ok  5.693s
==> make browser.check~1of3   92 of 276 tests   ok  171.798s
==> make browser.check~2of3   92 of 276 tests   ok  173.067s
==> make browser.check~3of3   92 of 276 tests   ok  169.567s
exit=0