screenwright 0.1.9 → 0.1.11
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/dist/bin/screenwright.js +2 -0
- package/dist/bin/screenwright.js.map +1 -1
- package/dist/src/commands/compose.d.ts.map +1 -1
- package/dist/src/commands/compose.js +7 -0
- package/dist/src/commands/compose.js.map +1 -1
- package/dist/src/commands/config.d.ts +3 -0
- package/dist/src/commands/config.d.ts.map +1 -0
- package/dist/src/commands/config.js +97 -0
- package/dist/src/commands/config.js.map +1 -0
- package/dist/src/config/config-schema.d.ts +7 -4
- package/dist/src/config/config-schema.d.ts.map +1 -1
- package/dist/src/config/config-schema.js +3 -2
- package/dist/src/config/config-schema.js.map +1 -1
- package/dist/src/config/defaults.d.ts.map +1 -1
- package/dist/src/config/defaults.js +1 -0
- package/dist/src/config/defaults.js.map +1 -1
- package/dist/src/config/load-config.d.ts.map +1 -1
- package/dist/src/config/load-config.js +11 -0
- package/dist/src/config/load-config.js.map +1 -1
- package/dist/src/generator/prompts.d.ts +1 -1
- package/dist/src/generator/prompts.d.ts.map +1 -1
- package/dist/src/generator/prompts.js +1 -6
- package/dist/src/generator/prompts.js.map +1 -1
- package/dist/src/generator/scenario-generator.d.ts.map +1 -1
- package/dist/src/generator/scenario-generator.js +0 -4
- package/dist/src/generator/scenario-generator.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/runtime/action-helpers.d.ts +9 -2
- package/dist/src/runtime/action-helpers.d.ts.map +1 -1
- package/dist/src/runtime/action-helpers.js +58 -31
- package/dist/src/runtime/action-helpers.js.map +1 -1
- package/dist/src/runtime/instrumented-page.d.ts +2 -1
- package/dist/src/runtime/instrumented-page.d.ts.map +1 -1
- package/dist/src/runtime/instrumented-page.js +6 -2
- package/dist/src/runtime/instrumented-page.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +3 -13
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: screenwright
|
|
3
3
|
description: Turn Playwright E2E tests into polished product demo videos
|
|
4
4
|
user_invocable: true
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.10
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Screenwright
|
|
@@ -79,7 +79,7 @@ The scenario must:
|
|
|
79
79
|
- Organize into 2-5 scenes
|
|
80
80
|
- Replace test/faker data with human-friendly values
|
|
81
81
|
- Add narration to key actions
|
|
82
|
-
-
|
|
82
|
+
- Use `sw.wait()` sparingly at scene transitions (automatic pacing is built-in)
|
|
83
83
|
- NOT include any assertions
|
|
84
84
|
- NOT use `page.*` methods directly — always use `sw.*` helpers
|
|
85
85
|
- NOT import expect, assert, or any test library
|
|
@@ -101,11 +101,9 @@ export default async function scenario(sw: ScreenwrightHelpers) {
|
|
|
101
101
|
await sw.click('[data-testid="login-btn"]', {
|
|
102
102
|
narration: 'Click sign in.',
|
|
103
103
|
});
|
|
104
|
-
await sw.wait(2000);
|
|
105
104
|
|
|
106
105
|
await sw.scene('Viewing the Dashboard');
|
|
107
106
|
await sw.narrate('The dashboard shows our key metrics at a glance.');
|
|
108
|
-
await sw.wait(3000);
|
|
109
107
|
}
|
|
110
108
|
```
|
|
111
109
|
|
|
@@ -119,27 +117,21 @@ export default async function scenario(sw: ScreenwrightHelpers) {
|
|
|
119
117
|
await sw.navigate('http://localhost:3000/apply', {
|
|
120
118
|
narration: 'We begin on the application form.',
|
|
121
119
|
});
|
|
122
|
-
await sw.wait(1500);
|
|
123
120
|
|
|
124
121
|
await sw.scene('Personal Information');
|
|
125
122
|
await sw.fill('[data-testid="first-name"]', 'Jordan', {
|
|
126
123
|
narration: "Let's fill in our personal details.",
|
|
127
124
|
});
|
|
128
|
-
await sw.wait(500);
|
|
129
125
|
await sw.fill('[data-testid="last-name"]', 'Rivera');
|
|
130
|
-
await sw.wait(500);
|
|
131
126
|
await sw.fill('[data-testid="email"]', 'jordan.rivera@acme.co', {
|
|
132
127
|
narration: 'Add our work email.',
|
|
133
128
|
});
|
|
134
|
-
await sw.wait(1000);
|
|
135
129
|
|
|
136
130
|
await sw.hover('[data-testid="role-select"]', {
|
|
137
131
|
narration: 'Now we select a role from the dropdown.',
|
|
138
132
|
});
|
|
139
133
|
await sw.click('[data-testid="role-select"]');
|
|
140
|
-
await sw.wait(800);
|
|
141
134
|
await sw.click('[data-testid="role-engineering"]');
|
|
142
|
-
await sw.wait(1000);
|
|
143
135
|
|
|
144
136
|
await sw.scene('Review and Submit');
|
|
145
137
|
await sw.narrate('Everything looks good. Time to submit.');
|
|
@@ -148,7 +140,6 @@ export default async function scenario(sw: ScreenwrightHelpers) {
|
|
|
148
140
|
await sw.click('[data-testid="submit-btn"]', {
|
|
149
141
|
narration: 'Submit the application.',
|
|
150
142
|
});
|
|
151
|
-
await sw.wait(2000);
|
|
152
143
|
await sw.narrate('The application has been submitted successfully.');
|
|
153
144
|
}
|
|
154
145
|
```
|
|
@@ -162,8 +153,7 @@ After generating the scenario, validate it against these rules before presenting
|
|
|
162
153
|
3. **Must NOT** use raw `page.*()` calls — only `sw.*` helpers
|
|
163
154
|
4. **Must NOT** import or call `expect()` or `assert()`
|
|
164
155
|
5. **Should have** at least one `sw.scene()` call
|
|
165
|
-
6. **Should have**
|
|
166
|
-
7. **Should have** narration on key actions
|
|
156
|
+
6. **Should have** narration on key actions
|
|
167
157
|
|
|
168
158
|
If validation fails, regenerate and include the specific error messages so you can fix exactly what went wrong. Maximum 3 generation attempts before asking the user for guidance.
|
|
169
159
|
|