ccqa 0.3.5 → 0.3.6
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 +20 -1
- package/dist/bin/ccqa.mjs +1007 -182
- package/dist/package.json +1 -1
- package/dist/runtime/test-helpers.mjs +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -232,24 +232,43 @@ Assertions are stability-aware: Claude skips timestamps, session IDs, and exact
|
|
|
232
232
|
|
|
233
233
|
## Auto-fix
|
|
234
234
|
|
|
235
|
-
If the generated script fails
|
|
235
|
+
If the generated script fails, `generate` invokes an LLM to diagnose the failure and propose a fix. The diagnosis is one of:
|
|
236
|
+
|
|
237
|
+
- **TIMING_ISSUE** — insert or extend `sleep` so the page has time to settle.
|
|
238
|
+
- **OVER_ASSERTION** — remove `abAssert*` lines that the spec doesn't actually require.
|
|
239
|
+
- **SELECTOR_DRIFT** — replace a renamed selector with the new one. The diagnose LLM is allowed to `Grep` / `Read` your repository (read-only) to find the actual `aria-label` / `placeholder` / `data-testid` / i18n string in the app source, so renames in the UI code are caught even when the failure log only says "selector not visible".
|
|
240
|
+
- **DATA_MISSING** / **UNKNOWN** — not auto-fixable; the loop bails and reports the diagnosis.
|
|
241
|
+
|
|
242
|
+
Each diagnosis has a `confidence` score. By default high-confidence fixes are applied automatically; low-confidence fixes drop into an interactive `[a]pply / [s]kip / [m]anual / [q]uit` prompt.
|
|
236
243
|
|
|
237
244
|
```bash
|
|
245
|
+
ccqa generate tasks/create-and-complete # default: interactive on low confidence
|
|
246
|
+
ccqa generate tasks/create-and-complete --auto # CI: always auto-apply
|
|
247
|
+
ccqa generate tasks/create-and-complete --no-interactive # CI: auto-apply on high confidence, give up otherwise
|
|
238
248
|
ccqa generate tasks/create-and-complete --max-retries 5
|
|
239
249
|
```
|
|
240
250
|
|
|
251
|
+
> **Note**: `generate` regenerates `test.spec.ts` from `actions.json` on every run. Manual edits to `test.spec.ts` are lost on the next `generate`. When an existing `test.spec.ts` is detected, `generate` always asks for `y/N` confirmation before overwriting (even with `--auto` / `--no-interactive`). To skip the prompt in CI, pass `--force`. To persist a fix, re-run `trace` so `actions.json` reflects the new flow.
|
|
252
|
+
|
|
241
253
|
## Commands
|
|
242
254
|
|
|
243
255
|
```
|
|
244
256
|
ccqa trace <feature/spec> Record browser actions for a test spec
|
|
245
257
|
ccqa generate <feature/spec> Generate test script from recorded actions
|
|
258
|
+
--auto Apply auto-fixes without confirmation (CI)
|
|
259
|
+
--no-interactive Auto-apply only on high confidence; never prompt
|
|
260
|
+
--force Overwrite an existing test.spec.ts without prompting
|
|
261
|
+
--max-retries <n> Default: 3
|
|
246
262
|
ccqa run [feature/spec] Execute generated test scripts
|
|
247
263
|
|
|
248
264
|
ccqa trace-setup <name> Record browser actions for a setup spec
|
|
249
265
|
ccqa generate-setup <name> Generate and validate setup test script
|
|
250
266
|
--from-dummy Resume from manually edited test.dummy.spec.ts
|
|
267
|
+
--auto / --no-interactive Same semantics as `generate`
|
|
251
268
|
```
|
|
252
269
|
|
|
270
|
+
`<feature/spec>` is a 2-segment alias for the on-disk path `.ccqa/features/<feature>/test-cases/<spec>/`. Pass the alias, not the full directory path.
|
|
271
|
+
|
|
253
272
|
## File structure
|
|
254
273
|
|
|
255
274
|
```
|