form-tester 0.8.0 → 0.8.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/form-tester.js +29 -9
- package/package.json +1 -1
package/form-tester.js
CHANGED
|
@@ -6,7 +6,7 @@ const { spawn, execSync } = require("child_process");
|
|
|
6
6
|
|
|
7
7
|
const CONFIG_PATH = path.join(process.cwd(), "form-tester.config.json");
|
|
8
8
|
const OUTPUT_BASE = path.resolve(process.cwd(), "output");
|
|
9
|
-
const LOCAL_VERSION = "0.8.
|
|
9
|
+
const LOCAL_VERSION = "0.8.1";
|
|
10
10
|
const RECOMMENDED_PERSON = "Uromantisk Direktør";
|
|
11
11
|
|
|
12
12
|
// Recording — persisted to disk so `form-tester exec` can append across processes
|
|
@@ -466,18 +466,26 @@ function clearConsole() {
|
|
|
466
466
|
function printHelp() {
|
|
467
467
|
console.log(
|
|
468
468
|
[
|
|
469
|
-
"
|
|
470
|
-
"
|
|
471
|
-
"
|
|
472
|
-
"
|
|
469
|
+
"",
|
|
470
|
+
"Subcommands (run directly):",
|
|
471
|
+
" form-tester install [--global] Install skill files into project or ~/.claude/skills/",
|
|
472
|
+
" form-tester test <url> --auto Non-interactive test (for AI agents)",
|
|
473
|
+
" form-tester test <url> --human Interactive test with prompts",
|
|
474
|
+
" form-tester exec <command> [args] Run playwright-cli command (recorded)",
|
|
475
|
+
" form-tester replay <recording.json> Replay a recorded test run",
|
|
476
|
+
"",
|
|
477
|
+
"Interactive commands:",
|
|
478
|
+
" /test {url} Open form URL and start test",
|
|
479
|
+
" /save {label} Save snapshot + screenshot to output folder",
|
|
473
480
|
" /people Scan visible person list and prompt selection",
|
|
474
481
|
" /persona List available personas",
|
|
475
|
-
" /
|
|
476
|
-
" /
|
|
482
|
+
" /recording Show active recording status",
|
|
483
|
+
" /setup Install Playwright CLI + skills if missing",
|
|
484
|
+
" /update Update Playwright CLI and skills",
|
|
485
|
+
" /version Show version",
|
|
477
486
|
" /clear Clear the console",
|
|
478
487
|
" /help Show this help",
|
|
479
|
-
" /
|
|
480
|
-
" /quit Exit the app",
|
|
488
|
+
" /quit Exit",
|
|
481
489
|
].join("\n"),
|
|
482
490
|
);
|
|
483
491
|
}
|
|
@@ -1137,6 +1145,18 @@ async function handleCommand(line, config) {
|
|
|
1137
1145
|
await saveArtifacts(config, label);
|
|
1138
1146
|
break;
|
|
1139
1147
|
}
|
|
1148
|
+
case "/recording": {
|
|
1149
|
+
const rec = config.activeRecording;
|
|
1150
|
+
if (rec && fs.existsSync(rec)) {
|
|
1151
|
+
const data = JSON.parse(fs.readFileSync(rec, "utf8"));
|
|
1152
|
+
console.log(`Active recording: ${rec}`);
|
|
1153
|
+
console.log(`Commands recorded: ${data.commandCount}`);
|
|
1154
|
+
console.log(`Started: ${data.startedAt}`);
|
|
1155
|
+
} else {
|
|
1156
|
+
console.log("No active recording. Start a test with /test to begin recording.");
|
|
1157
|
+
}
|
|
1158
|
+
break;
|
|
1159
|
+
}
|
|
1140
1160
|
case "/clear":
|
|
1141
1161
|
case "/cls":
|
|
1142
1162
|
clearConsole();
|
package/package.json
CHANGED