@zhiweiliu/playwright-generator 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +20 -0
  2. package/package.json +1 -5
package/README.md CHANGED
@@ -110,6 +110,8 @@ The installed module will have amazing features to facilitate your day-to-day te
110
110
  project-root/
111
111
  ├── tests/ # Natural language test cases
112
112
  │ └── *.test.md
113
+ ├── samples/ # Sample test cases for reference
114
+ │ └── *.test.md
113
115
  ├── generated/ # Generated Playwright test code
114
116
  │ └── generated.test.ts
115
117
  ├── page-objects/ # Page Object Models (optional)
@@ -168,6 +170,24 @@ And clicks the login button
168
170
  Then the user should be redirected to the dashboard
169
171
  ```
170
172
 
173
+ ### Sample Test Cases
174
+
175
+ For reference and testing purposes, sample test cases are provided in the `samples/` folder:
176
+
177
+ - `samples/saucedemo-samples.test.md`: Comprehensive test cases for the SauceDemo e-commerce website (https://saucedemo.com), including complete purchase flow and product browsing scenarios with detailed step-by-step descriptions.
178
+
179
+ You can use these samples to:
180
+
181
+ 1. Test the generator with real-world e-commerce scenarios
182
+ 2. Understand the level of detail needed in natural language descriptions
183
+ 3. Generate Playwright code for immediate use and validation
184
+
185
+ To generate code from a sample test case:
186
+
187
+ ```bash
188
+ npx playwright-generator generate --tc TC-SAMPLE-0001
189
+ ```
190
+
171
191
  ### Generation
172
192
 
173
193
  Playwright test automation code is generated by running a command, with generated code placed in the `generated/` folder under the project root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhiweiliu/playwright-generator",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Generate Playwright test cases from natural language using LLM",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -13,7 +13,6 @@
13
13
  "scripts": {
14
14
  "build": "tsc",
15
15
  "dev": "ts-node src/cli.ts",
16
- "test": "jest",
17
16
  "start": "node dist/cli.js",
18
17
  "prepublishOnly": "npm run build"
19
18
  },
@@ -50,10 +49,7 @@
50
49
  "devDependencies": {
51
50
  "@types/fs-extra": "^11.0.4",
52
51
  "@types/glob": "^8.1.0",
53
- "@types/jest": "^29.5.8",
54
52
  "@types/node": "^20.9.0",
55
- "jest": "^29.7.0",
56
- "ts-jest": "^29.1.1",
57
53
  "ts-node": "^10.9.1",
58
54
  "typescript": "^5.2.2"
59
55
  },