Skip to content

Migrate Prompt Playwright test to gallery - #2354

Closed
heswell wants to merge 10 commits into
finos:mainfrom
heswell:heswell-copilot-playwright-gallery-restart
Closed

Migrate Prompt Playwright test to gallery#2354
heswell wants to merge 10 commits into
finos:mainfrom
heswell:heswell-copilot-playwright-gallery-restart

Conversation

@heswell

@heswell heswell commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the Rsbuild human-readable component gallery backed by showcase examples
  • migrate the Prompt component test to the gallery mount API
  • run the migrated Prompt test in Chromium, Firefox, and WebKit projects
  • build the gallery once in CI and reuse it across browser jobs
  • remove the obsolete experimental Playwright CT dependency and scripts to prevent duplicate Playwright runtimes

Validation

  • npm run playwright:gallery:build
  • PLAYWRIGHT_GALLERY=production npm exec -- playwright test --config=playwright.config.ts --project=components-chromium --project=components-firefox --project=components-webkit
  • 9 passed

The migration remains intentionally limited to the Prompt test. The failed Rspack webpackContext story-loader change was not included.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy Preview for papaya-valkyrie-395400 canceled.

Name Link
🔨 Latest commit a3f1629
🔍 Latest deploy log https://app.netlify.com/projects/papaya-valkyrie-395400/deploys/6a92fd75c9b93500080894c7

heswell and others added 4 commits August 28, 2026 20:28
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Lint cleanup pushed in 6b8e2ab: replaced all remaining @playwright/experimental-ct-react and @playwright/experimental-ct-core imports across the vuu-ui component-test scope with @playwright/test types/APIs, including shared assertions/config and MountResult type references. No test bodies or showcase locations were changed. Results: npm run lint:error passed; npm run typecheck passed; gallery build plus exact Chromium/Firefox/WebKit matrix passed 9/9.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Migrated all 10 Playwright component test files under vuu-ui/packages/vuu-table plus TableOM to the standard gallery story-ID API. Showcase examples remain in place; gallery now registers the basket module needed by sizing stories; component projects include the vuu-table test glob. Removed experimental CT imports/usages in this package. Commit: facafe10c.

Validation: npm run lint:error passed; npm run typecheck passed; gallery build passed with the existing dynamic-import warning. Full 267-test Chromium/Firefox/WebKit matrix reached 252 passed, 13 skipped, 2 failed. The remaining failures are browser-flaky focus/selection assertions: Chromium Table-selection shift-click range selection and Firefox Table-scrolling page-down/page-up focus restoration. No failures were masked.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Completed repository-wide migration of remaining Playwright component tests to the standard gallery in commit 73dc4027a. Migrated 24 remaining test files outside Prompt/vuu-table, updated component project discovery to all **/*.playwright.test.tsx, preserved showcase examples in place, and moved the selection matcher into the standard Playwright config. No experimental CT imports/usages remain outside dependency guidance files.

Also fixed migration synchronization issues: awaited vuu-table selection assertions and added virtualization waits around Page Up/Page Down. Validation: npm run lint:error passed; npm run typecheck passed; gallery build passed (existing Feature.tsx dynamic-import warning); complete matrix ran 831 tests with 803 passed, 24 skipped, and 4 unresolved failures. Remaining failures: Chart EditableChart sizing in Chromium and Firefox (equal-height behavior), and FilterPill menu visibility in WebKit (both tests). A targeted FilterPill rerun reproduced the WebKit behavior; assertions were not weakened or masked.

@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Compared current workflow/config against the known-good gallery implementation. The build-once/reuse flow is already present and complete in the PR: playwright-gallery-build builds playwright/gallery/dist once and uploads a one-day artifact; the three browser jobs depend on it, download the artifact, serve it through playwright:gallery:serve, and run components-${{ matrix.browser }} using playwright.config.ts. No Rspack webpackContext loader is present. No additional workflow code was necessary.

Validated workflow YAML syntax successfully. Local production-gallery path is coherent: gallery build completed successfully, then Chromium ran 277 tests (274 passed, 2 skipped, 1 existing Chart EditableChart sizing failure) in 53.5s. Existing full matrix result remains 831 total: 803 passed, 24 skipped, 4 unresolved browser-specific failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Added Istanbul coverage in commit 8f12961e2 while preserving the build-once gallery flow. Instrumentation uses @rsbuild/plugin-babel + babel-plugin-istanbul; Playwright collects Chromium window.__coverage__ data, and istanbul-lib-*/istanbul-reports generate JSON, JSON summary, HTML, LCOV, text summary, aggregate totals, and one row for every direct vuu-ui/packages/* directory. CI builds the instrumented gallery once, uploads it, collects coverage only in the Chromium matrix job, downloads/merges coverage in the report job, uploads the coverage artifact, and appends the Istanbul summary to the job summary. No V8 reporting was retained.

Validation: npm ci --dry-run --ignore-scripts, workflow YAML parse, npm run lint:error, npm run typecheck, instrumented gallery build, and representative Prompt + vuu-table Chromium run (6/6) all passed. Istanbul report generated successfully: aggregate Lines 19.0% (4439/23400), Functions 10.1% (520/5131), Branches 7.7% (1050/13663), Statements 18.7% (4487/23959), with 28 package rows including zero-coverage packages. Existing limitation: coverage is collected from Chromium only to avoid triplicating instrumentation data across browser jobs; the full matrix retains previously reported browser-specific failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Fixed artifact action pins in commit 605b87289. Replaced all four actions/upload-artifact references that used the failing 330a01c490aca151604b8cf639adc76d48f6c5d4/typo variant with verified immutable commit 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a (upload-artifact v7.0.1, Node 24-compatible). Verified download pins too: 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c (v8.0.1) and 018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 (v6.0.0) both exist upstream. Workflow YAML parses successfully; no other artifact references remain invalid.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@heswell

heswell commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #2355, which uses the finos/vuu branch.

@heswell heswell closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant