Skip to content

fix(#396): the button gate only ever looked at the home page, so a 40px submit shipped - #848

Merged
TortoiseWolfe merged 1 commit into
mainfrom
fix/396-buttons-gate-only-sees-home
Aug 20, 2026
Merged

fix(#396): the button gate only ever looked at the home page, so a 40px submit shipped#848
TortoiseWolfe merged 1 commit into
mainfrom
fix/396-buttons-gate-only-sees-home

Conversation

@TortoiseWolfe

Copy link
Copy Markdown
Owner

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 mobile among 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 .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.

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).
  • The gate now sweeps /, /contact/, /blog/ — each earning its place by holding buttons the others don't: nav/hero chrome, a form submit, card actions.
  • The assertion is now unconditional. It read:
if (failures.length > 0) {
  expect(failures.length, ...).toBe(0);
}

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 failures is empty unconditionally, plus a coverage floor: at least one visible .btn per route.

Verification

Against production, which still carries the defect:

Error: 1 button(s) below 44px:
/contact/ — "Send Message": 139x40px

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 exactly what the old shape would have done.

ContactForm 33/33; test:scripts 428/428; type-check and lint clean.

About the other 30 names

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, and I'm working it one at a time with measurement before any claim.

Refs #396

…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
@TortoiseWolfe
TortoiseWolfe merged commit 962d796 into main Aug 20, 2026
38 of 39 checks passed
@TortoiseWolfe
TortoiseWolfe deleted the fix/396-buttons-gate-only-sees-home branch August 20, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants