ccqa 0.5.0 → 0.5.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 +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/ccqa.mjs
CHANGED
|
@@ -278,8 +278,8 @@ The selector must identify *which* element by something **other than the state y
|
|
|
278
278
|
|
|
279
279
|
- ✗ \`element_disabled | button[disabled] |\` — picks an already-disabled button, then "confirms" it is disabled. Passes even if the button the spec cares about is missing or enabled.
|
|
280
280
|
- ✗ \`element_enabled | button:enabled |\`, \`[aria-disabled='true']\`, \`input:disabled\` — same trap.
|
|
281
|
-
- ✓ Name the element by a stable, state-independent selector and assert the state on it: e.g. the "
|
|
282
|
-
- If you cannot target the specific element without a state pseudo-class/attribute, **do not emit the enabled/disabled assert** — assert a user-visible consequence instead (e.g. the action it gates does not happen, a "
|
|
281
|
+
- ✓ Name the element by a stable, state-independent selector and assert the state on it: e.g. the "Submit" button is \`find role button --name "Submit"\`; to assert it is disabled, give \`element_disabled\` a selector that targets *that* button (a stable \`id\` / \`data-testid\` / unique class), **not** \`[disabled]\`.
|
|
282
|
+
- If you cannot target the specific element without a state pseudo-class/attribute, **do not emit the enabled/disabled assert** — assert a user-visible consequence instead (e.g. the action it gates does not happen, a "you don't have permission" message is shown), or rely on \`text_visible\` for the label plus \`text_not_visible\` for what an enabled control would have produced.
|
|
283
283
|
|
|
284
284
|
**Page-context and selector rules:**
|
|
285
285
|
|
|
@@ -2769,7 +2769,7 @@ function isRefSelector(selector) {
|
|
|
2769
2769
|
* `abAssertDisabled("button[disabled]")` resolves to `is enabled
|
|
2770
2770
|
* "button[disabled]"`: it first selects an already-disabled element, then
|
|
2771
2771
|
* confirms it is disabled — always true, and true even when the *target* the
|
|
2772
|
-
* spec cares about (e.g. the "
|
|
2772
|
+
* spec cares about (e.g. the "Submit" button) is missing or enabled.
|
|
2773
2773
|
* The agent emits these when it reaches for "the disabled button" instead of
|
|
2774
2774
|
* naming the element by a state-independent selector. The assertion verifies
|
|
2775
2775
|
* nothing, so codegen drops it (breadcrumb only) rather than baking a green
|
package/dist/package.json
CHANGED