form-tester 0.2.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.
- package/.claude/skills/playwright-cli/SKILL.md +278 -0
- package/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/.claude/skills/playwright-cli/references/running-code.md +232 -0
- package/.claude/skills/playwright-cli/references/session-management.md +169 -0
- package/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/.claude/skills/playwright-cli/references/test-generation.md +88 -0
- package/.claude/skills/playwright-cli/references/tracing.md +139 -0
- package/.claude/skills/playwright-cli/references/video-recording.md +43 -0
- package/README.md +75 -0
- package/form-tester.config.example.json +3 -0
- package/form-tester.js +984 -0
- package/package.json +26 -0
- package/tests/form-tester.test.js +120 -0
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Form Tester
|
|
2
|
+
|
|
3
|
+
AI-powered testing skill for `/skjemautfyller` forms using [Playwright CLI](https://www.npmjs.com/package/@playwright/cli). Works with **Claude Code** and **GitHub Copilot**.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node.js 18+
|
|
8
|
+
- [Playwright CLI](https://www.npmjs.com/package/@playwright/cli)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### 1. Clone the repo
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/YOUR_ORG/form-tester.git
|
|
16
|
+
cd form-tester
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### 2. Install Playwright CLI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run setup
|
|
23
|
+
# or manually:
|
|
24
|
+
npm install -g @playwright/cli@latest
|
|
25
|
+
playwright-cli install --skills
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 3. Configure
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cp form-tester.config.example.json form-tester.config.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Edit `form-tester.config.json` and set your `pnr`.
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
### Claude Code
|
|
39
|
+
|
|
40
|
+
The skill is automatically detected when you open this directory in Claude Code. Use the `/form-tester` skill or run:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
node form-tester.js
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### GitHub Copilot
|
|
47
|
+
|
|
48
|
+
Copilot reads instructions from `.github/copilot-instructions.md` automatically. Open this directory in VS Code with Copilot enabled — it will have context on the form-tester commands and workflow.
|
|
49
|
+
|
|
50
|
+
### Standalone CLI
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
node form-tester.js
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Commands: `/setup`, `/update`, `/version`, `/people`, `/test {url}`, `/save {label}`, `/clear`, `/quit`
|
|
57
|
+
|
|
58
|
+
Use `--help` for the full command list.
|
|
59
|
+
|
|
60
|
+
## Test Output
|
|
61
|
+
|
|
62
|
+
Test runs are saved to `output/{form-id}/{timestamp}/` with:
|
|
63
|
+
- Snapshots (YAML)
|
|
64
|
+
- Screenshots (PNG, full-page)
|
|
65
|
+
- `test_results.txt`
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm test
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|