ccqa 1.40.5 → 1.40.7
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 +12 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/ccqa.mjs
CHANGED
|
@@ -1660,7 +1660,7 @@ async function invokeClaudeStreaming(options, onEvent) {
|
|
|
1660
1660
|
};
|
|
1661
1661
|
if (hasRefSelector(cmd)) return {
|
|
1662
1662
|
decision: "block",
|
|
1663
|
-
reason: "@ref selectors (like @e14) are session-specific and change every run. They cannot be used in generated tests. Use one of the allowed selector formats instead: [aria-label='...'], text=..., [placeholder='...'], or [type='password']. Take a fresh snapshot and find the element's aria-label or visible text."
|
|
1663
|
+
reason: "@ref selectors (like @e14) are session-specific and change every run. They cannot be used in generated tests. Use one of the allowed selector formats instead: [aria-label='...'], text=..., [placeholder='...'], or [type='password']. Take a fresh snapshot and find the element's aria-label or visible text. If an allowed selector already clicks the element but nothing happens, the element is clipped by an inner scroll container: `scrollintoview` it (addressed by a CSS selector, not `text=`) and click again — a @ref would not have fixed that either."
|
|
1664
1664
|
};
|
|
1665
1665
|
const bareTag = findPositionalBareTag(cmd);
|
|
1666
1666
|
if (bareTag !== null) return {
|
|
@@ -15289,12 +15289,18 @@ function assertToLine(action, locator) {
|
|
|
15289
15289
|
return assertLine ?? comment;
|
|
15290
15290
|
}
|
|
15291
15291
|
/**
|
|
15292
|
-
* `url_contains` →
|
|
15293
|
-
*
|
|
15294
|
-
*
|
|
15292
|
+
* `url_contains` → "the URL contains this".
|
|
15293
|
+
*
|
|
15294
|
+
* A `${VAR}` only has a value at run time, which rules out both forms that take
|
|
15295
|
+
* the pattern up front: a regular expression would have to match the reference
|
|
15296
|
+
* span with `.*` (so `${APP_BASE_URL}` alone would assert nothing at all), and
|
|
15297
|
+
* the glob `toHaveURL` accepts is compared against the whole URL, so an
|
|
15298
|
+
* absolute one never matches. Polling `page.url()` keeps the substring
|
|
15299
|
+
* semantic and the resolved value.
|
|
15295
15300
|
*/
|
|
15296
15301
|
function urlContainsAssert(value) {
|
|
15297
|
-
|
|
15302
|
+
const expr = jExpr(value);
|
|
15303
|
+
if (expr.startsWith("`")) return `await expect.poll(() => page.url()).toContain(${expr});`;
|
|
15298
15304
|
return `await expect(page).toHaveURL(new RegExp(${j(escapeRegExp(value))}));`;
|
|
15299
15305
|
}
|
|
15300
15306
|
function escapeRegExp(s) {
|
|
@@ -17829,6 +17835,7 @@ find nth <index> "<ALLOWED-css>" <action>
|
|
|
17829
17835
|
5. For checkboxes: try \`check "text=Label"\` or \`check "[aria-label='Label']"\`.
|
|
17830
17836
|
6. If repeated labels make every ALLOWED selector ambiguous → use the \`find\` subset above.
|
|
17831
17837
|
7. Never guess. If a selector fails, take a fresh snapshot before retrying.
|
|
17838
|
+
8. **A click that reports success but changes nothing means the element sits outside the visible part of an inner scroll container** — the event dispatches, the app never reacts, and no error is printed. Run \`scrollintoview\` on the element and click again. Scroll to the element itself, addressed by a CSS selector (\`scrollintoview "button.primary-action"\`); \`scrollintoview "text=…"\` can land on a text node that leaves the control still clipped. Do not read this as a product bug or reach for a \`@ref\` — verify by checking that the DOM changed (e.g. \`get count\` on what the click should have produced).
|
|
17832
17839
|
|
|
17833
17840
|
### Special input types
|
|
17834
17841
|
|
package/dist/package.json
CHANGED