High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
feat: add deterministic audit fixture site with live and staging variants
Luigi Agosti59234533afaa
diff --git a/tests/e2e/fixtures/audit-site-staging/a11y-issues.html b/tests/e2e/fixtures/audit-site-staging/a11y-issues.htmlnew file mode 100644index 00000000..6d79b018--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/a11y-issues.html@@ -0,0 +1,21 @@+<!doctype html>+<!-- Intentional defects: img without alt, input without label, empty link,+ empty button. The img uses a data: URI so it renders without any+ network request (defect is the missing alt, not a 404). -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page with deterministic accessibility defects.">+ <link rel="icon" href="data:,">+ <title>Accessibility Issues — Audit Fixture Site</title>+</head>+<body>+ <h1>Accessibility issues</h1>+ <p>This page contains four deterministic accessibility defects.</p>+ <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">+ <input type="text" name="q">+ <a href="clean.html"></a>+ <button></button>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/broken-assets.html b/tests/e2e/fixtures/audit-site-staging/broken-assets.htmlnew file mode 100644index 00000000..a1c3113b--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/broken-assets.html@@ -0,0 +1,27 @@+<!doctype html>+<!-- Intentional defects: loading this page yields EXACTLY 3 asset 404s+ (assets/missing.css, assets/missing.js, assets/missing.png) plus 1+ failed fetch() to assets/missing.json (HTTP 404, for xhr/API-failure+ detection). The data: favicon suppresses the implicit /favicon.ico+ request so no other request on this page fails. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page referencing exactly three missing assets and one missing fetch target.">+ <link rel="icon" href="data:,">+ <title>Broken Assets — Audit Fixture Site</title>+ <link rel="stylesheet" href="assets/missing.css">+ <script src="assets/missing.js"></script>+</head>+<body>+ <h1>Broken assets</h1>+ <p>This page references three assets that do not exist and fetches one missing JSON path.</p>+ <img src="assets/missing.png" alt="intentionally missing image">+ <a href="index.html">Home</a>+ <script>+ fetch('assets/missing.json')+ .then((res) => { document.body.dataset.fetchStatus = String(res.status); })+ .catch(() => { document.body.dataset.fetchStatus = 'error'; });+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/clean.html b/tests/e2e/fixtures/audit-site-staging/clean.htmlnew file mode 100644index 00000000..61105e13--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/clean.html@@ -0,0 +1,21 @@+<!doctype html>+<!-- Negative control: zero intentional defects. This file MUST stay+ byte-identical between audit-site and audit-site-staging. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Defect-free control page for audit e2e scenarios.">+ <link rel="icon" href="data:,">+ <title>Clean Page — Audit Fixture Site</title>+</head>+<body>+ <h1>Clean page</h1>+ <p>This page has a title, a meta description, labelled controls, and no defects.</p>+ <form action="clean.html" method="get">+ <label for="search">Search</label>+ <input id="search" type="text" name="search">+ <button type="submit">Search</button>+ </form>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/console-errors.html b/tests/e2e/fixtures/audit-site-staging/console-errors.htmlnew file mode 100644index 00000000..b5d99772--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/console-errors.html@@ -0,0 +1,25 @@+<!doctype html>+<!-- Intentional defects: on load this page deterministically emits+ 1 console.log, 1 console.warn, 1 console.error, and 1 uncaught thrown+ error (in its own script block so nothing else is interrupted). -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page that deterministically emits console messages and an uncaught error.">+ <link rel="icon" href="data:,">+ <title>Console Errors — Audit Fixture Site</title>+</head>+<body>+ <h1>Console errors</h1>+ <p>This page logs one message per console level and throws one uncaught error on load.</p>+ <a href="index.html">Home</a>+ <script>+ console.log('audit-fixture log message');+ console.warn('audit-fixture warn message');+ console.error('audit-fixture error message');+ </script>+ <script>+ throw new Error('audit-fixture uncaught error');+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/cookie-echo.html b/tests/e2e/fixtures/audit-site-staging/cookie-echo.htmlnew file mode 100644index 00000000..b574019a--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/cookie-echo.html@@ -0,0 +1,20 @@+<!doctype html>+<!-- No intentional defects: renders document.cookie into #cookies so+ cookie-injection e2e scenarios can assert what the page can read. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page that renders document.cookie into the DOM.">+ <link rel="icon" href="data:,">+ <title>Cookie Echo — Audit Fixture Site</title>+</head>+<body>+ <h1>Cookie echo</h1>+ <p>The current cookies visible to this page are:</p>+ <pre id="cookies"></pre>+ <p><a href="index.html">Home</a></p>+ <script>+ document.getElementById('cookies').textContent = document.cookie;+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/forms.html b/tests/e2e/fixtures/audit-site-staging/forms.htmlnew file mode 100644index 00000000..230f2aea--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/forms.html@@ -0,0 +1,25 @@+<!doctype html>+<!-- Intentional defect: a login form with a password input whose action is+ a plain http:// URL (insecure password post, for security-surface+ detection). The action stays on the fixtures host so the site never+ references an external domain; it is never actually submitted. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Login form posting a password over insecure http.">+ <link rel="icon" href="data:,">+ <title>Forms — Audit Fixture Site</title>+</head>+<body>+ <h1>Forms</h1>+ <p>This page has a login form that posts a password to an insecure http action.</p>+ <form action="http://fixtures/audit-site/login" method="post">+ <label for="user">Username</label>+ <input id="user" name="user" type="text" autocomplete="username">+ <label for="pass">Password</label>+ <input id="pass" name="pass" type="password" autocomplete="current-password">+ <button type="submit">Sign in</button>+ </form>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/index.html b/tests/e2e/fixtures/audit-site-staging/index.htmlnew file mode 100644index 00000000..99acd260--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/index.html@@ -0,0 +1,37 @@+<!doctype html>+<!-- audit-site STAGING homepage: intentionally differs from the live copy+ for visual-diff scenarios — the banner color changed from blue to red,+ the banner moved from above the nav to below it, and the welcome text+ changed. Every other file in this directory is byte-identical to the+ live audit-site copy. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic audit fixture site for PinchTab e2e tests.">+ <link rel="icon" href="data:,">+ <title>Audit Fixture Site</title>+</head>+<body>+ <nav aria-label="Site pages">+ <ul>+ <li><a href="index.html">Home</a></li>+ <li><a href="broken-assets.html">Broken assets</a></li>+ <li><a href="console-errors.html">Console errors</a></li>+ <li><a href="a11y-issues.html">Accessibility issues</a></li>+ <li><a href="clean.html">Clean page</a></li>+ <li><a href="forms.html">Forms</a></li>+ <li><a href="cookie-echo.html">Cookie echo</a></li>+ <li><a href="products/p1.html">Product 1</a></li>+ <li><a href="products/p2.html">Product 2</a></li>+ <li><a href="products/p3.html">Product 3</a></li>+ <li><a href="products/p4.html">Product 4</a></li>+ <li><a href="products/p5.html">Product 5</a></li>+ </ul>+ </nav>+ <header id="banner" style="background:#e11d48;color:#ffffff;padding:12px">Welcome to the staging audit fixture site</header>+ <main>+ <h1>Audit fixture site</h1>+ <p id="tagline">Every page on this site documents its own intentional defects in an HTML comment.</p>+ </main>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/products/p1.html b/tests/e2e/fixtures/audit-site-staging/products/p1.htmlnew file mode 100644index 00000000..85982bba--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/products/p1.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 1 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 1 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 1 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 1</h1>+ <p>This is deterministic product page 1 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/products/p2.html b/tests/e2e/fixtures/audit-site-staging/products/p2.htmlnew file mode 100644index 00000000..9eae081b--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/products/p2.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 2 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 2 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 2 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 2</h1>+ <p>This is deterministic product page 2 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/products/p3.html b/tests/e2e/fixtures/audit-site-staging/products/p3.htmlnew file mode 100644index 00000000..4ff11b56--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/products/p3.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 3 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 3 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 3 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 3</h1>+ <p>This is deterministic product page 3 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/products/p4.html b/tests/e2e/fixtures/audit-site-staging/products/p4.htmlnew file mode 100644index 00000000..f74939a8--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/products/p4.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 4 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 4 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 4 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 4</h1>+ <p>This is deterministic product page 4 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/products/p5.html b/tests/e2e/fixtures/audit-site-staging/products/p5.htmlnew file mode 100644index 00000000..7207606f--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/products/p5.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 5 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 5 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 5 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 5</h1>+ <p>This is deterministic product page 5 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site-staging/sitemap.xml b/tests/e2e/fixtures/audit-site-staging/sitemap.xmlnew file mode 100644index 00000000..f0e35def--- /dev/null+++ b/tests/e2e/fixtures/audit-site-staging/sitemap.xml@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="UTF-8"?>+<!-- Lists all 12 audit-site pages. URLs use the compose-internal `fixtures`+ host; scenarios rewrite the host part to FIXTURES_URL before fetching.+ The xmlns is the standard sitemap namespace identifier, never fetched. -->+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url><loc>http://fixtures/audit-site/index.html</loc></url>+ <url><loc>http://fixtures/audit-site/broken-assets.html</loc></url>+ <url><loc>http://fixtures/audit-site/console-errors.html</loc></url>+ <url><loc>http://fixtures/audit-site/a11y-issues.html</loc></url>+ <url><loc>http://fixtures/audit-site/clean.html</loc></url>+ <url><loc>http://fixtures/audit-site/forms.html</loc></url>+ <url><loc>http://fixtures/audit-site/cookie-echo.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p1.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p2.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p3.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p4.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p5.html</loc></url>+</urlset>diff --git a/tests/e2e/fixtures/audit-site/a11y-issues.html b/tests/e2e/fixtures/audit-site/a11y-issues.htmlnew file mode 100644index 00000000..6d79b018--- /dev/null+++ b/tests/e2e/fixtures/audit-site/a11y-issues.html@@ -0,0 +1,21 @@+<!doctype html>+<!-- Intentional defects: img without alt, input without label, empty link,+ empty button. The img uses a data: URI so it renders without any+ network request (defect is the missing alt, not a 404). -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page with deterministic accessibility defects.">+ <link rel="icon" href="data:,">+ <title>Accessibility Issues — Audit Fixture Site</title>+</head>+<body>+ <h1>Accessibility issues</h1>+ <p>This page contains four deterministic accessibility defects.</p>+ <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">+ <input type="text" name="q">+ <a href="clean.html"></a>+ <button></button>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/broken-assets.html b/tests/e2e/fixtures/audit-site/broken-assets.htmlnew file mode 100644index 00000000..a1c3113b--- /dev/null+++ b/tests/e2e/fixtures/audit-site/broken-assets.html@@ -0,0 +1,27 @@+<!doctype html>+<!-- Intentional defects: loading this page yields EXACTLY 3 asset 404s+ (assets/missing.css, assets/missing.js, assets/missing.png) plus 1+ failed fetch() to assets/missing.json (HTTP 404, for xhr/API-failure+ detection). The data: favicon suppresses the implicit /favicon.ico+ request so no other request on this page fails. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page referencing exactly three missing assets and one missing fetch target.">+ <link rel="icon" href="data:,">+ <title>Broken Assets — Audit Fixture Site</title>+ <link rel="stylesheet" href="assets/missing.css">+ <script src="assets/missing.js"></script>+</head>+<body>+ <h1>Broken assets</h1>+ <p>This page references three assets that do not exist and fetches one missing JSON path.</p>+ <img src="assets/missing.png" alt="intentionally missing image">+ <a href="index.html">Home</a>+ <script>+ fetch('assets/missing.json')+ .then((res) => { document.body.dataset.fetchStatus = String(res.status); })+ .catch(() => { document.body.dataset.fetchStatus = 'error'; });+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/clean.html b/tests/e2e/fixtures/audit-site/clean.htmlnew file mode 100644index 00000000..61105e13--- /dev/null+++ b/tests/e2e/fixtures/audit-site/clean.html@@ -0,0 +1,21 @@+<!doctype html>+<!-- Negative control: zero intentional defects. This file MUST stay+ byte-identical between audit-site and audit-site-staging. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Defect-free control page for audit e2e scenarios.">+ <link rel="icon" href="data:,">+ <title>Clean Page — Audit Fixture Site</title>+</head>+<body>+ <h1>Clean page</h1>+ <p>This page has a title, a meta description, labelled controls, and no defects.</p>+ <form action="clean.html" method="get">+ <label for="search">Search</label>+ <input id="search" type="text" name="search">+ <button type="submit">Search</button>+ </form>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/console-errors.html b/tests/e2e/fixtures/audit-site/console-errors.htmlnew file mode 100644index 00000000..b5d99772--- /dev/null+++ b/tests/e2e/fixtures/audit-site/console-errors.html@@ -0,0 +1,25 @@+<!doctype html>+<!-- Intentional defects: on load this page deterministically emits+ 1 console.log, 1 console.warn, 1 console.error, and 1 uncaught thrown+ error (in its own script block so nothing else is interrupted). -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page that deterministically emits console messages and an uncaught error.">+ <link rel="icon" href="data:,">+ <title>Console Errors — Audit Fixture Site</title>+</head>+<body>+ <h1>Console errors</h1>+ <p>This page logs one message per console level and throws one uncaught error on load.</p>+ <a href="index.html">Home</a>+ <script>+ console.log('audit-fixture log message');+ console.warn('audit-fixture warn message');+ console.error('audit-fixture error message');+ </script>+ <script>+ throw new Error('audit-fixture uncaught error');+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/cookie-echo.html b/tests/e2e/fixtures/audit-site/cookie-echo.htmlnew file mode 100644index 00000000..b574019a--- /dev/null+++ b/tests/e2e/fixtures/audit-site/cookie-echo.html@@ -0,0 +1,20 @@+<!doctype html>+<!-- No intentional defects: renders document.cookie into #cookies so+ cookie-injection e2e scenarios can assert what the page can read. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Page that renders document.cookie into the DOM.">+ <link rel="icon" href="data:,">+ <title>Cookie Echo — Audit Fixture Site</title>+</head>+<body>+ <h1>Cookie echo</h1>+ <p>The current cookies visible to this page are:</p>+ <pre id="cookies"></pre>+ <p><a href="index.html">Home</a></p>+ <script>+ document.getElementById('cookies').textContent = document.cookie;+ </script>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/forms.html b/tests/e2e/fixtures/audit-site/forms.htmlnew file mode 100644index 00000000..230f2aea--- /dev/null+++ b/tests/e2e/fixtures/audit-site/forms.html@@ -0,0 +1,25 @@+<!doctype html>+<!-- Intentional defect: a login form with a password input whose action is+ a plain http:// URL (insecure password post, for security-surface+ detection). The action stays on the fixtures host so the site never+ references an external domain; it is never actually submitted. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Login form posting a password over insecure http.">+ <link rel="icon" href="data:,">+ <title>Forms — Audit Fixture Site</title>+</head>+<body>+ <h1>Forms</h1>+ <p>This page has a login form that posts a password to an insecure http action.</p>+ <form action="http://fixtures/audit-site/login" method="post">+ <label for="user">Username</label>+ <input id="user" name="user" type="text" autocomplete="username">+ <label for="pass">Password</label>+ <input id="pass" name="pass" type="password" autocomplete="current-password">+ <button type="submit">Sign in</button>+ </form>+ <p><a href="index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/index.html b/tests/e2e/fixtures/audit-site/index.htmlnew file mode 100644index 00000000..f001e0d7--- /dev/null+++ b/tests/e2e/fixtures/audit-site/index.html@@ -0,0 +1,35 @@+<!doctype html>+<!-- audit-site homepage: no intentional defects. Nav links to every page on+ the site. The staging copy differs on purpose: banner color, banner+ position, and the welcome text (for visual-diff scenarios). -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic audit fixture site for PinchTab e2e tests.">+ <link rel="icon" href="data:,">+ <title>Audit Fixture Site</title>+</head>+<body>+ <header id="banner" style="background:#0a6cff;color:#ffffff;padding:12px">Welcome to the audit fixture site</header>+ <nav aria-label="Site pages">+ <ul>+ <li><a href="index.html">Home</a></li>+ <li><a href="broken-assets.html">Broken assets</a></li>+ <li><a href="console-errors.html">Console errors</a></li>+ <li><a href="a11y-issues.html">Accessibility issues</a></li>+ <li><a href="clean.html">Clean page</a></li>+ <li><a href="forms.html">Forms</a></li>+ <li><a href="cookie-echo.html">Cookie echo</a></li>+ <li><a href="products/p1.html">Product 1</a></li>+ <li><a href="products/p2.html">Product 2</a></li>+ <li><a href="products/p3.html">Product 3</a></li>+ <li><a href="products/p4.html">Product 4</a></li>+ <li><a href="products/p5.html">Product 5</a></li>+ </ul>+ </nav>+ <main>+ <h1>Audit fixture site</h1>+ <p id="tagline">Every page on this site documents its own intentional defects in an HTML comment.</p>+ </main>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/products/p1.html b/tests/e2e/fixtures/audit-site/products/p1.htmlnew file mode 100644index 00000000..85982bba--- /dev/null+++ b/tests/e2e/fixtures/audit-site/products/p1.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 1 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 1 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 1 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 1</h1>+ <p>This is deterministic product page 1 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/products/p2.html b/tests/e2e/fixtures/audit-site/products/p2.htmlnew file mode 100644index 00000000..9eae081b--- /dev/null+++ b/tests/e2e/fixtures/audit-site/products/p2.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 2 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 2 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 2 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 2</h1>+ <p>This is deterministic product page 2 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/products/p3.html b/tests/e2e/fixtures/audit-site/products/p3.htmlnew file mode 100644index 00000000..4ff11b56--- /dev/null+++ b/tests/e2e/fixtures/audit-site/products/p3.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 3 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 3 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 3 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 3</h1>+ <p>This is deterministic product page 3 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/products/p4.html b/tests/e2e/fixtures/audit-site/products/p4.htmlnew file mode 100644index 00000000..f74939a8--- /dev/null+++ b/tests/e2e/fixtures/audit-site/products/p4.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 4 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 4 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 4 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 4</h1>+ <p>This is deterministic product page 4 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/products/p5.html b/tests/e2e/fixtures/audit-site/products/p5.htmlnew file mode 100644index 00000000..7207606f--- /dev/null+++ b/tests/e2e/fixtures/audit-site/products/p5.html@@ -0,0 +1,16 @@+<!doctype html>+<!-- No intentional defects: template-alike product page 5 of 5, used as a+ same-template page group for sampling scenarios. -->+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="description" content="Deterministic product page 5 in the audit fixture sampling group.">+ <link rel="icon" href="data:,">+ <title>Product 5 — Audit Fixture Site</title>+</head>+<body>+ <h1>Product 5</h1>+ <p>This is deterministic product page 5 of 5 in the sampling group.</p>+ <p><a href="../index.html">Home</a></p>+</body>+</html>diff --git a/tests/e2e/fixtures/audit-site/sitemap.xml b/tests/e2e/fixtures/audit-site/sitemap.xmlnew file mode 100644index 00000000..f0e35def--- /dev/null+++ b/tests/e2e/fixtures/audit-site/sitemap.xml@@ -0,0 +1,18 @@+<?xml version="1.0" encoding="UTF-8"?>+<!-- Lists all 12 audit-site pages. URLs use the compose-internal `fixtures`+ host; scenarios rewrite the host part to FIXTURES_URL before fetching.+ The xmlns is the standard sitemap namespace identifier, never fetched. -->+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url><loc>http://fixtures/audit-site/index.html</loc></url>+ <url><loc>http://fixtures/audit-site/broken-assets.html</loc></url>+ <url><loc>http://fixtures/audit-site/console-errors.html</loc></url>+ <url><loc>http://fixtures/audit-site/a11y-issues.html</loc></url>+ <url><loc>http://fixtures/audit-site/clean.html</loc></url>+ <url><loc>http://fixtures/audit-site/forms.html</loc></url>+ <url><loc>http://fixtures/audit-site/cookie-echo.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p1.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p2.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p3.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p4.html</loc></url>+ <url><loc>http://fixtures/audit-site/products/p5.html</loc></url>+</urlset>diff --git a/tests/e2e/scenarios/api/audit-fixtures-basic.sh b/tests/e2e/scenarios/api/audit-fixtures-basic.shnew file mode 100755index 00000000..f56bd169--- /dev/null+++ b/tests/e2e/scenarios/api/audit-fixtures-basic.sh@@ -0,0 +1,142 @@+#!/bin/bash+# audit-fixtures-basic.sh — Integrity checks for the deterministic audit+# fixture site (audit-site + audit-site-staging), served by the fixtures+# nginx container. Pure HTTP checks against the fixtures server; no+# pinchtab API calls.++GROUP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+source "${GROUP_DIR}/../../helpers/api.sh"++FIXTURES_DIR="${GROUP_DIR}/../../fixtures"++http_status() {+ curl -s -o /dev/null -w '%{http_code}' "$1"+}++assert_status() {+ local url="$1"+ local expected="$2"+ local desc="${3:-GET ${url#"${FIXTURES_URL}"} → ${expected}}"+ local actual+ actual=$(http_status "$url")+ if [ "$actual" = "$expected" ]; then+ pass_assert "$desc"+ else+ fail_assert "$desc (got: $actual)"+ fi+}++AUDIT_PAGES=(+ index.html+ broken-assets.html+ console-errors.html+ a11y-issues.html+ clean.html+ forms.html+ cookie-echo.html+ products/p1.html+ products/p2.html+ products/p3.html+ products/p4.html+ products/p5.html+ sitemap.xml+)++# ─────────────────────────────────────────────────────────────────+start_test "every audit-site page and sitemap.xml return 200"++for page in "${AUDIT_PAGES[@]}"; do+ assert_status "${FIXTURES_URL}/audit-site/${page}" 200+done++end_test++# ─────────────────────────────────────────────────────────────────+start_test "broken-assets.html missing references all 404"++for asset in missing.css missing.js missing.png missing.json; do+ assert_status "${FIXTURES_URL}/audit-site/assets/${asset}" 404+done++# Quoted occurrences only: the actual href/src/fetch references, not the+# file's documentation comment.+MISSING_REFS=$(grep -cE "['\"]assets/missing\." "${FIXTURES_DIR}/audit-site/broken-assets.html")+if [ "$MISSING_REFS" -eq 4 ]; then+ pass_assert "broken-assets.html references exactly 3 assets + 1 fetch target"+else+ fail_assert "broken-assets.html missing-reference count (got: $MISSING_REFS, want 4)"+fi++end_test++# ─────────────────────────────────────────────────────────────────+start_test "staging clean.html is byte-identical, index.html differs"++LIVE_TMP=$(mktemp /tmp/audit-fixture-live.XXXXXX)+STAGING_TMP=$(mktemp /tmp/audit-fixture-staging.XXXXXX)++curl -s -o "$LIVE_TMP" "${FIXTURES_URL}/audit-site/clean.html"+curl -s -o "$STAGING_TMP" "${FIXTURES_URL}/audit-site-staging/clean.html"+if cmp -s "$LIVE_TMP" "$STAGING_TMP"; then+ pass_assert "clean.html byte-identical between live and staging"+else+ fail_assert "clean.html differs between live and staging"+fi++curl -s -o "$LIVE_TMP" "${FIXTURES_URL}/audit-site/index.html"+curl -s -o "$STAGING_TMP" "${FIXTURES_URL}/audit-site-staging/index.html"+if cmp -s "$LIVE_TMP" "$STAGING_TMP"; then+ fail_assert "index.html should differ between live and staging"+else+ pass_assert "index.html differs between live and staging"+fi++rm -f "$LIVE_TMP" "$STAGING_TMP"++end_test++# ─────────────────────────────────────────────────────────────────+start_test "sitemap lists >=10 URLs incl products, all resolve 200"++SITEMAP=$(curl -s "${FIXTURES_URL}/audit-site/sitemap.xml")+LOCS=$(echo "$SITEMAP" | grep -o '<loc>[^<]*</loc>' | sed -e 's|<loc>||' -e 's|</loc>||')++LOC_COUNT=$(echo "$LOCS" | grep -c .)+if [ "$LOC_COUNT" -ge 10 ]; then+ pass_assert "sitemap lists $LOC_COUNT URLs (>= 10)"+else+ fail_assert "sitemap lists $LOC_COUNT URLs (want >= 10)"+fi++PRODUCT_COUNT=$(echo "$LOCS" | grep -c 'products/p')+if [ "$PRODUCT_COUNT" -eq 5 ]; then+ pass_assert "sitemap lists all 5 products/* pages"+else+ fail_assert "sitemap products/* count (got: $PRODUCT_COUNT, want 5)"+fi++while IFS= read -r loc; do+ [ -z "$loc" ] && continue+ path=$(echo "$loc" | sed -E 's|^https?://[^/]+||')+ assert_status "${FIXTURES_URL}${path}" 200 "sitemap URL ${path} → 200"+done <<< "$LOCS"++end_test++# ─────────────────────────────────────────────────────────────────+start_test "no fixture references an external domain"++# Only the compose-internal fixtures host and the standard (never fetched)+# sitemap namespace identifier are allowed to appear as absolute URLs.+EXTERNAL_REFS=$(grep -rEoh 'https?://[^"'"'"'<> ]+' \+ "${FIXTURES_DIR}/audit-site" "${FIXTURES_DIR}/audit-site-staging" \+ | grep -vE '^http://fixtures([/:]|$)' \+ | grep -vF 'http://www.sitemaps.org/schemas/sitemap/0.9' || true)++if [ -z "$EXTERNAL_REFS" ]; then+ pass_assert "no external domain references in audit fixtures"+else+ fail_assert "external references found: $(echo "$EXTERNAL_REFS" | tr '\n' ' ')"+fi++end_test