playwright-test-agent 1.0.7 → 1.0.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-test-agent",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Initialize Playwright Test agents with a Playwright CLI-first browser workflow.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@ An applicable confirmed plan is sufficient when executable tests are missing; do
17
17
 
18
18
  ## Refresh and parallel isolation
19
19
 
20
- Implement the plan's refresh findings: wait for mutation completion, then use \`page.reload()\` only when the plan records stale or delayed UI, reacquire page state, and assert persistence. Generate parallel-safe tests with independent contexts, unique data, per-test setup/cleanup, and no fixed identifiers or order dependencies. Mark unavoidable shared-resource scenarios serial.
20
+ Implement the plan's refresh findings: wait for mutation completion, then use \`page.reload()\` only when the plan records stale or delayed UI, reacquire page state, and assert persistence. Generate parallel-safe tests with independent contexts, unique data, per-test setup/cleanup, and no fixed identifiers or order dependencies. Tests in the same file may run in parallel only when scenarios are fully independent; create-then-delete workflows must be one test or an explicit serial group. Follow the confirmed plan exactly and verify every planned step, locator, required field, and assertion before writing.
21
21
 
22
22
  ### Navigation and redirect correctness
23
23
 
@@ -33,7 +33,7 @@ const plannerObservationGuidance = `
33
33
 
34
34
  ### Existing plans and reconnaissance
35
35
 
36
- If an applicable saved plan exists but executable tests are missing, do not repeat reconnaissance solely to recreate it; let Generator consume the confirmed plan. Re-run Planner only when the plan is stale, incomplete, or contradictory. During reconnaissance, reach business pages through visible UI clicks whenever a route exists. Verify whether create/edit/delete operations require reload before updated state is visible, record post-refresh evidence, and identify shared mutable resources and parallel/serial constraints. Check every form for required fields, required selections, formats, and validation messages; do not omit mandatory inputs from the plan.
36
+ If an applicable saved plan exists but executable tests are missing, do not repeat reconnaissance solely to recreate it; let Generator consume the confirmed plan. Re-run Planner only when the plan is stale, incomplete, or contradictory. During reconnaissance, reach business pages through visible UI clicks whenever a route exists. Write detailed executable steps naming the exact menu/link/tab/button/input/select/checkbox, its container or relationship when needed, the feedback after each action, and the locator/evidence proving the state. Verify whether create/edit/delete operations require reload before updated state is visible, record post-refresh evidence, and identify shared mutable resources and parallel/serial constraints. Check every form for required fields, required selections, formats, and validation messages; do not omit mandatory inputs from the plan.
37
37
  `;
38
38
  const cliFirstInstructions = (role) => `${ROLE_BLOCK_START}
39
39
 
@@ -49,8 +49,8 @@ ${role === 'planner' ? plannerObservationGuidance : ''}${role === 'healer' ? `
49
49
 
50
50
  ### Navigation during diagnosis
51
51
 
52
- When reproducing a failure, start at the first failing step and its original error. Reproduce one action at a time and inspect a fresh snapshot plus immediate page feedback after each click, type, select, or submit; never jump through a sequence while guessing. At the failure point diagnose in order: resolve the intended locator and verify exactly one visible, enabled match; verify every required input/select/checkbox is located and populated; inspect validation messages, disabled state, dialogs, URL, console, and network evidence; only then classify timeout, navigation, or application behavior. Treat locator-not-found, strict-mode ambiguity, wrong field association, missing required values, and wrong form scope as test defects to fix before increasing timeouts. Trace backward only through the minimum preceding actions needed for context. Prefer the test's visible UI click path for business pages. Use \`goto\` only for the application entry point or an explicitly tested deep link, and do not add a destination \`goto\` after a click that already navigated. If a mutation succeeded but its result was not visible, inspect evidence for stale UI before adding a reload.` : ''}
53
- ${ROLE_BLOCK_END}`;
52
+ When reproducing a failure, simulate the generated test file and inspect whether the test code is wrong. Start at the first failing step and original error; execute one action at a time and inspect a fresh snapshot plus immediate feedback after each click, type, select, or submit. At the failure point diagnose in order: locator resolves to exactly one visible, enabled element; correct field/form association; every required input/select/checkbox is populated; validation messages and disabled state; dialogs, URL, console, and network evidence; only then timeout, navigation, or application behavior. Treat locator-not-found, strict-mode ambiguity, wrong field association, missing required values, and wrong form scope as test defects to fix before increasing timeouts. Trace backward only the minimum context needed, and never guess or skip ahead.` : ''}
53
+ ${ROLE_BLOCK_END}`;
54
54
 
55
55
  export { cliFirstInstructions };
56
56
  const CODEX_INSTRUCTIONS = `${BLOCK_START}