aria-ease 6.4.7 → 6.4.10
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/README.md +27 -29
- package/bin/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/bin/cli.cjs +890 -485
- package/bin/cli.js +1 -3
- package/bin/contractTestRunnerPlaywright-7BCEDPZF.js +970 -0
- package/bin/{test-WICJJ62P.js → test-JGKWOL6J.js} +34 -29
- package/dist/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/dist/contractTestRunnerPlaywright-7BCEDPZF.js +970 -0
- package/dist/index.cjs +890 -483
- package/dist/index.js +34 -29
- package/dist/src/utils/test/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/dist/src/utils/test/contractTestRunnerPlaywright-O7FF3X67.js +941 -0
- package/dist/src/utils/test/contracts/ComboboxContract.json +1 -0
- package/dist/src/utils/test/index.cjs +861 -477
- package/dist/src/utils/test/index.d.cts +6 -1
- package/dist/src/utils/test/index.d.ts +6 -1
- package/dist/src/utils/test/index.js +34 -29
- package/package.json +1 -1
- package/bin/contractTestRunnerPlaywright-D57V4RSU.js +0 -628
- package/dist/contractTestRunnerPlaywright-D57V4RSU.js +0 -628
- package/dist/src/utils/test/contractTestRunnerPlaywright-HV4EIRDH.js +0 -610
|
@@ -3,6 +3,11 @@ interface JestAxeResult {
|
|
|
3
3
|
raw: unknown;
|
|
4
4
|
contract: unknown;
|
|
5
5
|
}
|
|
6
|
+
interface ContractTestResult {
|
|
7
|
+
passes: string[];
|
|
8
|
+
failures: string[];
|
|
9
|
+
skipped: string[];
|
|
10
|
+
}
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
13
|
* Runs static and interactions accessibility test on UI components.
|
|
@@ -12,7 +17,7 @@ interface JestAxeResult {
|
|
|
12
17
|
*/
|
|
13
18
|
|
|
14
19
|
declare function testUiComponent(componentName: string, component: HTMLElement | null, url: string | null): Promise<JestAxeResult>;
|
|
15
|
-
declare let runTest: () => Promise<
|
|
20
|
+
declare let runTest: () => Promise<ContractTestResult>;
|
|
16
21
|
/**
|
|
17
22
|
* Cleanup function to close the shared Playwright browser
|
|
18
23
|
* Call this in afterAll() or after all tests complete
|
|
@@ -3,6 +3,11 @@ interface JestAxeResult {
|
|
|
3
3
|
raw: unknown;
|
|
4
4
|
contract: unknown;
|
|
5
5
|
}
|
|
6
|
+
interface ContractTestResult {
|
|
7
|
+
passes: string[];
|
|
8
|
+
failures: string[];
|
|
9
|
+
skipped: string[];
|
|
10
|
+
}
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
13
|
* Runs static and interactions accessibility test on UI components.
|
|
@@ -12,7 +17,7 @@ interface JestAxeResult {
|
|
|
12
17
|
*/
|
|
13
18
|
|
|
14
19
|
declare function testUiComponent(componentName: string, component: HTMLElement | null, url: string | null): Promise<JestAxeResult>;
|
|
15
|
-
declare let runTest: () => Promise<
|
|
20
|
+
declare let runTest: () => Promise<ContractTestResult>;
|
|
16
21
|
/**
|
|
17
22
|
* Cleanup function to close the shared Playwright browser
|
|
18
23
|
* Call this in afterAll() or after all tests complete
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { closeSharedBrowser, ContractReporter, contract_default } from './chunk-
|
|
1
|
+
import { closeSharedBrowser, ContractReporter, contract_default } from './chunk-GFKAJHCS.js';
|
|
2
2
|
import { axe } from 'jest-axe';
|
|
3
3
|
import fs from 'fs/promises';
|
|
4
4
|
|
|
@@ -106,7 +106,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
|
|
|
106
106
|
const devServerUrl = await checkDevServer(url);
|
|
107
107
|
if (devServerUrl) {
|
|
108
108
|
console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
|
|
109
|
-
const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-
|
|
109
|
+
const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-O7FF3X67.js');
|
|
110
110
|
contract = await runContractTestsPlaywright(componentName, devServerUrl);
|
|
111
111
|
} else {
|
|
112
112
|
throw new Error(
|
|
@@ -161,6 +161,11 @@ ${violationDetails}
|
|
|
161
161
|
return result;
|
|
162
162
|
}
|
|
163
163
|
var runTest = async () => {
|
|
164
|
+
return {
|
|
165
|
+
passes: [],
|
|
166
|
+
failures: [],
|
|
167
|
+
skipped: []
|
|
168
|
+
};
|
|
164
169
|
};
|
|
165
170
|
if (typeof window === "undefined") {
|
|
166
171
|
runTest = async () => {
|
|
@@ -168,36 +173,36 @@ if (typeof window === "undefined") {
|
|
|
168
173
|
`);
|
|
169
174
|
const { exec } = await import('child_process');
|
|
170
175
|
const chalk = (await import('chalk')).default;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (stdout) {
|
|
176
|
+
return new Promise((resolve, reject) => {
|
|
177
|
+
exec(
|
|
178
|
+
`npx vitest --run --reporter verbose`,
|
|
179
|
+
async (error, stdout, stderr) => {
|
|
176
180
|
console.log(stdout);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
181
|
+
if (stderr) console.error(stderr);
|
|
182
|
+
const testsPassed = !error || error.code === 0;
|
|
183
|
+
if (testsPassed) {
|
|
184
|
+
try {
|
|
185
|
+
const { displayBadgeInfo, promptAddBadge } = await import('./badgeHelper-HZKGOPB4.js');
|
|
186
|
+
displayBadgeInfo("component");
|
|
187
|
+
await promptAddBadge("component", process.cwd());
|
|
188
|
+
console.log(chalk.dim("\n" + "\u2500".repeat(60)));
|
|
189
|
+
console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
|
|
190
|
+
console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
|
|
191
|
+
console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
|
|
192
|
+
console.log(chalk.dim("\u2500".repeat(60) + "\n"));
|
|
193
|
+
} catch (badgeError) {
|
|
194
|
+
console.error("Warning: Could not display badge prompt:", badgeError);
|
|
195
|
+
}
|
|
196
|
+
resolve({ passes: [], failures: [], skipped: [] });
|
|
197
|
+
process.exit(0);
|
|
198
|
+
} else {
|
|
199
|
+
const exitCode = error?.code || 1;
|
|
200
|
+
reject(new Error(`Tests failed with code ${exitCode}`));
|
|
201
|
+
process.exit(exitCode);
|
|
193
202
|
}
|
|
194
|
-
process.exit(0);
|
|
195
|
-
} else {
|
|
196
|
-
const exitCode = error?.code || 1;
|
|
197
|
-
process.exit(exitCode);
|
|
198
203
|
}
|
|
199
|
-
|
|
200
|
-
);
|
|
204
|
+
);
|
|
205
|
+
});
|
|
201
206
|
};
|
|
202
207
|
}
|
|
203
208
|
async function cleanupTests() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aria-ease",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.10",
|
|
4
4
|
"description": "Accessibility infrastructure for the entire frontend engineering lifecycle. Build accessible patterns, run automated audits, verify component interactions, and gate deployments — all in one system.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"type": "module",
|