rastrillo / fiesta Public

Test evidence: Fiesta's scripts read their strings from per-language tables, and find the calendar as fiestaCalendar open

On branch fiesta-1

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

Commits

  • efb5b27 Fiesta's scripts read their strings from per-language tables, and find the calendar as fiestaCalendar
  • Fix round 1: 298e106 Spy on showPicker in the calendar's fallback leg, and read the vocabulary off the attribute as JSON text in a drive

Preservation tests, first run against SEED's scripts

--- FAIL: TestCalendarContract (0.00s)
    datetime_test.go:259: calendar.js does not mention "fiestaCalendar"
--- FAIL: TestDatetimeContract (0.00s)
    datetime_test.go:362: datetime.js does not mention "fiestaCalendar"

The other seven passed on their first run (TestDatetimeParserFixtures over 13 fixtures, 530 cases). The two contracts fail only on the seam string, until the rename lands in the same commit.

Preservation negative control (scratch copy, i18n/es.json date-words.tomorrow set to xyz)

--- FAIL: TestDatetimeParserFixtures (0.59s)
    --- FAIL: TestDatetimeParserFixtures/es (0.04s)
            5 of 39 cases failed in testdata/datetime/es.json:
              tomorrow [es] input="mañana" now=2026-08-28T10:30
              accent-may-be-left-off [es] input="manana" …
              tomorrow-at-a-clock [es] input="mañana a las 18:00" …

Control for TestEveryLanguageHasEveryKey (scratch copy, date-set deleted from es.json): strings_test.go:173: i18n/es.json: missing key date-set.

RED: the new-behaviour tests against the stubs

--- FAIL: TestPickLangResolvesNearMisses (0.05s)
    --- FAIL: TestPickLangResolvesNearMisses/datetime.js (0.02s)
        strings_test.go:242: fiestaPickLang("EN") = null, want "en"
        strings_test.go:242: fiestaPickLang("pt-PT") = null, want "pt-PT"
        strings_test.go:242: fiestaPickLang("PT-pt") = null, want "pt-PT"
        strings_test.go:242: fiestaPickLang("pt-BR") = null, want "pt-PT"
        strings_test.go:242: fiestaPickLang("zh-Hant") = null, want "zh-Hans"
    --- FAIL: TestPickLangResolvesNearMisses/select.js (the same five)
--- FAIL: TestTheTableFillsAMissingAttribute (0.05s)
    --- FAIL: TestTheTableFillsAMissingAttribute/datetime.js (0.02s)
        strings_test.go:276: empty: fiestaWord gave "English", want "Tabla"
        strings_test.go:276: table: fiestaWord gave "English", want "Tabla"
    --- FAIL: TestTheTableFillsAMissingAttribute/select.js (the same two)

$ go test -tags browser -run 'TestTableOnlyStringsReachTheScreen|TestTheCalendarOpensThroughFiestaCalendar' ./check/
--- FAIL: TestTheCalendarOpensThroughFiestaCalendar (0.58s)
    calendar_browser_test.go:131: calendar.js is on the page, but window.fiestaCalendar is not a function; datetime.js has no grid to ask for
--- FAIL: TestTableOnlyStringsReachTheScreen (10.62s)
    strings_browser_test.go:98: the select's filter placeholder reads "Type to filter", want es.json's select-filter "Escribe para filtrar"
    strings_browser_test.go:106: never became true within 10s: !!document.querySelector('[rst-dtp] [role="option"].is-active [rst-dtp-label]')

TestTheTwoLookupsAreTheSame control (scratch copy, one line of select.js's fiestaPickLang changed to drop the primary-language leg):

--- FAIL: TestPickLangResolvesNearMisses/select.js
        strings_test.go:242: fiestaPickLang("pt-BR") = null, want "pt-PT"
--- FAIL: TestTheTwoLookupsAreTheSame (0.00s)
    strings_test.go:320: fiestaPickLang differs between datetime.js and select.js:

GREEN

$ go test -run 'Datetime|Calendar|Language|PickLang|Table|TwoLookups' ./check/ -count=1 -v
--- PASS: TestDatetimeParserFixtures (0.64s)
--- PASS: TestDatetimeReadsItsOwnDisplayBack (0.08s)
--- PASS: TestCalendarGridHoldsInEveryLocale (0.12s)
--- PASS: TestCalendarContract / TestCalendarDerivesItsNames / TestEveryLanguageHasADatetimeFixture
--- PASS: TestDatetimeContract / TestDatetimeDerivesItsCalendarNames / TestEveryLanguageHasEveryKey
--- PASS: TestPickLangResolvesNearMisses / TestTheTableFillsAMissingAttribute / TestTheTwoLookupsAreTheSame
ok  	amadan.net/rastrillo/fiesta/check	1.070s

$ go test -tags browser ... -v
--- PASS: TestTheCalendarOpensThroughFiestaCalendar (0.96s)
--- PASS: TestTableOnlyStringsReachTheScreen (0.63s)
ok  	amadan.net/rastrillo/fiesta/check	2.404s

make ci: exit 0 (gofmt, no-rastrillo, root, staticcheck, govulncheck, gitleaks 15 commits, browser.internal.harness 6.665s, browser.check 6.545s).

Fix round 1 (298e106)

Covering runs: the 12 untagged tests PASS (ok check 0.822s); TestTheCalendarOpensThroughFiestaCalendar, TestTableOnlyStringsReachTheScreen and the new TestAttributeWordsReachTheParser PASS (ok check 1.817s).

Controls, in a cp -r scratch copy under $TMPDIR:

=== control A: datetime.js drops the showPicker fallback
--- FAIL: TestTheCalendarOpensThroughFiestaCalendar (0.62s)
    calendar_browser_test.go:138: without calendar.js, the press called showPicker 0 times; want once, the fallback to the native picker

=== control B: datetime.js inverts the date-words typeof test
--- FAIL: TestTableOnlyStringsReachTheScreen (10.61s)
    strings_browser_test.go:149: never became true within 10s: !!document.querySelector('[rst-dtp] [role="option"].is-active [rst-dtp-label]')
--- FAIL: TestAttributeWordsReachTheParser (10.55s)
    strings_browser_test.go:168: never became true within 10s: ...

The notable scenario was added green (breadth). make ci on the final tree: exit 0 (browser.internal.harness 6.015s, browser.check 6.866s).