mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
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 <cursoragent@cursor.com>
This commit is contained in:
@@ -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 <img>.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>codex-grid-background 1D pass cases</title>
|
||||
<style>
|
||||
body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: #fff; }
|
||||
.dot-rule { height: 5px; background-image: linear-gradient(90deg, rgba(255,255,255,.75) 5px, transparent 5px); background-size: 10px 5px; background-repeat: repeat-x; }
|
||||
.progress-rail { height: 4px; background-image: linear-gradient(90deg, #eee 1px, transparent 1px); background-size: 8px 4px; background-repeat: repeat-x; }
|
||||
.line-field { height: 80px; background: linear-gradient(90deg, rgba(23,25,24,.035) 1px, transparent 1px) 0 0 / 40px 40px, #f4f1ea; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Dotted horizontal rule</h2>
|
||||
<div class="dot-rule"></div>
|
||||
<h2>Progress rail</h2>
|
||||
<div class="progress-rail"></div>
|
||||
<h2>Single-axis px-pair line field</h2>
|
||||
<div class="line-field"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user