aria-ease 6.4.8 → 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 +15 -27
- package/bin/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/bin/cli.cjs +890 -483
- package/bin/cli.js +1 -1
- 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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ContractReporter,
|
|
3
3
|
closeSharedBrowser,
|
|
4
4
|
contract_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GFKAJHCS.js";
|
|
6
6
|
import "./chunk-I2KLQ2HA.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/test/src/test.ts
|
|
@@ -114,7 +114,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
|
|
|
114
114
|
const devServerUrl = await checkDevServer(url);
|
|
115
115
|
if (devServerUrl) {
|
|
116
116
|
console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
|
|
117
|
-
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-
|
|
117
|
+
const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-7BCEDPZF.js");
|
|
118
118
|
contract = await runContractTestsPlaywright(componentName, devServerUrl);
|
|
119
119
|
} else {
|
|
120
120
|
throw new Error(
|
|
@@ -169,6 +169,11 @@ ${violationDetails}
|
|
|
169
169
|
return result;
|
|
170
170
|
}
|
|
171
171
|
var runTest = async () => {
|
|
172
|
+
return {
|
|
173
|
+
passes: [],
|
|
174
|
+
failures: [],
|
|
175
|
+
skipped: []
|
|
176
|
+
};
|
|
172
177
|
};
|
|
173
178
|
if (typeof window === "undefined") {
|
|
174
179
|
runTest = async () => {
|
|
@@ -176,36 +181,36 @@ if (typeof window === "undefined") {
|
|
|
176
181
|
`);
|
|
177
182
|
const { exec } = await import("child_process");
|
|
178
183
|
const chalk = (await import("chalk")).default;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (stdout) {
|
|
184
|
+
return new Promise((resolve, reject) => {
|
|
185
|
+
exec(
|
|
186
|
+
`npx vitest --run --reporter verbose`,
|
|
187
|
+
async (error, stdout, stderr) => {
|
|
184
188
|
console.log(stdout);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
if (stderr) console.error(stderr);
|
|
190
|
+
const testsPassed = !error || error.code === 0;
|
|
191
|
+
if (testsPassed) {
|
|
192
|
+
try {
|
|
193
|
+
const { displayBadgeInfo, promptAddBadge } = await import("./badgeHelper-JOWO6RQG.js");
|
|
194
|
+
displayBadgeInfo("component");
|
|
195
|
+
await promptAddBadge("component", process.cwd());
|
|
196
|
+
console.log(chalk.dim("\n" + "\u2500".repeat(60)));
|
|
197
|
+
console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
|
|
198
|
+
console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
|
|
199
|
+
console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
|
|
200
|
+
console.log(chalk.dim("\u2500".repeat(60) + "\n"));
|
|
201
|
+
} catch (badgeError) {
|
|
202
|
+
console.error("Warning: Could not display badge prompt:", badgeError);
|
|
203
|
+
}
|
|
204
|
+
resolve({ passes: [], failures: [], skipped: [] });
|
|
205
|
+
process.exit(0);
|
|
206
|
+
} else {
|
|
207
|
+
const exitCode = error?.code || 1;
|
|
208
|
+
reject(new Error(`Tests failed with code ${exitCode}`));
|
|
209
|
+
process.exit(exitCode);
|
|
201
210
|
}
|
|
202
|
-
process.exit(0);
|
|
203
|
-
} else {
|
|
204
|
-
const exitCode = error?.code || 1;
|
|
205
|
-
process.exit(exitCode);
|
|
206
211
|
}
|
|
207
|
-
|
|
208
|
-
);
|
|
212
|
+
);
|
|
213
|
+
});
|
|
209
214
|
};
|
|
210
215
|
}
|
|
211
216
|
async function cleanupTests() {
|
|
@@ -80,7 +80,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
80
80
|
failureMessage,
|
|
81
81
|
isOptional: test.isOptional
|
|
82
82
|
};
|
|
83
|
-
if (status === "skip"
|
|
83
|
+
if (status === "skip") {
|
|
84
84
|
result.skipReason = "Requires real browser (addEventListener events)";
|
|
85
85
|
}
|
|
86
86
|
this.dynamicResults.push(result);
|
|
@@ -186,7 +186,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
186
186
|
`);
|
|
187
187
|
if (totalFailures === 0 && this.skipped === 0 && this.optionalSuggestions === 0) {
|
|
188
188
|
this.log(`\u2705 All ${totalRun} tests passed!`);
|
|
189
|
-
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard
|
|
189
|
+
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
|
|
190
190
|
} else if (totalFailures === 0) {
|
|
191
191
|
this.log(`\u2705 ${totalPasses}/${totalRun} required tests passed`);
|
|
192
192
|
if (this.skipped > 0) {
|
|
@@ -195,7 +195,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
195
195
|
if (this.optionalSuggestions > 0) {
|
|
196
196
|
this.log(`\u{1F4A1} ${this.optionalSuggestions} optional enhancement${this.optionalSuggestions > 1 ? "s" : ""} suggested`);
|
|
197
197
|
}
|
|
198
|
-
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard
|
|
198
|
+
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
|
|
199
199
|
} else {
|
|
200
200
|
this.log(`\u274C ${totalFailures} test${totalFailures > 1 ? "s" : ""} failed`);
|
|
201
201
|
this.log(`\u2705 ${totalPasses} test${totalPasses > 1 ? "s" : ""} passed`);
|