diff --git a/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/phase-1.md b/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/phase-1.md new file mode 100644 index 000000000..43060699d --- /dev/null +++ b/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/phase-1.md @@ -0,0 +1,35 @@ +--- +status: done +--- + +# Instruction: Clarify browser session lifecycle + +## Architecture projection + +> Tree of the final files. ✅ create · ✏️ modify · ❌ delete + +```txt +plugins/aidd-qa/skills/01-acceptance-qa/references/interface-browser-playwright-cli.md ✏️ +``` + +## Test Scope + +| Scenario | Action | Observable outcome | Actor | +| --- | --- | --- | --- | +| Setup | Read the Playwright CLI reference | Existing per-scenario session and teardown guidance is present | system | +| Happy path | Review scenario guidance | It says to reuse one tab or tab group throughout the scenario and close its session after teardown | system | +| Edge case | A scenario contains multiple steps | Each step uses the existing tab or tab group rather than opening another | system | + +## Tasks to do + +### `1)` Add browser tab reuse guidance + +> Keep each QA scenario in the same tab or tab group and close it when done. + +1. Add a concise instruction to reuse the same tab or tab group for every step in a scenario, then close the session after teardown and verification. + +## Test acceptance criteria + +| Task | Acceptance criteria | +| --- | --- | +| 1 | The active QA reference explicitly requires tab reuse within a scenario and session closure after teardown. | diff --git a/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/plan.md b/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/plan.md new file mode 100644 index 000000000..ad8f34373 --- /dev/null +++ b/aidd_docs/tasks/2026_10/2026_10_25_reuse-browser-tabs/plan.md @@ -0,0 +1,33 @@ +--- +objective: "The browser QA instructions require reusing one tab or tab group for each scenario and closing its session when finished." +status: implemented +--- + +# Plan: Reuse browser tabs in QA + +Source: User request (2026-10-25) + +## Phases + +| # | Phase | File | Depends on | +| --- | --- | --- | --- | +| 1 | Clarify browser session lifecycle | [`phase-1.md`](./phase-1.md) | none | + +## External sources + +| URL | What it settled | +| --- | --- | +| none | none | + +## Impact + +| Category | Verdict and evidence | Handled in | +| --- | --- | --- | +| regression | Low: one instruction added to the Playwright QA reference; no runtime code changes. | phase-1 | +| documentation | The active browser QA instructions already require one session per scenario and closing it, but do not explicitly require reusing its tab across steps. | phase-1 | + +## Rules + +| Rule | Why it applies | +| --- | --- | +| `docs/ARCHITECTURE.md`: capabilities belong to the owning concern | The browser QA interface reference belongs to the `aidd-qa` plugin. | diff --git a/plugins/aidd-qa/skills/01-acceptance-qa/references/interface-browser-playwright-cli.md b/plugins/aidd-qa/skills/01-acceptance-qa/references/interface-browser-playwright-cli.md index 0f4535309..5ede35abe 100644 --- a/plugins/aidd-qa/skills/01-acceptance-qa/references/interface-browser-playwright-cli.md +++ b/plugins/aidd-qa/skills/01-acceptance-qa/references/interface-browser-playwright-cli.md @@ -11,6 +11,7 @@ npx --yes @playwright/cli@0.1.17 -s=qa- ``` Run every command from a temporary directory outside the application repository. +Within each scenario, reuse the same browser tab or tab group for every step; after teardown and verification, close the session. `run-code` takes one `page` argument: pass `async page => { ... }`, never bare statements. Never throw on a product mismatch: check each expected outcome with a bounded `waitFor`, and return `{ step, expected, actual, ok }` per step. Keep stdout, stderr, and exit status visible; no redirects, pipes, command substitutions, or `|| true` in runner commands. A throw, `SyntaxError`, or non-zero exit is a tooling failure and invalidates the take.