test / test (push) Canceled after 0s
Step 4 of stage 4 (L10, L11, L13, L18, L19 and a row of
review-2026-08-followups):
- The Outbound log counts first and clamps the page to the last; a number
too large for an int (strconv's ErrRange with the largest int) is the
last page on both logs. Tested at the edges: first, last, past the last
however far, nonsense, an empty log asked for page 5.
- checkAutoMultiplier is "not within", so NaN and the infinities are out.
- rate-limited is red (components.go; the mockup first, 643892a).
- data-unsaved on both recalculate buttons: panel.js asks on submit
(ev.submitter) when a field of the page differs from what it was drawn
with; testdata/unsaved_test.js under TestPanelJS.
- HandleReload writes what a restore's first start writes - the filter
lists and the DMARC maps too - and a failed step is an error flash on
Health that names it, not plain text; the success flash says what was
written.
Tested on the test server: go vet + go test of 25 packages, make e2e (all
pass, 695 s) on this tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
882 B
Go
29 lines
882 B
Go
package view
|
|
|
|
import (
|
|
"os/exec"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
// panel.js run in node against a stand-in for the parts of the DOM and htmx
|
|
// it uses (testdata/*_test.js): the refreshes of the monitoring boxes
|
|
// survive a failure and back off (audit 2026-10-12, M11), and a button that
|
|
// leaves the page asks first when a field holds an unsaved edit (L19).
|
|
// Skipped where node is not installed - the test server's Go has none; the
|
|
// workstation runs it.
|
|
func TestPanelJS(t *testing.T) {
|
|
node, err := exec.LookPath("node")
|
|
if err != nil {
|
|
t.Skip("node is not installed")
|
|
}
|
|
for _, script := range []string{"poll_test.js", "unsaved_test.js"} {
|
|
t.Run(script, func(t *testing.T) {
|
|
out, err := exec.Command(node, filepath.Join("testdata", script), filepath.Join("static", "panel.js")).CombinedOutput()
|
|
if err != nil {
|
|
t.Fatalf("%v\n%s", err, out)
|
|
}
|
|
})
|
|
}
|
|
}
|