From 7ddcd533a46a08aa15a6cbc8bb84de3fac10d3fd Mon Sep 17 00:00:00 2001 From: Abdul Wahab Date: Sat, 22 Aug 2026 06:58:36 +0500 Subject: [PATCH] Test: pin 1D grid-background pass cases in the fixture suite The unit suite already covered dashed rules; this adds an isolated HTML fixture so the page-level one-finding cap cannot hide a regression. Prepared with AI assistance (Cursor agent), directed by @abdulwahabone. Co-authored-by: Cursor --- tests/detect-antipatterns-fixtures.test.mjs | 8 +++++++ .../antipatterns/codex-grid-1d-pass.html | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/fixtures/antipatterns/codex-grid-1d-pass.html diff --git a/tests/detect-antipatterns-fixtures.test.mjs b/tests/detect-antipatterns-fixtures.test.mjs index fb9ee76f9..f7fa1a4d7 100644 --- a/tests/detect-antipatterns-fixtures.test.mjs +++ b/tests/detect-antipatterns-fixtures.test.mjs @@ -1278,6 +1278,14 @@ describe('detectHtml — generated-UI tells', () => { } }); + it('codex-grid-background: 1D dashed rules and px-pair line-fields stay legal', async () => { + const f = await detectHtml(path.join(FIXTURES, 'codex-grid-1d-pass.html')); + assert.equal( + f.filter(r => r.antipattern === 'codex-grid-background').length, 0, + `1D tiled hairlines must not flag, got: ${f.filter(r => r.antipattern === 'codex-grid-background').map(r => r.snippet).join('; ')}`, + ); + }); + it('gemini-tells: both flag cases surface by default and pass cases stay legal', async () => { const findings = await detectHtml(path.join(FIXTURES, 'gemini-tells.html')); // Two flag cases: a CSS img:hover{transform} rule and a Tailwind hover:scale on . diff --git a/tests/fixtures/antipatterns/codex-grid-1d-pass.html b/tests/fixtures/antipatterns/codex-grid-1d-pass.html new file mode 100644 index 000000000..f87942f2b --- /dev/null +++ b/tests/fixtures/antipatterns/codex-grid-1d-pass.html @@ -0,0 +1,21 @@ + + + + + codex-grid-background 1D pass cases + + + +

Dotted horizontal rule

+
+

Progress rail

+
+

Single-axis px-pair line field

+
+ +