form-tester 0.3.2 → 0.3.3
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: form-tester
|
|
3
3
|
description: Runs the form-tester CLI to test /skjemautfyller forms via Playwright CLI and exposes playwright-cli commands.
|
|
4
|
-
allowed-tools: Bash(powershell:*), Bash(playwright-cli:*)
|
|
4
|
+
allowed-tools: Bash(powershell:*), Bash(playwright-cli:*), Bash(npx form-tester:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Form Tester CLI
|
package/form-tester.js
CHANGED
|
@@ -6,7 +6,7 @@ const { spawn, execSync } = require("child_process");
|
|
|
6
6
|
|
|
7
7
|
const CONFIG_PATH = path.join(__dirname, "form-tester.config.json");
|
|
8
8
|
const OUTPUT_BASE = path.resolve(__dirname, "output");
|
|
9
|
-
const LOCAL_VERSION = "0.3.
|
|
9
|
+
const LOCAL_VERSION = "0.3.3";
|
|
10
10
|
const RECOMMENDED_PERSON = "Uromantisk Direktør";
|
|
11
11
|
|
|
12
12
|
const PERSONAS = [
|
|
@@ -979,6 +979,26 @@ function install(targetDir) {
|
|
|
979
979
|
console.log(" Installed form-tester.config.example.json");
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
+
// Install playwright-cli globally if not already available
|
|
983
|
+
if (isPlaywrightCliAvailable()) {
|
|
984
|
+
console.log(" playwright-cli already in PATH");
|
|
985
|
+
} else {
|
|
986
|
+
console.log(" Installing playwright-cli globally...");
|
|
987
|
+
try {
|
|
988
|
+
execSync("npm install -g @playwright/cli@latest", {
|
|
989
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
990
|
+
});
|
|
991
|
+
console.log(" Installed playwright-cli globally");
|
|
992
|
+
} catch (err) {
|
|
993
|
+
console.log(
|
|
994
|
+
" WARNING: Failed to install playwright-cli globally.",
|
|
995
|
+
);
|
|
996
|
+
console.log(
|
|
997
|
+
" Run manually: npm install -g @playwright/cli@latest",
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
982
1002
|
console.log("\nDone! Next steps:");
|
|
983
1003
|
console.log(" 1. cp form-tester.config.example.json form-tester.config.json");
|
|
984
1004
|
console.log(' 2. Edit form-tester.config.json and set your "pnr"');
|
package/package.json
CHANGED