Skip to content

Commit 6f2042a

Browse files
author
DavidQ
committed
Finish Playwright end-to-end flow validation and move Clear into Status header - PR_26126_071-playwright-e2e-flow-and-status-header-polish
1 parent 86c9d41 commit 6f2042a

5 files changed

Lines changed: 168 additions & 32 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
PR_26126_071-playwright-e2e-flow-and-status-header-polish
2+
3+
Scope:
4+
- Preview Generator V2 status header layout polish.
5+
- Preview Generator V2 Playwright E2E depth for generate, batch, status, and summary behavior.
6+
7+
Changes:
8+
- Moved the Status Clear button into a dedicated Status header actions container so it visually belongs to the Status accordion header while preserving the existing accordion button behavior.
9+
- Extended the Preview Generator V2 Playwright fake repo picker to support pre-existing preview.svg contents for skip-path validation.
10+
- Added an E2E batch test that:
11+
- selects a fake repo destination through the browser File System Access hook
12+
- uses the actual Playwright repo server as Base URL
13+
- runs a batch containing one skipped existing preview, one real generated sample preview, and one failing phase input
14+
- validates RUN, SKIP, FAIL INPUT, OK, status log, summary counts, output write path, last generated image, and Clear behavior
15+
- Updated an existing phase-folder test to use the active Playwright server URL instead of relying on an external localhost server.
16+
17+
Playwright impacted: Yes
18+
- Validated Generate Preview button gating and execution.
19+
- Validated batch item logging and real summary output:
20+
- Written: 1
21+
- Warnings: 0
22+
- Failed: 1
23+
- Skipped: 1
24+
- Validated SKIP behavior for an existing preview.svg without the literal Capture timeout marker.
25+
- Validated FAIL INPUT behavior for a missing phase folder.
26+
- Validated Status Clear from inside the Status header area.
27+
28+
Validation:
29+
- `node --check tests/playwright/PreviewGeneratorV2Baseline.spec.mjs` passed.
30+
- `npm run test:workspace-v2` passed: 7 tests passed.
31+
- `git diff --check` passed with line-ending warnings only.
32+
33+
Manual test notes:
34+
- Manual browser testing was not run separately.
35+
- The requested UI and flow behavior is covered by targeted Playwright assertions, including status header placement, accordion behavior, Clear behavior, real generate flow, batch logging, and summary output.

docs/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ Note: entry percentages use function coverage when available, otherwise line cov
1111
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1212

1313
Exercised tool entry points detected:
14-
(84%) Preview Generator V2 - exercised 19 runtime JS files
14+
(86%) Preview Generator V2 - exercised 19 runtime JS files
1515
(49%) Palette Manager - exercised 12 runtime JS files
1616
(84%) Tool Template V2 - exercised 10 runtime JS files
1717
(0%) Workspace V2 - not exercised by this Playwright run
1818
(0%) Workspace Manager - not exercised by this Playwright run
1919

2020
Changed runtime JS files covered:
21-
(0%) tools/shared/vectorNativeTemplate.js - not covered
22-
(0%) tools/shared/vectorTemplateSampleGame.js - not covered
21+
(100%) none changed - no changed runtime JS files
2322

2423
Files with executed line/function counts where available:
2524
(2%) src/engine/input/ActionInputService.js - executed lines 397/397; executed functions 1/51
@@ -30,34 +29,29 @@ Files with executed line/function counts where available:
3029
(10%) src/engine/scene/AttractModeController.js - executed lines 143/143; executed functions 1/10
3130
(10%) src/shared/math/numberNormalization.js - executed lines 35/35; executed functions 1/10
3231
(11%) src/engine/audio/PlaylistManager.js - executed lines 70/70; executed functions 1/9
33-
(11%) src/engine/input/InputService.js - executed lines 185/185; executed functions 3/28
34-
(12%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 3/25
3532
(13%) src/engine/persistence/SaveSlotManager.js - executed lines 45/45; executed functions 1/8
3633
(14%) src/engine/release/AccessibilityOptions.js - executed lines 68/68; executed functions 1/7
3734
(14%) src/engine/runtime/BrowserDownloadService.js - executed lines 38/38; executed functions 1/7
3835
(14%) src/engine/scene/TransitionScene.js - executed lines 58/58; executed functions 1/7
36+
(16%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 4/25
3937
(17%) src/engine/camera/Camera2D.js - executed lines 44/44; executed functions 1/6
4038
(17%) src/engine/input/ActionInputMap.js - executed lines 24/24; executed functions 1/6
4139
(17%) src/engine/input/InputContextService.js - executed lines 48/48; executed functions 1/6
4240
(17%) src/engine/persistence/CookieStorageService.js - executed lines 42/42; executed functions 1/6
4341
(17%) src/engine/release/CrashRecoveryManager.js - executed lines 66/66; executed functions 1/6
4442
(17%) src/engine/release/DeploymentProfiles.js - executed lines 48/48; executed functions 1/6
4543
(17%) src/engine/scene/SceneTransition.js - executed lines 27/27; executed functions 1/6
46-
(18%) src/engine/rendering/CanvasRenderer.js - executed lines 100/100; executed functions 2/11
4744
(20%) src/engine/audio/MidiPlayer.js - executed lines 31/31; executed functions 1/5
48-
(20%) src/engine/input/GamepadState.js - executed lines 92/92; executed functions 2/10
4945
(20%) src/engine/persistence/CompressionService.js - executed lines 18/18; executed functions 1/5
5046
(20%) src/engine/scene/SceneManager.js - executed lines 33/33; executed functions 1/5
5147
(20%) src/shared/utils/mathUtils.js - executed lines 29/29; executed functions 1/5
5248
(25%) src/engine/audio/HtmlAudioMediaBackend.js - executed lines 22/22; executed functions 1/4
49+
(25%) src/engine/input/GamepadState.js - executed lines 92/92; executed functions 3/12
5350
(25%) src/engine/release/ReleaseValidationChecklist.js - executed lines 43/43; executed functions 1/4
5451
(25%) src/engine/release/SettingsSystem.js - executed lines 94/94; executed functions 3/12
5552
(25%) src/engine/rendering/ResolutionScaler.js - executed lines 22/22; executed functions 1/4
56-
(25%) src/engine/runtime/backgroundImage.js - executed lines 205/205; executed functions 3/12
5753
(26%) src/engine/runtime/fullscreenBezel.js - executed lines 993/993; executed functions 16/62
5854
(29%) src/engine/audio/WebAudioToneBackend.js - executed lines 65/65; executed functions 2/7
59-
(29%) src/engine/input/KeyboardState.js - executed lines 34/34; executed functions 2/7
60-
(30%) src/engine/input/MouseState.js - executed lines 57/57; executed functions 3/10
6155
(33%) src/engine/audio/FrequencyPlayer.js - executed lines 25/25; executed functions 1/3
6256
(33%) src/engine/audio/Synthesizer.js - executed lines 24/24; executed functions 1/3
6357
(33%) src/engine/camera/CameraSystem.js - executed lines 21/21; executed functions 1/3
@@ -69,13 +63,14 @@ Files with executed line/function counts where available:
6963
(33%) src/engine/runtime/MobileRuntimeTweaks.js - executed lines 21/21; executed functions 1/3
7064
(33%) src/engine/scene/SceneTransitionController.js - executed lines 22/22; executed functions 1/3
7165
(36%) tools/palette-manager-v2/controls/PaletteImportExportControl.js - executed lines 67/67; executed functions 4/11
66+
(37%) src/engine/input/InputService.js - executed lines 185/185; executed functions 11/30
7267
(38%) src/engine/camera/Camera3D.js - executed lines 48/48; executed functions 3/8
7368
(38%) tools/palette-manager-v2/modules/PaletteValidationService.js - executed lines 88/88; executed functions 3/8
7469
(39%) tools/palette-manager-v2/modules/PaletteManagerApp.js - executed lines 934/934; executed functions 43/110
75-
(40%) samples/phase-01/0102/KeyboardMoveScene.js - executed lines 78/78; executed functions 2/5
7670
(40%) src/engine/scene/Scene.js - executed lines 12/12; executed functions 2/5
7771
(42%) tools/preview-generator-v2/PreviewGeneratorV2Capture.js - executed lines 477/477; executed functions 10/24
7872
(44%) tools/palette-manager-v2/controls/PaletteEditorControl.js - executed lines 225/225; executed functions 14/32
73+
(47%) src/engine/runtime/backgroundImage.js - executed lines 205/205; executed functions 8/17
7974
(47%) src/engine/runtime/RuntimeMonitoringHooks.js - executed lines 191/191; executed functions 8/17
8075
(50%) src/engine/camera/ZoneCameraSystem.js - executed lines 26/26; executed functions 1/2
8176
(50%) src/engine/config/ConfigStore.js - executed lines 46/46; executed functions 3/6
@@ -91,33 +86,38 @@ Files with executed line/function counts where available:
9186
(55%) tools/palette-manager-v2/modules/SwatchRow.js - executed lines 115/115; executed functions 6/11
9287
(56%) src/engine/logging/Logger.js - executed lines 56/56; executed functions 5/9
9388
(56%) tools/palette-manager-v2/modules/paletteUtils.js - executed lines 41/41; executed functions 5/9
89+
(57%) src/engine/input/KeyboardState.js - executed lines 34/34; executed functions 4/7
9490
(57%) src/engine/runtime/FullscreenService.js - executed lines 118/118; executed functions 8/14
95-
(58%) src/engine/core/Engine.js - executed lines 323/323; executed functions 7/12
96-
(60%) src/engine/core/RuntimeMetrics.js - executed lines 48/48; executed functions 3/5
9791
(60%) src/engine/persistence/StorageService.js - executed lines 49/49; executed functions 3/5
9892
(61%) src/engine/runtime/gameImageConvention.js - executed lines 207/207; executed functions 11/18
9993
(65%) tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js - executed lines 121/121; executed functions 15/23
10094
(67%) src/shared/number/numberUtils.js - executed lines 14/14; executed functions 2/3
10195
(67%) tools/preview-generator-v2/PreviewGeneratorV2ShellControl.js - executed lines 117/117; executed functions 8/12
96+
(70%) src/engine/input/MouseState.js - executed lines 57/57; executed functions 7/10
10297
(71%) tools/palette-manager-v2/controls/PaletteValidationErrorControl.js - executed lines 30/30; executed functions 5/7
98+
(73%) src/engine/rendering/CanvasRenderer.js - executed lines 100/100; executed functions 8/11
10399
(73%) src/engine/theme/mount-shared-header.js - executed lines 143/143; executed functions 8/11
104-
(75%) src/engine/core/FixedTicker.js - executed lines 36/36; executed functions 3/4
105-
(75%) src/engine/theme/Theme.js - executed lines 26/26; executed functions 3/4
106100
(75%) tools/palette-manager-v2/controls/UserPaletteControl.js - executed lines 95/95; executed functions 12/16
107101
(75%) tools/palette-manager-v2/paletteManagerShell.js - executed lines 160/160; executed functions 12/16
108-
(80%) src/engine/core/FrameClock.js - executed lines 32/32; executed functions 4/5
102+
(77%) src/engine/core/Engine.js - executed lines 323/323; executed functions 10/13
109103
(80%) src/engine/theme/accordionV2/accordionV2.js - executed lines 26/26; executed functions 4/5
110-
(81%) tools/preview-generator-v2/PreviewGeneratorV2App.js - executed lines 539/539; executed functions 47/58
111104
(82%) samples/shared/sampleDetailPageEnhancement.js - executed lines 471/471; executed functions 41/50
112105
(86%) tools/templates-v2/js/controls/StatusLogControl.js - executed lines 21/21; executed functions 6/7
113106
(87%) tools/common/PaletteSortService.js - executed lines 103/103; executed functions 13/15
107+
(88%) tools/preview-generator-v2/PreviewGeneratorV2App.js - executed lines 539/539; executed functions 51/58
114108
(88%) tools/templates-v2/js/controls/SourceInputControl.js - executed lines 33/33; executed functions 7/8
115109
(92%) tools/templates-v2/js/controls/ToolStarterShellControl.js - executed lines 111/111; executed functions 11/12
110+
(100%) samples/phase-01/0102/KeyboardMoveScene.js - executed lines 78/78; executed functions 6/6
116111
(100%) samples/phase-01/0102/main.js - executed lines 23/23; executed functions 1/1
112+
(100%) samples/phase-01/0103/main.js - executed lines 23/23; executed functions 1/1
113+
(100%) samples/phase-01/0103/MouseInputScene.js - executed lines 70/70; executed functions 6/6
117114
(100%) samples/shared/numberUtils.js - executed lines 7/7; executed functions 1/1
118115
(100%) src/engine/audio/index.js - executed lines 15/15; executed functions 1/1
119116
(100%) src/engine/camera/index.js - executed lines 10/10; executed functions 1/1
120117
(100%) src/engine/config/index.js - executed lines 7/7; executed functions 1/1
118+
(100%) src/engine/core/FixedTicker.js - executed lines 36/36; executed functions 4/4
119+
(100%) src/engine/core/FrameClock.js - executed lines 32/32; executed functions 5/5
120+
(100%) src/engine/core/RuntimeMetrics.js - executed lines 48/48; executed functions 5/5
121121
(100%) src/engine/input/index.js - executed lines 13/13; executed functions 1/1
122122
(100%) src/engine/logging/index.js - executed lines 8/8; executed functions 1/1
123123
(100%) src/engine/paletteList.js - executed lines 1205/1205; executed functions 15/15
@@ -127,6 +127,7 @@ Files with executed line/function counts where available:
127127
(100%) src/engine/runtime/index.js - executed lines 13/13; executed functions 1/1
128128
(100%) src/engine/scene/index.js - executed lines 13/13; executed functions 1/1
129129
(100%) src/engine/theme/index.js - executed lines 3/3; executed functions 1/1
130+
(100%) src/engine/theme/Theme.js - executed lines 26/26; executed functions 4/4
130131
(100%) src/engine/theme/ThemeTokens.js - executed lines 20/20; executed functions 1/1
131132
(100%) src/engine/theme/toolboxaid-header.js - executed lines 76/76; executed functions 7/7
132133
(100%) src/shared/number/index.js - executed lines 7/7; executed functions 1/1
@@ -155,13 +156,7 @@ Files with executed line/function counts where available:
155156
(100%) tools/templates-v2/js/services/ToolStateSerializer.js - executed lines 13/13; executed functions 3/3
156157

157158
Uncovered or low-coverage changed JS files:
158-
(0%) tools/shared/vectorNativeTemplate.js - uncovered
159-
(0%) tools/shared/vectorTemplateSampleGame.js - uncovered
159+
(100%) none changed - no changed runtime JS files
160160

161161
Changed JS files considered:
162-
(0%) tests/helpers/playwrightV8CoverageReporter.mjs - changed JS file not collected as browser runtime coverage
163162
(0%) tests/playwright/PreviewGeneratorV2Baseline.spec.mjs - changed JS file not collected as browser runtime coverage
164-
(0%) tests/tools/RuntimeAssetLookupConsolidation.test.mjs - changed JS file not collected as browser runtime coverage
165-
(0%) tests/tools/VectorNativeTemplate.test.mjs - changed JS file not collected as browser runtime coverage
166-
(0%) tools/shared/vectorNativeTemplate.js - changed JS file not collected as browser runtime coverage
167-
(0%) tools/shared/vectorTemplateSampleGame.js - changed JS file not collected as browser runtime coverage

0 commit comments

Comments
 (0)