diff --git a/tests/detect-antipatterns-fixtures.test.mjs b/tests/detect-antipatterns-fixtures.test.mjs index d8bbf375b..4a0cdc655 100644 --- a/tests/detect-antipatterns-fixtures.test.mjs +++ b/tests/detect-antipatterns-fixtures.test.mjs @@ -341,14 +341,17 @@ describe('detectHtml — hero-eyebrow-chip', () => { 'Span Eyebrow Above Hero', 'Pill Chip Above Hero', 'Already Uppercase Text', + // The rule no longer gates on heading font size (modern hero h1s + // use clamp() / vw / var() that jsdom can't resolve), and the + // eyebrow text ceiling moved 30 → 60 chars. Both shapes now flag. + 'Body-Sized Heading Below Eyebrow', + 'Long Uppercase Sentence Above Hero', ]; const SHOULD_PASS = [ 'Eyebrow With Normal Tracking', - 'Body-Sized Heading Below Eyebrow', 'Uppercase Caption Far From Hero', 'Hero With No Eyebrow', 'Heading Above Heading', - 'Long Uppercase Sentence Above Hero', ]; it('hero-eyebrow-chip: flags only the should-flag column', async () => { diff --git a/tests/fixtures/antipatterns/hero-eyebrow-chip.html b/tests/fixtures/antipatterns/hero-eyebrow-chip.html index 53d74d75a..8eb490530 100644 --- a/tests/fixtures/antipatterns/hero-eyebrow-chip.html +++ b/tests/fixtures/antipatterns/hero-eyebrow-chip.html @@ -145,6 +145,18 @@

Already Uppercase Text

Text typed uppercase, no text-transform, but matching tracking and size.

+ +
+
SECTION KICKER
+

Body-Sized Heading Below Eyebrow

+

Eyebrow above a 24px h1. Modern hero h1s use clamp() / vw / var() that jsdom can't resolve, so the rule no longer gates on heading font size — a tracked-caps label above any h1 is the antipattern shape.

+
+ +
+
A VERY LONG UPPERCASE TABLE OF CONTENTS HEADER
+

Long Uppercase Sentence Above Hero

+

46-char uppercase tracked label — under the 60-char eyebrow ceiling, so it still reads as an oversized eyebrow.

+