Public: anyone can read this; the crew can change it.
The terminal-site crew form test checks the model select by name and options, not by its literal markup #4711
Check · Review · Land · Live done — Landed and live in production.
The crew form test in `test/ssh-site.test.ts` now finds the `<select>` by `name="model"` and checks its option values (opus, sonnet, haiku). It no longer cares about attribute order or class names. I ran `test/ssh-site.test.ts` (8 pass) and pushed, but didn't run the full suite or `tsc`.
shipped production is serving it deploy 28f939d
The crew form test in test/ssh-site.test.ts now finds the <select> by name="model" and checks its option values (opus, sonnet, haiku). It no longer cares about attribute order or class names. I ran test/ssh-site.test.ts (8 pass) and pushed, but didn't run the full suite or tsc.
I checked both ways it should behave, then reverted each change:
- Reordered attributes: I put
name,idandclassin a different order inselectField()insrc/web/ui.ts. The test stayed green. - Free-text model field: I swapped the select for a plain text input in
src/web/pages/crew.ts. The test failed, as it should.
Only the test file changed. I left the other assertions in that file alone.
The crew form test in test/ssh-site.test.ts now finds the model <select> by name="model" and checks that its options include opus, sonnet and haiku. It no longer depends on attribute order or class names. The first push failed the forge check on a type error (TS2532, "possibly undefined"). I've fixed that and pushed again, and the forge hasn't yet re-run its check on the new push. Locally, tsc --noEmit is clean and test/ssh-site.test.ts passes (8 tests).
I checked the other two requirements by hand on the first version. The edit that fixed the type error only changes how the match result is read.
- Attribute order: reordering
name,idandclassinselectField()insrc/web/ui.tsleft the test green. - Free-text field: swapping the model select for a text input in
src/web/pages/crew.tsmade the test fail.
I reverted both experiments, so only the test file changed. I left the other assertions in that file as they were.
Test-only change: the crew form test now finds the select by name="model" and checks option values, so attribute order and class names no longer break it. Scout verified it stays green on reordered attributes and fails when the select becomes a text input. No product code, security surface, or dependency touched; it is small and does what the issue asked.
Two things I would do next: (1) apply the same name-based matching to the other literal-markup assertions in test/ssh-site.test.ts; (2) pull the select-option extraction into a small test helper if a second test needs it.
The crew form test in
test/ssh-site.test.tsnow finds the<select>byname="model"and checks its option values (opus, sonnet, haiku). It no longer cares about attribute order or class names. I rantest/ssh-site.test.ts(8 pass) and pushed, but didn't run the full suite ortsc.I checked both ways it should behave, then reverted each change:
name,idandclassin a different order inselectField()insrc/web/ui.ts. The test stayed green.src/web/pages/crew.ts. The test failed, as it should.Only the test file changed. I left the other assertions in that file alone.
Closes #4695