Skip to content

Commit 77788d9

Browse files
author
DavidQ
committed
Add Palette Manager V2 Playwright baseline coverage - PR_26124_073-palette-manager-playwright-baseline
1 parent 07127c4 commit 77788d9

9 files changed

Lines changed: 829 additions & 132 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
# Codex Commands - PR_26124_072-palette-manager-rollback-shared-removal
1+
# Codex Commands - PR_26124_073-palette-manager-playwright-baseline
22

33
```bash
4-
npx @openai/codex run --model gpt-5.5 --reasoning high "Run full workflow for PR_26124_072-palette-manager-rollback-shared-removal. Follow PROJECT_INSTRUCTIONS.md exactly."
4+
npx @openai/codex run --model gpt-5.5 --reasoning high "Run full workflow for PR_26124_073-palette-manager-playwright-baseline. Follow PROJECT_INSTRUCTIONS.md exactly."
55
```
66

77
## Validation Commands
88

99
```bash
10-
git status --short
11-
git diff -- tools/palette-manager-v2
12-
node --check tools/palette-manager-v2/paletteManagerShell.js
13-
node --check tools/palette-manager-v2/main.js
10+
node --check tests/tools/PaletteManagerV2Baseline.test.mjs
11+
node tests/tools/PaletteManagerV2Baseline.test.mjs
1412
git diff --check
1513
npm run test:workspace-v2
1614
npm run codex:review-artifacts
1715
```
1816

1917
## Playwright
2018

21-
No Palette Manager behavior change is expected. The default requested gate is `npm run test:workspace-v2`.
19+
The targeted Palette Manager V2 Playwright baseline validates page load, console/runtime cleanliness, menuSample actions, accordion toggles, Validation/Error Viewer Clear placement, source pin scroll preservation, and Tag sort untagged-last behavior.
2220

2321
`npm run test:workspace-v2` failed because `package.json` does not define the `test:workspace-v2` script.
2422

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Rollback uncommitted Palette Manager shared-removal attempt - PR_26124_072-palette-manager-rollback-shared-removal
1+
Add Palette Manager V2 Playwright baseline coverage - PR_26124_073-palette-manager-playwright-baseline
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PR_26124_073 Palette Manager Playwright Baseline
2+
3+
## Summary
4+
Added targeted Playwright coverage for Palette Manager V2 baseline behavior.
5+
6+
## Files Changed
7+
- `tests/tools/PaletteManagerV2Baseline.test.mjs`
8+
- `docs/pr/PR_26124_073-palette-manager-playwright-baseline/PLAN_PR.md`
9+
- `docs/pr/PR_26124_073-palette-manager-playwright-baseline/BUILD_PR.md`
10+
- `docs/pr/PR_26124_073-palette-manager-playwright-baseline/APPLY_PR.md`
11+
- `docs/dev/codex_commands.md`
12+
- `docs/dev/commit_comment.txt`
13+
- `docs/dev/reports/codex_review.diff`
14+
- `docs/dev/reports/codex_changed_files.txt`
15+
16+
## Runtime Impact
17+
- No Palette Manager runtime files changed.
18+
- No CSS layout or pin styling changed.
19+
- No `tools/shared`, workspace/toolState/session, or sample JSON files changed.
20+
21+
## Test Coverage Added
22+
- Page load with page error, console error, and failed request guards.
23+
- `menuSample` and JSON action button actionability.
24+
- Required accordionV2 sections collapse/reopen.
25+
- Validation/Error Viewer Clear button placement inside viewer header.
26+
- Source palette individual pin scroll preservation.
27+
- User Palette Tag sort keeps untagged swatches last for ascending and descending sort.
28+
29+
## Validation
30+
- PASS: `node --check tests/tools/PaletteManagerV2Baseline.test.mjs`
31+
- PASS: `node tests/tools/PaletteManagerV2Baseline.test.mjs`
32+
- PASS: `git diff --check`
33+
- FAIL: `npm run test:workspace-v2` is unavailable because `package.json` does not define a `test:workspace-v2` script.
34+
- SKIPPED: full samples smoke test, by instruction.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# git status --short
22
M docs/dev/codex_commands.md
33
M docs/dev/commit_comment.txt
4-
A docs/dev/reports/PR_26124_072_rollback_report.md
5-
A docs/pr/PR_26124_072-palette-manager-rollback-shared-removal/APPLY_PR.md
6-
A docs/pr/PR_26124_072-palette-manager-rollback-shared-removal/BUILD_PR.md
7-
A docs/pr/PR_26124_072-palette-manager-rollback-shared-removal/PLAN_PR.md
4+
A docs/dev/reports/PR_26124_073_report.md
5+
A docs/pr/PR_26124_073-palette-manager-playwright-baseline/APPLY_PR.md
6+
A docs/pr/PR_26124_073-palette-manager-playwright-baseline/BUILD_PR.md
7+
A docs/pr/PR_26124_073-palette-manager-playwright-baseline/PLAN_PR.md
8+
A tests/tools/PaletteManagerV2Baseline.test.mjs
89

910
# git diff --stat
1011
(no output)

docs/dev/reports/codex_review.diff

Lines changed: 402 additions & 120 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# APPLY_PR - PR_26124_073-palette-manager-playwright-baseline
2+
3+
## Summary
4+
Added a targeted Node-run Playwright baseline test for Palette Manager V2.
5+
6+
## Applied Changes
7+
- Added `tests/tools/PaletteManagerV2Baseline.test.mjs`.
8+
- The test uses the existing repo static server helper and drives the live Palette Manager V2 page.
9+
- No Palette Manager runtime, CSS, workspace/toolState/session, sample JSON, or `tools/shared` files were changed.
10+
11+
## Coverage
12+
- Tool loads without page/runtime/console errors.
13+
- `menuSample` exists.
14+
- Import JSON, Copy JSON, and Export JSON buttons are visible, enabled, and actionable.
15+
- User Palette, Sample Palette Swatch, Tags, Selected Swatch, User Defined Swatch, Palette JSON, and Validation/Error Viewer accordions collapse and reopen.
16+
- Validation/Error Viewer Clear button exists inside its viewer header.
17+
- Individual source palette pinning preserves source grid scroll position.
18+
- User Palette Tag sort keeps untagged swatches after tagged swatches for ascending and descending sort.
19+
20+
## Validation
21+
- PASS: `node --check tests/tools/PaletteManagerV2Baseline.test.mjs`
22+
- PASS: `node tests/tools/PaletteManagerV2Baseline.test.mjs`
23+
- PASS: `git diff --check`
24+
- FAIL: `npm run test:workspace-v2` is unavailable because `package.json` does not define a `test:workspace-v2` script.
25+
- SKIPPED: full samples smoke test, by instruction.
26+
27+
## Manual Test
28+
1. Open `tools/palette-manager-v2/index.html`.
29+
2. Confirm the tool loads without visible errors.
30+
3. Confirm Import JSON, Copy JSON, and Export JSON remain centered in `menuSample`.
31+
4. Collapse and reopen each Palette Manager accordion.
32+
5. Scroll Sample Palette Swatch and pin an individual source swatch; confirm scroll position stays stable.
33+
6. Add tagged and untagged user swatches, sort by Tag ascending and descending, and confirm untagged swatches remain last.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# BUILD_PR - PR_26124_073-palette-manager-playwright-baseline
2+
3+
## Purpose
4+
Add one targeted Palette Manager V2 Playwright baseline test that protects current working behavior without runtime changes.
5+
6+
## Scope
7+
- `tests/tools/PaletteManagerV2Baseline.test.mjs`
8+
- Required PR workflow docs and review artifacts.
9+
10+
## Implementation
11+
1. Add a Node-run Playwright test under `tests/tools`.
12+
2. Use the existing repo static server helper.
13+
3. Load `tools/palette-manager-v2/index.html`.
14+
4. Assert no page errors or console errors occur during the baseline interactions.
15+
5. Assert `menuSample` and JSON action buttons exist and are actionable.
16+
6. Toggle each requested accordion closed and open using existing `accordion-v2` headers.
17+
7. Assert Validation/Error Viewer Clear is inside the viewer header.
18+
8. Select a scrollable source palette, scroll the source swatch grid, click an individual tile pin, and assert scrollTop is preserved after render.
19+
9. Create test user swatches through the UI, add tags through the Tags control, and verify Tag ascending/descending sorts keep untagged swatches last.
20+
21+
## Boundaries
22+
- Do not change Palette Manager V2 runtime behavior unless a tiny selector hook is required.
23+
- Do not touch workspace/toolState/session behavior.
24+
- Do not touch sample JSON.
25+
- Do not modify `tools/shared`.
26+
- Do not change CSS layout or pin styling.
27+
- Do not add dependencies.
28+
- Do not run the full samples smoke test.
29+
30+
## Validation
31+
- Run `node --check tests/tools/PaletteManagerV2Baseline.test.mjs`.
32+
- Run `node tests/tools/PaletteManagerV2Baseline.test.mjs`.
33+
- Run `npm run test:workspace-v2`.
34+
- Run `git diff --check`.
35+
- Skip the full samples smoke test.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# PLAN_PR - PR_26124_073-palette-manager-playwright-baseline
2+
3+
## Goal
4+
Add targeted Playwright baseline coverage for Palette Manager V2 without changing runtime behavior.
5+
6+
## Scope
7+
- `tests/tools/PaletteManagerV2Baseline.test.mjs`
8+
- Required PR workflow docs and review artifacts.
9+
10+
## Boundaries
11+
- Update Palette Manager V2 tests only.
12+
- Do not touch workspace/toolState/session behavior.
13+
- Do not touch sample JSON.
14+
- Do not modify `tools/shared`.
15+
- Do not change CSS layout or pin styling.
16+
- Do not add dependencies.
17+
- Do not run the full samples smoke test.
18+
19+
## Test Plan
20+
The new targeted Playwright test will verify:
21+
- Palette Manager V2 loads without page/runtime/console errors.
22+
- `menuSample` exists.
23+
- Import JSON, Copy JSON, and Export JSON buttons exist, are visible, enabled, and actionable.
24+
- User Palette accordion opens and collapses.
25+
- Sample Palette Swatch accordion opens and collapses.
26+
- Tags accordion opens and collapses.
27+
- Selected Swatch accordion opens and collapses.
28+
- User Defined Swatch accordion opens and collapses.
29+
- Palette JSON accordion opens and collapses.
30+
- Validation/Error Viewer accordion opens and collapses.
31+
- Validation/Error Viewer Clear button exists inside its viewer header.
32+
- Individual source palette pinning preserves source grid scroll position.
33+
- User Palette Tag sort keeps untagged swatches last for ascending and descending with test-created swatches.
34+
35+
## Playwright
36+
- Targeted command: `node tests/tools/PaletteManagerV2Baseline.test.mjs`
37+
- Expected pass behavior: the tool page loads, baseline controls are actionable, accordionV2 toggles work, source pin scroll is preserved, and tag sort keeps untagged swatches last in both directions.
38+
- Expected fail behavior: the test fails with a specific assertion for missing controls, runtime errors, broken accordion state, scroll reset, or tag sort regression.
39+
- Default gate: `npm run test:workspace-v2`
40+
41+
## Manual Validation
42+
1. Open `tools/palette-manager-v2/index.html`.
43+
2. Confirm the Palette Manager V2 page loads without visible errors.
44+
3. Confirm Import JSON, Copy JSON, and Export JSON are centered in `menuSample`.
45+
4. Collapse and reopen each Palette Manager accordion.
46+
5. Scroll the Sample Palette Swatch grid and pin an individual source swatch; confirm the grid stays at the same scroll position.
47+
6. Add user swatches with and without tags, sort by Tag ascending and descending, and confirm untagged swatches stay after tagged swatches.

0 commit comments

Comments
 (0)