ccqa 1.57.0 → 1.57.1
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/bin/ccqa.mjs +9 -46
- package/dist/hub-client/index.d.cts +2 -2
- package/dist/hub-client/index.d.mts +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/ccqa.mjs
CHANGED
|
@@ -8200,52 +8200,15 @@ function exportedNames(source) {
|
|
|
8200
8200
|
function reviewEmittedFiles(input) {
|
|
8201
8201
|
const locators = collectLocators(input.files);
|
|
8202
8202
|
const said = input.caseText.join("\n");
|
|
8203
|
-
return [
|
|
8204
|
-
...
|
|
8205
|
-
...
|
|
8206
|
-
...
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
...weakerTwin(file, source),
|
|
8213
|
-
...unreached(file, source, input)
|
|
8214
|
-
])
|
|
8215
|
-
];
|
|
8216
|
-
}
|
|
8217
|
-
/**
|
|
8218
|
-
* A path with a placeholder segment in it — `/orders/{orderId}`. Writing one
|
|
8219
|
-
* in prose is a statement about the address, not about the page's contents:
|
|
8220
|
-
* there is no other reason to name the part that changes per run.
|
|
8221
|
-
*/
|
|
8222
|
-
const PLACEHOLDER_PATH = /\/[A-Za-z0-9_\-]+(?:\/[A-Za-z0-9_\-]+)*\/\{[A-Za-z0-9_]+\}/;
|
|
8223
|
-
/**
|
|
8224
|
-
* A case that says where the run must end up, and a test that never looks at
|
|
8225
|
-
* the address.
|
|
8226
|
-
*
|
|
8227
|
-
* The row being on screen is not the same claim as being on the screen that
|
|
8228
|
-
* shows it — a product that rendered the row without navigating passes, and
|
|
8229
|
-
* that is the failure the expectation was written to catch. Scoped to
|
|
8230
|
-
* placeholder paths because those are unambiguous; a path mentioned as scenery
|
|
8231
|
-
* ("on /settings, the button is shown") is not a claim about the address.
|
|
8232
|
-
*
|
|
8233
|
-
* Calibrated against a small set of hand-written case definitions: a few
|
|
8234
|
-
* name a placeholder path in their expectations, most of those already
|
|
8235
|
-
* assert on the URL, and the one that does not is the defect this was
|
|
8236
|
-
* written for.
|
|
8237
|
-
*/
|
|
8238
|
-
function unassertedPath(input) {
|
|
8239
|
-
const source = input.files.get(input.testPath);
|
|
8240
|
-
if (source === void 0) return [];
|
|
8241
|
-
const stated = input.caseText.find((text) => PLACEHOLDER_PATH.test(text));
|
|
8242
|
-
if (stated === void 0 || /\btoHaveURL\b/.test(source)) return [];
|
|
8243
|
-
return [{
|
|
8244
|
-
file: input.testPath,
|
|
8245
|
-
line: 1,
|
|
8246
|
-
rule: "unasserted-path",
|
|
8247
|
-
message: `the case says where the run ends up — "${PLACEHOLDER_PATH.exec(stated)?.[0]}" — and nothing here looks at the address. What the screen shows can be right while the screen is wrong. Assert the URL where the case says it changes`
|
|
8248
|
-
}];
|
|
8203
|
+
return [...decidesNothing(input), ...[...input.files].flatMap(([file, source]) => [
|
|
8204
|
+
...toolIdentifiers(file, source),
|
|
8205
|
+
...containerOfPageText(file, source),
|
|
8206
|
+
...unjustifiedFirst(file, source),
|
|
8207
|
+
...describeEcho(file, source),
|
|
8208
|
+
...unaskedAssertions(file, source, locators, said),
|
|
8209
|
+
...weakerTwin(file, source),
|
|
8210
|
+
...unreached(file, source, input)
|
|
8211
|
+
])];
|
|
8249
8212
|
}
|
|
8250
8213
|
/** `readonly name =`, `name(...): Locator {`, and `export … name`. */
|
|
8251
8214
|
const DECLARED = /(?:readonly\s+([A-Za-z0-9_]+)\s*=|\b([A-Za-z0-9_]+)\([^)]*\)\s*:\s*Locator\b|export\s+(?:async\s+)?(?:const|let|function|class)\s+([A-Za-z0-9_]+))/g;
|
|
@@ -652,8 +652,8 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
652
652
|
title: z.ZodNullable<z.ZodString>;
|
|
653
653
|
target: z.ZodOptional<z.ZodString>;
|
|
654
654
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
655
|
-
live: "live";
|
|
656
655
|
deterministic: "deterministic";
|
|
656
|
+
live: "live";
|
|
657
657
|
}>>;
|
|
658
658
|
status: z.ZodEnum<{
|
|
659
659
|
passed: "passed";
|
|
@@ -874,8 +874,8 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
874
874
|
title: z.ZodNullable<z.ZodString>;
|
|
875
875
|
target: z.ZodOptional<z.ZodString>;
|
|
876
876
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
877
|
-
live: "live";
|
|
878
877
|
deterministic: "deterministic";
|
|
878
|
+
live: "live";
|
|
879
879
|
}>>;
|
|
880
880
|
status: z.ZodEnum<{
|
|
881
881
|
passed: "passed";
|
|
@@ -652,8 +652,8 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
652
652
|
title: z.ZodNullable<z.ZodString>;
|
|
653
653
|
target: z.ZodOptional<z.ZodString>;
|
|
654
654
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
655
|
-
live: "live";
|
|
656
655
|
deterministic: "deterministic";
|
|
656
|
+
live: "live";
|
|
657
657
|
}>>;
|
|
658
658
|
status: z.ZodEnum<{
|
|
659
659
|
passed: "passed";
|
|
@@ -874,8 +874,8 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
874
874
|
title: z.ZodNullable<z.ZodString>;
|
|
875
875
|
target: z.ZodOptional<z.ZodString>;
|
|
876
876
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
877
|
-
live: "live";
|
|
878
877
|
deterministic: "deterministic";
|
|
878
|
+
live: "live";
|
|
879
879
|
}>>;
|
|
880
880
|
status: z.ZodEnum<{
|
|
881
881
|
passed: "passed";
|
package/dist/package.json
CHANGED