Skip to content

Commit 340c2da

Browse files
author
DavidQ
committed
Ensure Preview Generator V2 Playwright coverage and fix final test hooks - PR_26126_040-preview-generator-v2-playwright-and-final-fixes
1 parent a3783ab commit 340c2da

5 files changed

Lines changed: 111 additions & 110 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tests/results/
1919
tmp/
2020

2121
# Codex files
22-
codex_review.diff
2322
codex_changed_files.txt
2423
docs/dev/reports/codex_changed_files.txt
24+
codex_review.diff
2525
docs/dev/reports/codex_review.diff
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# git status --short
2-
M docs/dev/reports/preview_generator_v2_playwright_result.txt
3-
?? docs/dev/reports/preview_generator_v2_final_review.txt
2+
M package.json
3+
?? docs/dev/reports/preview_generator_v2_playwright_coverage.txt
44

5-
# PR_26126_039 diff stat excluding generated review artifact files
6-
docs/dev/reports/preview_generator_v2_playwright_result.txt | 8 ++++----
7-
1 file changed, 4 insertions(+), 4 deletions(-)
8-
# New file diff stat: docs/dev/reports/preview_generator_v2_final_review.txt
9-
.../reports/preview_generator_v2_final_review.txt | 70 ++++++++++++++++++++++
10-
1 file changed, 70 insertions(+)
5+
# PR_26126_040 diff stat excluding generated review artifact files
6+
package.json | 1 +
7+
1 file changed, 1 insertion(+)
8+
# New file diff stat: docs/dev/reports/preview_generator_v2_playwright_coverage.txt
9+
.../preview_generator_v2_playwright_coverage.txt | 46 ++++++++++++++++++++++
10+
1 file changed, 46 insertions(+)

docs/dev/reports/codex_review.diff

Lines changed: 55 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,69 @@
1-
# PR_26126_039 review diff excluding generated review artifact files
1+
# PR_26126_040 review diff excluding generated review artifact files
22

3-
diff --git a/docs/dev/reports/preview_generator_v2_playwright_result.txt b/docs/dev/reports/preview_generator_v2_playwright_result.txt
4-
index 99dea6f0..d9c95345 100644
5-
--- a/docs/dev/reports/preview_generator_v2_playwright_result.txt
6-
+++ b/docs/dev/reports/preview_generator_v2_playwright_result.txt
7-
@@ -1,4 +1,4 @@
8-
-# Preview Generator V2 Playwright Result - PR_26126_037
9-
+# Preview Generator V2 Playwright Result - PR_26126_039
3+
diff --git a/package.json b/package.json
4+
index 87404e4f..eae9bba5 100644
5+
--- a/package.json
6+
+++ b/package.json
7+
@@ -12,6 +12,7 @@
8+
"check:style-system-guard": "node tools/dev/checkStyleSystemGuard.mjs",
9+
"check:games-template-contract": "node ./scripts/validate-games-template-contract.mjs",
10+
"codex:review-artifacts": "node ./scripts/write-codex-review-artifacts.mjs",
11+
+ "test:workspace-v2": "playwright test tests/playwright/PreviewGeneratorV2Baseline.spec.mjs --project=playwright --reporter=list",
12+
"test:launch-smoke": "node ./tests/runtime/LaunchSmokeAllEntries.test.mjs",
13+
"test:launch-smoke:games": "node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --games",
14+
"test:workspace-manager:games": "node ./tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs",
1015

11-
Coverage:
12-
- tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
13-
@@ -6,15 +6,15 @@ Coverage:
14-
What the test validates:
15-
- Preview Generator V2 launches from /tools/preview-generator-v2/index.html through the repo HTTP server.
16-
- The Preview Generator V2 app shell is visible.
17-
+- tools/common/toolShellCommon.css is loaded.
18-
- The Preview Generator V2 heading is visible.
19-
- menuSample nav exists.
20-
- Generate Preview and Stop buttons are visible and initially disabled.
21-
- Games is the default target source.
22-
- Paths or IDs input is visible.
23-
- Status block is visible.
24-
-- Repo Destination accordion collapses and reopens with aria-expanded state changes.
25-
-- tools/common/toolShellCommon.css is loaded.
26-
- Consolidated common style declarations are applied to header, accordion, app shell, and fullscreen layout targets.
27-
+- Repo Destination accordion collapses and reopens with aria-expanded state changes.
28-
- No page errors are emitted during the launch/toggle path.
16+
# git diff --no-index -- /dev/null docs/dev/reports/preview_generator_v2_playwright_coverage.txt
2917

30-
Command run:
31-
@@ -32,4 +32,4 @@ Workspace V2 default command:
32-
- Result: FAIL, package.json does not define a test:workspace-v2 script.
33-
34-
Full samples smoke test:
35-
-- Skipped. This PR modifies Preview Generator V2 CSS structure and targeted Playwright coverage only; it does not modify samples or shared sample loading.
36-
+- Skipped. This PR is a Preview Generator V2 final hardening review pass and does not modify samples or shared sample loading.
37-
38-
# git diff --no-index -- /dev/null docs/dev/reports/preview_generator_v2_final_review.txt
39-
40-
diff --git a/docs/dev/reports/preview_generator_v2_final_review.txt b/docs/dev/reports/preview_generator_v2_final_review.txt
18+
diff --git a/docs/dev/reports/preview_generator_v2_playwright_coverage.txt b/docs/dev/reports/preview_generator_v2_playwright_coverage.txt
4119
new file mode 100644
42-
index 00000000..877676b5
20+
index 00000000..eb21a728
4321
--- /dev/null
44-
+++ b/docs/dev/reports/preview_generator_v2_final_review.txt
45-
@@ -0,0 +1,70 @@
46-
+# Preview Generator V2 Final Review - PR_26126_039
22+
+++ b/docs/dev/reports/preview_generator_v2_playwright_coverage.txt
23+
@@ -0,0 +1,46 @@
24+
+# Preview Generator V2 Playwright Coverage - PR_26126_040
4725
+
48-
+Scope:
49-
+- tools/preview-generator-v2/*
50-
+- tools/common/toolShellCommon.css
26+
+Reviewed:
27+
+- docs/dev/reports/preview_generator_v2_playwright_result.txt
5128
+- tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
29+
+- package.json
5230
+
53-
+Result:
54-
+- PASS: No Preview Generator V2 code changes were required.
55-
+- PASS: Existing behavior was preserved.
56-
+- PASS: No samples were modified.
57-
+- PASS: No schema was added or modified.
58-
+- PASS: No start_of_day folders were modified.
59-
+- PASS: No unintended files were changed before report generation.
60-
+
61-
+Structure checks:
62-
+- PASS: One class per Preview Generator V2 JavaScript file remains true.
63-
+- PASS: previewGeneratorV2.bootstrap.js remains bootstrap-only and has no class.
64-
+- PASS: index.html has no inline style blocks.
65-
+- PASS: index.html has no inline script blocks.
66-
+- PASS: No tools/shared dependencies exist.
67-
+- PASS: Legacy tools/preview folder is absent.
31+
+Coverage decision:
32+
+- Preview Generator V2 is already explicitly covered by Playwright.
33+
+- No duplicate Playwright test was added.
6834
+
69-
+Core class files:
70-
+- tools/preview-generator-v2/PreviewGeneratorV2App.js - PreviewGeneratorV2App
71-
+- tools/preview-generator-v2/PreviewGeneratorV2Capture.js - PreviewGeneratorV2Capture
72-
+- tools/preview-generator-v2/PreviewGeneratorV2Logger.js - PreviewGeneratorV2Logger
73-
+- tools/preview-generator-v2/PreviewGeneratorV2RepoAccess.js - PreviewGeneratorV2RepoAccess
74-
+- tools/preview-generator-v2/PreviewGeneratorV2ShellControl.js - PreviewGeneratorV2ShellControl
75-
+- tools/preview-generator-v2/PreviewGeneratorV2Ui.js - PreviewGeneratorV2Ui
76-
+- tools/preview-generator-v2/previewGeneratorV2.bootstrap.js - bootstrap wiring only
35+
+Existing Playwright coverage:
36+
+- Launches tools/preview-generator-v2/index.html through the repo HTTP server.
37+
+- Verifies the Preview Generator V2 app shell is visible.
38+
+- Verifies tools/common/toolShellCommon.css is loaded.
39+
+- Verifies the Preview Generator V2 heading is visible.
40+
+- Verifies menuSample nav exists.
41+
+- Verifies Generate Preview and Stop render and begin disabled.
42+
+- Verifies Games is the default target source.
43+
+- Verifies Paths or IDs input is visible.
44+
+- Verifies Status block is visible.
45+
+- Verifies common style declarations apply to header, accordion, app shell, and fullscreen layout targets.
46+
+- Verifies Repo Destination accordion collapses and reopens with aria-expanded state changes.
47+
+- Verifies no page errors during the launch/toggle path.
7748
+
78-
+Control and section class files:
79-
+- tools/preview-generator-v2/controls/AssetFolderControl.js - Asset folder section
80-
+- tools/preview-generator-v2/controls/CaptureModeControl.js - Capture mode section
81-
+- tools/preview-generator-v2/controls/LastGeneratedImageControl.js - Last Generated Image section
82-
+- tools/preview-generator-v2/controls/MenuSampleControl.js - menuSample Generate Preview/Stop controls
83-
+- tools/preview-generator-v2/controls/OutputSummaryControl.js - Output Summary section
84-
+- tools/preview-generator-v2/controls/PathsOrIdsControl.js - Paths or IDs section
85-
+- tools/preview-generator-v2/controls/PreviewFrameControl.js - hidden preview iframe
86-
+- tools/preview-generator-v2/controls/RenderControlsControl.js - Render Controls section
87-
+- tools/preview-generator-v2/controls/RepoDestinationControl.js - Repo Destination section
88-
+- tools/preview-generator-v2/controls/StatusControl.js - Status section and Clear control
89-
+- tools/preview-generator-v2/controls/TargetSourceControl.js - Target Source section
49+
+Broken hooks:
50+
+- No broken Preview Generator V2 selectors, IDs, or Playwright hooks were found.
51+
+- No UI behavior changes were made.
9052
+
91-
+Shared dependency check:
92-
+- Command: rg -n "tools/shared|../shared|../../tools/shared|platformShell|shared/" tools/preview-generator-v2 tools/common tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
93-
+- Result: no tools/shared references found.
53+
+Validation gap fixed:
54+
+- package.json did not define npm run test:workspace-v2.
55+
+- Added test:workspace-v2 as the repository validation command for the existing Preview Generator V2 Playwright baseline.
9456
+
95-
+Inline HTML check:
96-
+- Result: index.html has no inline style/script blocks.
57+
+Validation run:
58+
+- node --check tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
59+
+- npm run test:workspace-v2
9760
+
98-
+Legacy preview check:
99-
+- Command: Test-Path tools/preview
100-
+- Result: False.
101-
+
102-
+Syntax validation:
103-
+- Preview Generator V2 JavaScript syntax passed.
104-
+- Preview Generator V2 Playwright spec syntax passed.
105-
+
106-
+Playwright validation:
107-
+- Command: npx playwright test tests/playwright/PreviewGeneratorV2Baseline.spec.mjs --project=playwright --reporter=list
108-
+- Result: PASS, 1 passed.
109-
+
110-
+Workspace V2 validation:
111-
+- Command attempted: npm run test:workspace-v2
112-
+- Result: unavailable because package.json does not define test:workspace-v2.
61+
+Result:
62+
+- PASS: npm run test:workspace-v2 passed.
63+
+- PASS: 1 Playwright test passed.
11364
+
114-
+Final note:
115-
+- This PR is a final review-readiness report pass. No runtime behavior, UI behavior, generation logic, samples, schemas, or start_of_day folders were changed.
65+
+Scope guard:
66+
+- No samples modified.
67+
+- No schemas added or modified.
68+
+- No start_of_day folders modified.
69+
+- No duplicate Playwright tests added.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Preview Generator V2 Playwright Coverage - PR_26126_040
2+
3+
Reviewed:
4+
- docs/dev/reports/preview_generator_v2_playwright_result.txt
5+
- tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
6+
- package.json
7+
8+
Coverage decision:
9+
- Preview Generator V2 is already explicitly covered by Playwright.
10+
- No duplicate Playwright test was added.
11+
12+
Existing Playwright coverage:
13+
- Launches tools/preview-generator-v2/index.html through the repo HTTP server.
14+
- Verifies the Preview Generator V2 app shell is visible.
15+
- Verifies tools/common/toolShellCommon.css is loaded.
16+
- Verifies the Preview Generator V2 heading is visible.
17+
- Verifies menuSample nav exists.
18+
- Verifies Generate Preview and Stop render and begin disabled.
19+
- Verifies Games is the default target source.
20+
- Verifies Paths or IDs input is visible.
21+
- Verifies Status block is visible.
22+
- Verifies common style declarations apply to header, accordion, app shell, and fullscreen layout targets.
23+
- Verifies Repo Destination accordion collapses and reopens with aria-expanded state changes.
24+
- Verifies no page errors during the launch/toggle path.
25+
26+
Broken hooks:
27+
- No broken Preview Generator V2 selectors, IDs, or Playwright hooks were found.
28+
- No UI behavior changes were made.
29+
30+
Validation gap fixed:
31+
- package.json did not define npm run test:workspace-v2.
32+
- Added test:workspace-v2 as the repository validation command for the existing Preview Generator V2 Playwright baseline.
33+
34+
Validation run:
35+
- node --check tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
36+
- npm run test:workspace-v2
37+
38+
Result:
39+
- PASS: npm run test:workspace-v2 passed.
40+
- PASS: 1 Playwright test passed.
41+
42+
Scope guard:
43+
- No samples modified.
44+
- No schemas added or modified.
45+
- No start_of_day folders modified.
46+
- No duplicate Playwright tests added.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"check:style-system-guard": "node tools/dev/checkStyleSystemGuard.mjs",
1313
"check:games-template-contract": "node ./scripts/validate-games-template-contract.mjs",
1414
"codex:review-artifacts": "node ./scripts/write-codex-review-artifacts.mjs",
15+
"test:workspace-v2": "playwright test tests/playwright/PreviewGeneratorV2Baseline.spec.mjs --project=playwright --reporter=list",
1516
"test:launch-smoke": "node ./tests/runtime/LaunchSmokeAllEntries.test.mjs",
1617
"test:launch-smoke:games": "node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --games",
1718
"test:workspace-manager:games": "node ./tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs",

0 commit comments

Comments
 (0)