rastrillo / fiesta Public

Tidy the new tests' names, line lengths and one comment

Wrap the lines this branch added to the three test files to 80 columns,
spell out the abbreviated names in requestFinished (requestID, lock,
event), and rewrite the areasJS comment to say why the boxes come from
the browser. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 470d08e496126bad074499628515b6dd7ccf9628 parent 659fe41
3 files changed, +87 −46
  • check/liveform_browser_test.go +44 −26
  • check/rendering_exception_browser_test.go +30 −15
  • check/shell_test.go +13 −5

CI passed — run details

CI log
=== gofmt ===
=== no-rastrillo ===
go test -run '^(TestFiestaNeverImportsRastrillo|TestThePublicPackagesLinkNoBrowser)$' -count=1 .
ok  	amadan.net/rastrillo/fiesta	0.156s
=== size ===
go test ./internal/build -run '^TestTheOneLinkIsUnder25KiBGzipped$' -count=1 -v
=== RUN   TestTheOneLinkIsUnder25KiBGzipped
    build_test.go:138: fiesta-plain.css: 158448 bytes, 23151 bytes gzipped (22.6 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta-signal.css: 158543 bytes, 23264 bytes gzipped (22.7 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta.css: 161362 bytes, 23870 bytes gzipped (23.3 KiB of the 25.0 KiB limit)
--- PASS: TestTheOneLinkIsUnder25KiBGzipped (0.02s)
PASS
ok  	amadan.net/rastrillo/fiesta/internal/build	0.026s
=== history ===
history: 21 commits; release tags: v1.0.0 v1.1.0
=== suite ===
--- shard 0 of 49 ---
==> shard 0 of 49: make root
go build ./...
go vet ./...
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh root 'internal/gallery@3 cmd/fiesta@2 internal/www@2'
ok  	amadan.net/rastrillo/fiesta	4.947s
ok  	amadan.net/rastrillo/fiesta/check	13.157s
ok  	amadan.net/rastrillo/fiesta/example	0.205s
?   	amadan.net/rastrillo/fiesta/hack/seed/english	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/axe	0.226s
ok  	amadan.net/rastrillo/fiesta/internal/build	1.204s
ok  	amadan.net/rastrillo/fiesta/internal/codeview	0.029s
?   	amadan.net/rastrillo/fiesta/internal/harness	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/markup	0.013s
ok  	amadan.net/rastrillo/fiesta/internal/nodetest	0.409s
ok  	amadan.net/rastrillo/fiesta/internal/rowrule	0.022s
ok  	amadan.net/rastrillo/fiesta/internal/site	1.953s
ok  	amadan.net/rastrillo/fiesta/internal/tokens	0.035s
suite: root took 19s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.810000s 0m2.040000s
--- shard 1 of 49 ---
==> shard 1 of 49: make test.internal.gallery~1of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~1of3'
gotest: slice 1 of 3 of ./internal/gallery/ runs 37 of 109 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	68.060s
suite: test.internal.gallery~1of3 took 69s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m47.860000s 0m1.250000s
--- shard 2 of 49 ---
==> shard 2 of 49: make test.internal.gallery~2of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~2of3'
gotest: slice 2 of 3 of ./internal/gallery/ runs 36 of 109 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	73.564s
suite: test.internal.gallery~2of3 took 74s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m51.650000s 0m1.220000s
--- shard 3 of 49 ---
==> shard 3 of 49: make test.internal.gallery~3of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~3of3'
gotest: slice 3 of 3 of ./internal/gallery/ runs 36 of 109 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	65.617s
suite: test.internal.gallery~3of3 took 68s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m45.810000s 0m1.180000s
--- shard 4 of 49 ---
==> shard 4 of 49: make test.cmd.fiesta~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~1of2'
gotest: slice 1 of 2 of ./cmd/fiesta/ runs 8 of 13 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	61.517s
suite: test.cmd.fiesta~1of2 took 63s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m39.100000s 0m3.160000s
--- shard 5 of 49 ---
==> shard 5 of 49: make test.cmd.fiesta~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~2of2'
gotest: slice 2 of 2 of ./cmd/fiesta/ runs 5 of 13 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	65.932s
suite: test.cmd.fiesta~2of2 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.970000s 0m2.660000s
--- shard 6 of 49 ---
==> shard 6 of 49: make test.internal.www~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~1of2'
gotest: slice 1 of 2 of ./internal/www/ runs 14 of 28 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	69.859s
suite: test.internal.www~1of2 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m49.590000s 0m1.680000s
--- shard 7 of 49 ---
==> shard 7 of 49: make test.internal.www~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~2of2'
gotest: slice 2 of 2 of ./internal/www/ runs 14 of 28 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	70.565s
suite: test.internal.www~2of2 took 72s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m50.320000s 0m1.780000s
--- shard 8 of 49 ---
==> shard 8 of 49: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 -tags browser ./...
suite: staticcheck took 10s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m9.550000s 0m0.690000s
--- shard 9 of 49 ---
==> shard 9 of 49: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 2 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
suite: govulncheck took 7s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m3.370000s 0m0.410000s
--- shard 10 of 49 ---
==> shard 10 of 49: make gitleaks
go run github.com/zricethezav/gitleaks/v8@v8.30.1 git --no-banner --redact --log-opts='--full-history --diff-filter=tuxdb HEAD' .
6:23PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
6:23PM INF 21 commits scanned.
6:23PM INF scanned ~10379531 bytes (10.38 MB) in 4.01s
6:23PM INF no leaks found
suite: gitleaks took 4s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m8.950000s 0m0.200000s
--- shard 11 of 49 ---
==> shard 11 of 49: make browser.internal.harness
./hack/gotest.sh browser 'internal.harness'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: ./internal/harness/ runs its 10 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/harness	6.372s
suite: browser.internal.harness took 8s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m1.730000s 0m1.320000s
--- shard 12 of 49 ---
==> shard 12 of 49: make browser.check~1of14
./hack/gotest.sh browser 'check~1of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 1 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	104.232s
suite: browser.check~1of14 took 113s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m57.070000s 0m16.660000s
--- shard 13 of 49 ---
==> shard 13 of 49: make browser.check~2of14
./hack/gotest.sh browser 'check~2of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 2 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	102.145s
suite: browser.check~2of14 took 111s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m52.730000s 0m13.910000s
--- shard 14 of 49 ---
==> shard 14 of 49: make browser.check~3of14
./hack/gotest.sh browser 'check~3of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 3 of 14 of ./check/ runs 16 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	99.832s
suite: browser.check~3of14 took 109s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m46.920000s 0m16.640000s
--- shard 15 of 49 ---
==> shard 15 of 49: make browser.check~4of14
./hack/gotest.sh browser 'check~4of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 4 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	107.739s
suite: browser.check~4of14 took 117s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
1m0.250000s 0m17.540000s
--- shard 16 of 49 ---
==> shard 16 of 49: make browser.check~5of14
./hack/gotest.sh browser 'check~5of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 5 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	99.096s
suite: browser.check~5of14 took 108s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m57.340000s 0m25.560000s
--- shard 17 of 49 ---
==> shard 17 of 49: make browser.check~6of14
./hack/gotest.sh browser 'check~6of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 6 of 14 of ./check/ runs 18 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	90.990s
suite: browser.check~6of14 took 100s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m45.930000s 0m15.360000s
--- shard 18 of 49 ---
==> shard 18 of 49: make browser.check~7of14
./hack/gotest.sh browser 'check~7of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 7 of 14 of ./check/ runs 18 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	92.856s
suite: browser.check~7of14 took 102s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m49.640000s 0m15.620000s
--- shard 19 of 49 ---
==> shard 19 of 49: make browser.check~8of14
./hack/gotest.sh browser 'check~8of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 8 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	103.960s
suite: browser.check~8of14 took 113s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m59.670000s 0m19.920000s
--- shard 20 of 49 ---
==> shard 20 of 49: make browser.check~9of14
./hack/gotest.sh browser 'check~9of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 9 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	107.158s
suite: browser.check~9of14 took 116s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m59.880000s 0m19.630000s
--- shard 21 of 49 ---
==> shard 21 of 49: make browser.check~10of14
./hack/gotest.sh browser 'check~10of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 10 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	90.060s
suite: browser.check~10of14 took 99s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m37.670000s 0m11.830000s
--- shard 22 of 49 ---
==> shard 22 of 49: make browser.check~11of14
./hack/gotest.sh browser 'check~11of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 11 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	94.627s
suite: browser.check~11of14 took 103s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m47.420000s 0m15.550000s
--- shard 23 of 49 ---
==> shard 23 of 49: make browser.check~12of14
./hack/gotest.sh browser 'check~12of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 12 of 14 of ./check/ runs 16 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	97.474s
suite: browser.check~12of14 took 107s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m54.140000s 0m15.810000s
--- shard 24 of 49 ---
==> shard 24 of 49: make browser.check~13of14
./hack/gotest.sh browser 'check~13of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 13 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	106.073s
suite: browser.check~13of14 took 116s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
1m0.070000s 0m19.960000s
--- shard 25 of 49 ---
==> shard 25 of 49: make browser.check~14of14
./hack/gotest.sh browser 'check~14of14'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 14 of 14 of ./check/ runs 17 of 238 browser tests
ok  	amadan.net/rastrillo/fiesta/check	93.686s
suite: browser.check~14of14 took 103s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m50.790000s 0m15.430000s
--- shard 26 of 49 ---
==> shard 26 of 49: make browser.internal.gallery~1of18
./hack/gotest.sh browser 'internal.gallery~1of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	44.171s
suite: browser.internal.gallery~1of18 took 47s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.030000s 0m3.650000s
--- shard 27 of 49 ---
==> shard 27 of 49: make browser.internal.gallery~2of18
./hack/gotest.sh browser 'internal.gallery~2of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	53.575s
suite: browser.internal.gallery~2of18 took 58s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.280000s 0m3.040000s
--- shard 28 of 49 ---
==> shard 28 of 49: make browser.internal.gallery~3of18
./hack/gotest.sh browser 'internal.gallery~3of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	63.269s
suite: browser.internal.gallery~3of18 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.380000s 0m3.790000s
--- shard 29 of 49 ---
==> shard 29 of 49: make browser.internal.gallery~4of18
./hack/gotest.sh browser 'internal.gallery~4of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	53.194s
suite: browser.internal.gallery~4of18 took 57s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.030000s 0m2.880000s
--- shard 30 of 49 ---
==> shard 30 of 49: make browser.internal.gallery~5of18
./hack/gotest.sh browser 'internal.gallery~5of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 5 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	67.953s
suite: browser.internal.gallery~5of18 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.780000s 0m5.550000s
--- shard 31 of 49 ---
==> shard 31 of 49: make browser.internal.gallery~6of18
./hack/gotest.sh browser 'internal.gallery~6of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 6 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	60.510s
suite: browser.internal.gallery~6of18 took 66s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m12.810000s 0m3.930000s
--- shard 32 of 49 ---
==> shard 32 of 49: make browser.internal.gallery~7of18
./hack/gotest.sh browser 'internal.gallery~7of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 7 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	61.562s
suite: browser.internal.gallery~7of18 took 65s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m10.540000s 0m2.680000s
--- shard 33 of 49 ---
==> shard 33 of 49: make browser.internal.gallery~8of18
./hack/gotest.sh browser 'internal.gallery~8of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 8 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	65.284s
suite: browser.internal.gallery~8of18 took 69s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m14.920000s 0m4.650000s
--- shard 34 of 49 ---
==> shard 34 of 49: make browser.internal.gallery~9of18
./hack/gotest.sh browser 'internal.gallery~9of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 9 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	73.609s
suite: browser.internal.gallery~9of18 took 78s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m20.680000s 0m7.710000s
--- shard 35 of 49 ---
==> shard 35 of 49: make browser.internal.gallery~10of18
./hack/gotest.sh browser 'internal.gallery~10of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 10 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.999s
suite: browser.internal.gallery~10of18 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m10.900000s 0m2.610000s
--- shard 36 of 49 ---
==> shard 36 of 49: make browser.internal.gallery~11of18
./hack/gotest.sh browser 'internal.gallery~11of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 11 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	68.888s
suite: browser.internal.gallery~11of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.090000s 0m2.980000s
--- shard 37 of 49 ---
==> shard 37 of 49: make browser.internal.gallery~12of18
./hack/gotest.sh browser 'internal.gallery~12of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 12 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	72.139s
suite: browser.internal.gallery~12of18 took 76s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.950000s 0m5.110000s
--- shard 38 of 49 ---
==> shard 38 of 49: make browser.internal.gallery~13of18
./hack/gotest.sh browser 'internal.gallery~13of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 13 of 18 of ./internal/gallery/ runs 4 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	71.517s
suite: browser.internal.gallery~13of18 took 75s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.990000s 0m5.400000s
--- shard 39 of 49 ---
==> shard 39 of 49: make browser.internal.gallery~14of18
./hack/gotest.sh browser 'internal.gallery~14of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 14 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	74.960s
suite: browser.internal.gallery~14of18 took 78s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m16.080000s 0m5.310000s
--- shard 40 of 49 ---
==> shard 40 of 49: make browser.internal.gallery~15of18
./hack/gotest.sh browser 'internal.gallery~15of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 15 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	74.379s
suite: browser.internal.gallery~15of18 took 78s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m16.530000s 0m5.570000s
--- shard 41 of 49 ---
==> shard 41 of 49: make browser.internal.gallery~16of18
./hack/gotest.sh browser 'internal.gallery~16of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 16 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	70.247s
suite: browser.internal.gallery~16of18 took 74s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.550000s 0m4.590000s
--- shard 42 of 49 ---
==> shard 42 of 49: make browser.internal.gallery~17of18
./hack/gotest.sh browser 'internal.gallery~17of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 17 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	75.482s
suite: browser.internal.gallery~17of18 took 79s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m16.370000s 0m5.780000s
--- shard 43 of 49 ---
==> shard 43 of 49: make browser.internal.gallery~18of18
./hack/gotest.sh browser 'internal.gallery~18of18'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 18 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	76.933s
suite: browser.internal.gallery~18of18 took 80s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m17.990000s 0m6.530000s
--- shard 44 of 49 ---
==> shard 44 of 49: make browser.internal.gallery.history
./hack/gotest.sh browser 'internal.gallery.history'
gotest: on ip-172-31-31-194, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: ./internal/gallery/history/ runs its 3 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery/history	37.503s
suite: browser.internal.gallery.history took 40s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m21.380000s 0m2.050000s
--- shard 45 of 49 ---
==> shard 45 of 49: make browser.internal.www~1of4
./hack/gotest.sh browser 'internal.www~1of4'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 4 of ./internal/www/ runs 5 of 24 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	84.221s
suite: browser.internal.www~1of4 took 89s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m38.160000s 0m2.340000s
--- shard 46 of 49 ---
==> shard 46 of 49: make browser.internal.www~2of4
./hack/gotest.sh browser 'internal.www~2of4'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 4 of ./internal/www/ runs 7 of 24 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	84.937s
suite: browser.internal.www~2of4 took 88s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m53.250000s 0m3.280000s
--- shard 47 of 49 ---
==> shard 47 of 49: make browser.internal.www~3of4
./hack/gotest.sh browser 'internal.www~3of4'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 4 of ./internal/www/ runs 6 of 24 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	87.042s
suite: browser.internal.www~3of4 took 91s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m52.780000s 0m3.250000s
--- shard 48 of 49 ---
==> shard 48 of 49: make browser.internal.www~4of4
./hack/gotest.sh browser 'internal.www~4of4'
gotest: on ip-172-31-31-194, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 4 of ./internal/www/ runs 6 of 24 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	83.674s
suite: browser.internal.www~4of4 took 88s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m46.390000s 0m3.250000s
diff --git a/check/liveform_browser_test.go b/check/liveform_browser_test.go
index fff3d54..0e4fce4 100644
--- a/check/liveform_browser_test.go
+++ b/check/liveform_browser_test.go
@@ -34,7 +34,8 @@ import (
const liveStub = `(function () {
"use strict";
document.addEventListener("submit", function (e) {
- if (e.target.getAttribute("data-live-form") === "claimed") e.liveForm = true;
+ if (e.target.getAttribute("data-live-form") === "claimed")
+ e.liveForm = true;
}, true);
document.addEventListener("submit", function (e) {
if (!e.liveForm || e.defaultPrevented) return;
@@ -51,9 +52,11 @@ func liveFormPage(scripts ...string) string {
for _, name := range scripts {
head.WriteString(`<script defer src="/` + name + `"></script>`)
}
- return `<!doctype html><html lang="en" dir="ltr"><head><meta charset="utf-8">` +
- `<title>live forms</title><link rel="stylesheet" href="/tokens.css">` +
- `<link rel="stylesheet" href="/theme.css">` + head.String() + `</head><body>` +
+ return `<!doctype html><html lang="en" dir="ltr"><head>` +
+ `<meta charset="utf-8"><title>live forms</title>` +
+ `<link rel="stylesheet" href="/tokens.css">` +
+ `<link rel="stylesheet" href="/theme.css">` + head.String() +
+ `</head><body>` +
`<form method="post" action="/claimed" data-live-form="claimed">` +
`<button rst-btn id="claimed">Save</button></form>` +
`<form method="post" action="/native" data-live-form="native">` +
@@ -65,9 +68,11 @@ func liveFormPage(scripts ...string) string {
// liveFormState is a button's busy state: its aria-busy and whether
// busy.js's spinner is in it.
func liveFormState(id string) string {
- return `(() => { const button = document.getElementById(` + jsStr(id) + `);` +
+ return `(() => { const button = document.getElementById(` +
+ jsStr(id) + `);` +
` return "busy:" + (button.getAttribute("aria-busy") || "-") +` +
- ` " spin:" + (button.querySelector("[rst-spin]") ? "yes" : "no"); })()`
+ ` " spin:" + ` +
+ `(button.querySelector("[rst-spin]") ? "yes" : "no"); })()`
}
func TestBusyLeavesALiveFormItsScriptClaimed(t *testing.T) {
@@ -96,32 +101,43 @@ func TestBusyLeavesALiveFormItsScriptClaimed(t *testing.T) {
// hand-back tick would have run, with no spinner of busy.js's,
// and nothing reached the server.
var claimed string
- mustRun(t, ctx, chromedp.Navigate(rig.Origin+order), chromedp.WaitVisible("#claimed", chromedp.ByQuery),
- chromedp.Click("#claimed", chromedp.ByQuery), chromedp.Sleep(300*time.Millisecond),
+ mustRun(t, ctx, chromedp.Navigate(rig.Origin+order),
+ chromedp.WaitVisible("#claimed", chromedp.ByQuery),
+ chromedp.Click("#claimed", chromedp.ByQuery),
+ chromedp.Sleep(300*time.Millisecond),
chromedp.Evaluate(liveFormState("claimed"), &claimed))
if want := "busy:true spin:no"; claimed != want {
- t.Errorf("%s: a form the live script claimed reads %q after the submit, want %q: busy.js armed it and handed it back, wiping the script's busy state", order, claimed, want)
+ t.Errorf("%s: a form the live script claimed reads %q after the "+
+ "submit, want %q: busy.js armed it and handed it back, "+
+ "wiping the script's busy state", order, claimed, want)
}
tookNothing(t, payloads, order+", the claimed form")
// Native: busy.js arms it, late, and the browser sends it.
var native string
- mustRun(t, ctx, chromedp.Navigate(rig.Origin+order), chromedp.WaitVisible("#native", chromedp.ByQuery))
+ mustRun(t, ctx, chromedp.Navigate(rig.Origin+order),
+ chromedp.WaitVisible("#native", chromedp.ByQuery))
answered := requestFinished(ctx, http.MethodPost, rig.Origin+"/native")
- mustRun(t, ctx, chromedp.Click("#native", chromedp.ByQuery), chromedp.Sleep(150*time.Millisecond),
+ mustRun(t, ctx, chromedp.Click("#native", chromedp.ByQuery),
+ chromedp.Sleep(150*time.Millisecond),
chromedp.Evaluate(liveFormState("native"), &native))
if want := "busy:true spin:yes"; native != want {
- t.Errorf("%s: a form the live script left to the browser reads %q after the submit, want %q: busy.js did not arm it", order, native, want)
+ t.Errorf("%s: a form the live script left to the browser reads %q "+
+ "after the submit, want %q: busy.js did not arm it",
+ order, native, want)
}
- if got := took(t, payloads, order+", the native form"); got != "form=native" {
- t.Errorf("%s: the native form sent %q, want form=native", order, got)
+ got := took(t, payloads, order+", the native form")
+ if got != "form=native" {
+ t.Errorf("%s: the native form sent %q, want form=native", order,
+ got)
}
// The server has the form before the browser has its 204, and
// a navigation started before the answer is aborted by it.
select {
case <-answered:
case <-time.After(20 * time.Second):
- t.Fatalf("%s: the browser never finished the native form's request", order)
+ t.Fatalf("%s: the browser never finished the native form's "+
+ "request", order)
}
}
}
@@ -129,25 +145,27 @@ func TestBusyLeavesALiveFormItsScriptClaimed(t *testing.T) {
// requestFinished is closed once the browser has finished, or given
// up on, the first request with this method and URL sent after the
// call.
-func requestFinished(ctx context.Context, method, url string) <-chan struct{} {
+func requestFinished(ctx context.Context, method,
+ url string) <-chan struct{} {
done := make(chan struct{})
var once sync.Once
- var id network.RequestID
- var mu sync.Mutex
- chromedp.ListenTarget(ctx, func(event any) {
- mu.Lock()
- defer mu.Unlock()
- switch e := event.(type) {
+ var requestID network.RequestID
+ var lock sync.Mutex
+ chromedp.ListenTarget(ctx, func(anyEvent any) {
+ lock.Lock()
+ defer lock.Unlock()
+ switch event := anyEvent.(type) {
case *network.EventRequestWillBeSent:
- if id == "" && e.Request.Method == method && e.Request.URL == url {
- id = e.RequestID
+ if requestID == "" && event.Request.Method == method &&
+ event.Request.URL == url {
+ requestID = event.RequestID
}
case *network.EventLoadingFinished:
- if id != "" && e.RequestID == id {
+ if requestID != "" && event.RequestID == requestID {
once.Do(func() { close(done) })
}
case *network.EventLoadingFailed:
- if id != "" && e.RequestID == id {
+ if requestID != "" && event.RequestID == requestID {
once.Do(func() { close(done) })
}
}
diff --git a/check/rendering_exception_browser_test.go b/check/rendering_exception_browser_test.go
index b246de3..3cbd483 100644
--- a/check/rendering_exception_browser_test.go
+++ b/check/rendering_exception_browser_test.go
@@ -59,8 +59,9 @@ type exceptedArea struct {
Outer, Kept image.Rectangle
}
-// areasJS reads, for each element an exception covers, its border box
-// and its clip's content box, in page coordinates.
+// areasJS asks the browser for the boxes, because only layout knows
+// where they ended up. It adds the scroll offset so they are in the
+// coordinates of the full-page photographs they are compared against.
const areasJS = `JSON.stringify(!matchMedia(%s).matches ? [] :
[...document.querySelectorAll(%s)].map(element => {
const box = element.getBoundingClientRect();
@@ -81,7 +82,8 @@ const areasJS = `JSON.stringify(!matchMedia(%s).matches ? [] :
// areas reads the exception's areas on the settled page, rounding the
// outer box outward and the kept box inward, so a pixel a box's edge
// cuts through is excepted rather than compared.
-func (exception *renderingException) areas(t *testing.T, ctx context.Context) []exceptedArea {
+func (exception *renderingException) areas(t *testing.T,
+ ctx context.Context) []exceptedArea {
t.Helper()
var found []struct {
Box, Clip [4]float64
@@ -147,7 +149,8 @@ func blanked(picture image.Image, areas []exceptedArea) image.Image {
// which no exception lets through.
func sameAreas(was, is []exceptedArea) string {
if fmt.Sprint(was) != fmt.Sprint(is) {
- return fmt.Sprintf("the excepted areas moved: %v under 1.0.0's CSS, %v under the tree's", was, is)
+ return fmt.Sprintf("the excepted areas moved: %v under 1.0.0's CSS, "+
+ "%v under the tree's", was, is)
}
return ""
}
@@ -169,7 +172,8 @@ func samePixelsExcept(t *testing.T, was, is []byte,
for y := outer.Min.Y; y < outer.Max.Y && !covered; y++ {
for x := outer.Min.X; x < outer.Max.X; x++ {
point := image.Point{x, y}
- if excepted(wasAreas, point) && before.At(x, y) != after.At(x, y) {
+ if excepted(wasAreas, point) &&
+ before.At(x, y) != after.At(x, y) {
covered = true
break
}
@@ -198,7 +202,9 @@ func pageShotExcept(t *testing.T, ctx context.Context, url string,
exception *renderingException) ([]byte, []exceptedArea) {
t.Helper()
var areas []exceptedArea
- shot := pageShotChecked(t, ctx, url, width, scheme, func() { areas = exception.areas(t, ctx) })
+ shot := pageShotChecked(t, ctx, url, width, scheme, func() {
+ areas = exception.areas(t, ctx)
+ })
return shot, areas
}
@@ -216,7 +222,8 @@ func TestTheConsoleRingExceptionLetsNothingElseThrough(t *testing.T) {
t.Fatalf("tokens.css holds %q %d times, want once, in the "+
"console rail's nav rule", giveBack, count)
}
- const recoloured = "\n[rst-shell-nav] a[aria-current] { color: #c00 !important; }\n"
+ const recoloured = "\n[rst-shell-nav] a[aria-current] " +
+ "{ color: #c00 !important; }\n"
theme, _ := fiesta.ThemeCSS("day")
const layout = "layout-console"
document := seedFile(t, "examples/"+layout+"/default.html")
@@ -227,11 +234,15 @@ func TestTheConsoleRingExceptionLetsNothingElseThrough(t *testing.T) {
passes bool
}{
{"the tree's tokens.css", fiesta.TokensCSS(), true},
- {"tokens.css without the margins", []byte(strings.ReplaceAll(tokens, giveBack, "")), false},
- {"tokens.css with the current item's text recoloured", []byte(tokens + recoloured), false},
+ {"tokens.css without the margins",
+ []byte(strings.ReplaceAll(tokens, giveBack, "")), false},
+ {"tokens.css with the current item's text recoloured",
+ []byte(tokens + recoloured), false},
} {
- old := parityAssets(seedFile(t, "tokens.css"), seedFile(t, "day.css"), seedFile(t, "shell.css"))
- rig := parityRig(t, documents, old, parityAssets(served.tokens, theme, fiesta.ShellCSS()))
+ old := parityAssets(seedFile(t, "tokens.css"),
+ seedFile(t, "day.css"), seedFile(t, "shell.css"))
+ rig := parityRig(t, documents, old,
+ parityAssets(served.tokens, theme, fiesta.ShellCSS()))
ctx, cancel := context.WithTimeout(rig.Context(), 60*time.Second)
before, beforeAreas := pageShotExcept(t, ctx,
rig.Origin+"/old/"+layout, 1280, "light", consoleRailRing)
@@ -242,14 +253,18 @@ func TestTheConsoleRingExceptionLetsNothingElseThrough(t *testing.T) {
t.Fatalf("%s: consoleRailRing covers nothing on 1.0.0's %s "+
"at 1280px; the control proves nothing", served.name, layout)
}
- ok, why, covered := samePixelsExcept(t, before, after, beforeAreas, afterAreas)
+ ok, why, covered := samePixelsExcept(t, before, after, beforeAreas,
+ afterAreas)
switch {
case served.passes && !ok:
- t.Errorf("%s: %s fails the comparison: %s", served.name, layout, why)
+ t.Errorf("%s: %s fails the comparison: %s", served.name, layout,
+ why)
case served.passes && !covered:
- t.Errorf("%s: consoleRailRing covered no change on %s", served.name, layout)
+ t.Errorf("%s: consoleRailRing covered no change on %s",
+ served.name, layout)
case !served.passes && ok:
- t.Errorf("%s: the comparison passed; the exception lets more than the ring through", served.name)
+ t.Errorf("%s: the comparison passed; the exception lets more "+
+ "than the ring through", served.name)
default:
t.Logf("%s: passes %v %s", served.name, ok, why)
}
diff --git a/check/shell_test.go b/check/shell_test.go
index 726e702..b1c11e0 100644
--- a/check/shell_test.go
+++ b/check/shell_test.go
@@ -46,11 +46,15 @@ func TestShellJSSwallowsOnlyASkippedTransition(t *testing.T) {
func skippedTransitionsAreSwallowed(t *testing.T, script string) {
t.Helper()
var got struct{ Checked int }
- if err := json.Unmarshal(nodetest.Run(t, nodetest.Cmd{Args: []string{"node/transition_node.mjs", script}}), &got); err != nil {
+ out := nodetest.Run(t, nodetest.Cmd{
+ Args: []string{"node/transition_node.mjs", script},
+ })
+ if err := json.Unmarshal(out, &got); err != nil {
t.Fatal(err)
}
if want := 3*3*8 + 1; got.Checked != want {
- t.Errorf("node/transition_node.mjs checked %d rejections against %s, want %d", got.Checked, script, want)
+ t.Errorf("node/transition_node.mjs checked %d rejections against "+
+ "%s, want %d", got.Checked, script, want)
}
}
@@ -71,9 +75,12 @@ func TestTransitionJSSwallowsOnlyASkippedTransition(t *testing.T) {
func TestTheTwoTransitionObserversAreTheSame(t *testing.T) {
shell := transitionObserver(t, "shell.js", "observeTransition")
alone := transitionObserver(t, "transition.js", "observe")
- renamed := strings.ReplaceAll(shell, "function observeTransition(", "function observe(")
+ renamed := strings.ReplaceAll(shell, "function observeTransition(",
+ "function observe(")
if renamed != alone {
- t.Errorf("the transition observer differs between shell.js and transition.js:\n--- shell.js\n%s\n--- transition.js\n%s", shell, alone)
+ t.Errorf("the transition observer differs between shell.js and "+
+ "transition.js:\n--- shell.js\n%s\n--- transition.js\n%s",
+ shell, alone)
}
}
@@ -87,7 +94,8 @@ func transitionObserver(t *testing.T, script, name string) string {
body := functionBody(js, name)
at := strings.Index(js, set+strings.Repeat(" ", 2)+"function "+name+"(")
if body == "" || at < 0 {
- t.Fatalf("%s has no %q followed by function %s", script, strings.TrimSpace(set), name)
+ t.Fatalf("%s has no %q followed by function %s", script,
+ strings.TrimSpace(set), name)
}
return set + body
}