fix(#396): the button gate only ever looked at the home page, so a 40px submit shipped - #848
Merged
Merged
Conversation
…px submit shipped The zero-assertion reporter (#846/#847) produced its first real CI output, and it named `mobile-buttons.spec.ts:35 › All buttons meet 44x44px minimum on mobile` among 31 tests that ran no assertions across the required lane. Investigating that one found a live defect rather than a broken test. The test is fine. It visits `/`, whose three visible `.btn` elements all pass — so it correctly asserted nothing and went green. Meanwhile the CONTACT FORM'S PRIMARY ACTION renders at 40px: `btn btn-primary` with no height floor, measured 139x40 on production at 390px, below the 44px minimum CLAUDE.md mandates. A gate is only as wide as what it points at (#411). This one pointed at one route. Two changes: - `min-h-11` on the submit button. Measured 44px after, locally, on a restarted container with the page proven loaded (`h1 = "Get in Touch"`, not a 404). - `mobile-buttons.spec.ts` now sweeps `/`, `/contact/` and `/blog/`, each earning its place by holding buttons the others do not: nav/hero chrome, a form submit, card actions. AND THE ASSERTION IS NOW UNCONDITIONAL. It read: if (failures.length > 0) { expect(failures.length, ...).toBe(0); } which is why it reported zero assertions when passing. That shape is not wrong — it fails correctly when a button IS too small — but it makes "found nothing wrong" indistinguishable from "measured nothing" in every report. It now asserts `failures` is empty unconditionally, plus a COVERAGE FLOOR: at least one visible `.btn` per route, so a selector change or an empty route fails loudly instead of passing. Verified against production, which still carries the defect: Error: 1 button(s) below 44px: /contact/ — "Send Message": 139x40px and mutation-verified with the mutant confirmed present first: pointing the locator at `.btn-does-not-exist` fails on the coverage floor ("this gate measured nothing") rather than passing green, which is what the old shape would have done. Worth noting for the other 30 names on that list: they are NOT all defects. Several use `checkA11y()`, which throws rather than calling `expect`, so they assert without a countable step — the reporter's documented blind spot. The list is a lead, not a verdict. ContactForm 33/33; test:scripts 428/428; type-check and lint clean. Refs #396
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reporter's first real output found a live defect
#846/#847's zero-assertion reporter produced its first CI output and named
mobile-buttons.spec.ts:35 › All buttons meet 44x44px minimum on mobileamong 31 tests that ran no assertions across the required lane.Investigating that one found a live defect, not a broken test.
The test is fine. It visits
/, whose three visible.btnelements all pass — so it correctly asserted nothing and went green. Meanwhile the contact form's primary action renders at 40px:btn btn-primarywith no height floor, measured 139x40 on production at 390px, below the 44px minimum CLAUDE.md mandates.A gate is only as wide as what it points at (#411). This one pointed at one route.
Changes
min-h-11on the submit button. Measured 44px after, locally, on a restarted container with the page proven loaded (h1 = "Get in Touch", not a 404)./,/contact/,/blog/— each earning its place by holding buttons the others don't: nav/hero chrome, a form submit, card actions.That shape isn't wrong — it fails correctly when a button is too small — but it makes "found nothing wrong" indistinguishable from "measured nothing" in every report. It now asserts
failuresis empty unconditionally, plus a coverage floor: at least one visible.btnper route.Verification
Against production, which still carries the defect:
Mutation-verified with the mutant confirmed present first: pointing the locator at
.btn-does-not-existfails on the coverage floor — "this gate measured nothing" — rather than passing green, which is exactly what the old shape would have done.ContactForm33/33;test:scripts428/428;type-checkandlintclean.About the other 30 names
They are not all defects. Several use
checkA11y(), which throws rather than callingexpect, so they assert without a countable step — the reporter's documented blind spot. The list is a lead, not a verdict, and I'm working it one at a time with measurement before any claim.Refs #396