@assertrx/dino 1.0.9 → 1.0.10
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/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate exhaustive Gherkin BDD scenarios for a single page using the bdd-gherkin skill
|
|
3
|
-
argument-hint: "<URL> [output-dir] [auth-env-file]"
|
|
3
|
+
argument-hint: "<URL> [output-dir] [auth-env-file] [tester-roles]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Selected tester roles (may be empty): ${4:-}
|
|
7
|
+
|
|
6
8
|
Use the `bdd-gherkin` skill and `playwright-cli` commands to inspect the page at $1 and generate exhaustive Gherkin BDD scenarios for **that page only**. Fall back to the Playwright MCP bridge (`browser_*` tools) only if `playwright-cli` is unavailable or fails.
|
|
7
9
|
|
|
8
10
|
## Preferred tooling
|
|
@@ -43,6 +45,8 @@ Use the `bdd-gherkin` skill and `playwright-cli` commands to inspect the page at
|
|
|
43
45
|
- **UI / interaction cases** — toggles, show/hide password, dropdown dependencies, disabled fields, cancel/reset actions.
|
|
44
46
|
- **Accessibility / usability cases** — keyboard focus, visible labels, error announcement (if inferable from the page).
|
|
45
47
|
|
|
48
|
+
Additionally, if the "Selected tester roles" value at the top of this prompt is **not empty**, adopt the perspective of each listed tester role (e.g. accessibility tester, security tester, performance tester, functional tester) and generate additional scenarios that role would write for this page. Examples: an accessibility tester produces scenarios for screen-reader labels, focus order, and color-contrast issues; a security tester produces scenarios for injection attempts, unauthorized access, and data exposure; a performance tester produces scenarios for large payloads and slow-network handling. Keep these role-specific scenarios business-readable and in the same Gherkin style as the rest — tag them with a role tag such as `@accessibility`, `@security`, or `@performance`. If no tester roles are listed, skip this and produce only the default coverage above.
|
|
49
|
+
|
|
46
50
|
5. **Follow Gherkin best practices**.
|
|
47
51
|
- Use a single-focused Scenario for each behavior.
|
|
48
52
|
- Use **exactly one `When` action per scenario**; move setup details into `Given` or `Background`.
|
package/scripts/api-server.mjs
CHANGED
|
@@ -58,6 +58,7 @@ const PROMPT_REGISTRY = {
|
|
|
58
58
|
{ name: "url", required: true, description: "Target website URL" },
|
|
59
59
|
{ name: "outputDir", required: false, description: "Output directory (default: tests/features/)" },
|
|
60
60
|
{ name: "authEnvFile", required: false, description: "Auth env file for login credentials" },
|
|
61
|
+
{ name: "testerRoles", required: false, description: "Comma-separated tester roles (e.g. accessibility, security) whose perspectives to include when generating scenarios" },
|
|
61
62
|
],
|
|
62
63
|
description: "Generate Gherkin BDD scenarios for a page by inspecting it with playwright-cli",
|
|
63
64
|
},
|
|
@@ -108,8 +109,14 @@ async function loadPrompt(name, params = {}) {
|
|
|
108
109
|
|
|
109
110
|
let content = await readFile(filePath, "utf-8");
|
|
110
111
|
|
|
111
|
-
// Build positional arg array from ordered entry.params
|
|
112
|
-
|
|
112
|
+
// Build positional arg array from ordered entry.params. Array values
|
|
113
|
+
// (e.g. testerRoles sent as a list from the desktop app) are joined into
|
|
114
|
+
// a comma-separated string so the prompt template can substitute them.
|
|
115
|
+
const positional = entry.params.map((p) => {
|
|
116
|
+
const v = params[p.name];
|
|
117
|
+
if (Array.isArray(v)) return v.filter(Boolean).join(", ");
|
|
118
|
+
return v ?? "";
|
|
119
|
+
});
|
|
113
120
|
// Substitute $1, $2, $3, $4, ${1:-default}, ${2:-default}, etc.
|
|
114
121
|
content = content.replace(
|
|
115
122
|
/\$\{?(\d+)(?:\s*:-\s*([^}]*))?\}?/g,
|