@wcag-checkr/ci 1.0.0-rc.379 → 1.0.0-rc.380
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +2 -2
- package/package.json +1 -1
- package/wcagcheckr-ci.mjs +37 -9
package/dist/manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "wcagcheckr",
|
|
4
4
|
"description": "Audit your real site for WCAG issues across hover, focus, dark mode & RTL states — baselines surface only NEW violations.",
|
|
5
|
-
"version": "1.0.0.
|
|
6
|
-
"version_name": "1.0.0-rc.
|
|
5
|
+
"version": "1.0.0.380",
|
|
6
|
+
"version_name": "1.0.0-rc.380",
|
|
7
7
|
"author": "Locustware",
|
|
8
8
|
"homepage_url": "https://wcagcheckr.com",
|
|
9
9
|
"icons": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wcag-checkr/ci",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.380",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Headless wcagcheckr accessibility audit runner for CI/CD pipelines. Drives the wcagcheckr Chrome extension via Playwright, runs full-page audits across the state matrix (108 combinations: hover, focus, dark mode, RTL, breakpoints), outputs JSON / SARIF / JUnit, exits with severity-aware codes.",
|
|
6
6
|
"license": "UNLICENSED",
|
package/wcagcheckr-ci.mjs
CHANGED
|
@@ -267,13 +267,21 @@ try {
|
|
|
267
267
|
sidePanel = await context.newPage();
|
|
268
268
|
await sidePanel.goto(`chrome-extension://${extId}/side-panel/side-panel.html`);
|
|
269
269
|
|
|
270
|
-
//
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
// rc.380 — Set dev mode explicitly. The persona wizard was removed in rc.333;
|
|
271
|
+
// the default persona is owner, which has no audit controls. Set userMode in
|
|
272
|
+
// storage and reload so the dev surface renders, then wait for the audit-mode
|
|
273
|
+
// select (the reliable dev-ready signal; the old "wcagcheckr" h1 moved).
|
|
274
|
+
await sidePanel.evaluate(() => chrome.storage.local.set({ userMode: 'dev', v2UiEnabled: false }));
|
|
275
|
+
await sidePanel.reload({ waitUntil: 'load' });
|
|
276
|
+
await sidePanel.waitForTimeout(500);
|
|
277
|
+
for (let i = 0; i < 5; i++) {
|
|
278
|
+
const gotIt = sidePanel.getByRole('button', { name: 'Got it' });
|
|
279
|
+
const next = sidePanel.getByRole('button', { name: 'Next' });
|
|
280
|
+
if (await gotIt.isVisible({ timeout: 400 }).catch(() => false)) { await gotIt.click(); break; }
|
|
281
|
+
if (await next.isVisible({ timeout: 400 }).catch(() => false)) { await next.click(); await sidePanel.waitForTimeout(120); continue; }
|
|
282
|
+
break;
|
|
275
283
|
}
|
|
276
|
-
await sidePanel.waitForSelector('
|
|
284
|
+
await sidePanel.waitForSelector('select[aria-label="Audit mode"]', { timeout: 10_000 });
|
|
277
285
|
|
|
278
286
|
// rc.124 — Headless-build lockdown gate. A team license is required to
|
|
279
287
|
// run audits during the private build phase. If --license is omitted
|
|
@@ -351,12 +359,32 @@ try {
|
|
|
351
359
|
await sidePanel.waitForTimeout(300);
|
|
352
360
|
|
|
353
361
|
await sidePanel.getByLabel('Audit mode').selectOption('full-page');
|
|
362
|
+
// rc.380 — Arm the completion listener BEFORE clicking. The post-audit
|
|
363
|
+
// summary text the CLI used to poll for ("N states · M unique violations")
|
|
364
|
+
// was removed in the rc.313–320 UI rebuild; AUDIT_COMPLETE_EVENT is the
|
|
365
|
+
// UI-independent signal the side panel itself listens for.
|
|
366
|
+
await sidePanel.evaluate(() => {
|
|
367
|
+
globalThis.__cliAuditOutcome = new Promise((res) => {
|
|
368
|
+
const l = (m) => {
|
|
369
|
+
if (m?.type === 'AUDIT_COMPLETE_EVENT') { chrome.runtime.onMessage.removeListener(l); res('completed'); }
|
|
370
|
+
else if (m?.type === 'AUDIT_FAILED_EVENT') { chrome.runtime.onMessage.removeListener(l); res('failed'); }
|
|
371
|
+
};
|
|
372
|
+
chrome.runtime.onMessage.addListener(l);
|
|
373
|
+
});
|
|
374
|
+
});
|
|
354
375
|
await sidePanel.getByRole('button', { name: /Scan page|Auditing/ }).click();
|
|
355
376
|
log('audit started');
|
|
356
377
|
|
|
357
|
-
await sidePanel
|
|
358
|
-
|
|
359
|
-
|
|
378
|
+
const outcome = await sidePanel.evaluate(
|
|
379
|
+
(ms) => Promise.race([
|
|
380
|
+
globalThis.__cliAuditOutcome,
|
|
381
|
+
new Promise((r) => setTimeout(() => r('timeout'), ms)),
|
|
382
|
+
]),
|
|
383
|
+
args.timeout,
|
|
384
|
+
);
|
|
385
|
+
if (outcome !== 'completed') {
|
|
386
|
+
throw new Error(`audit did not complete (${outcome}) within ${args.timeout}ms`);
|
|
387
|
+
}
|
|
360
388
|
log('audit completed');
|
|
361
389
|
|
|
362
390
|
return await collectResults();
|