Skip to content

test(desktop): move P2 coverage below Electron - #4825

Open
Astro-Han wants to merge 8 commits into
mainfrom
test/4761-move-p2-e2e
Open

test(desktop): move P2 coverage below Electron#4825
Astro-Han wants to merge 8 commits into
mainfrom
test/4761-move-p2-e2e

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Move the P2 layout, focus, sidebar, composer, onboarding, and quote-selection contracts from Electron into Storybook play stories or focused UI unit tests.
  • Keep only the two boundaries that still require Electron: physical pointer capture after leaving the renderer viewport, and sidebar grouping persistence across a renderer reload.
  • Retire the warm transcript worker controls and scenario data that no remaining Electron test consumes. The E2E tier is now 50 tests in 24 files.

The former minimum-window onboarding test used page.setViewportSize({ width: 480, height: 320 }) and asserted renderer scroll geometry; it did not exercise native BrowserWindow minimum-size enforcement. Its replacement therefore uses the same fixed viewport in Storybook.

Refs #4761

Verification

  • npm run build-storybook -w @maka/desktop — passed
  • npm run smoke:storybook -w @maka/desktop — passed, 300 stories / 327 theme renders
  • npm run build:with-deps -w @maka/desktop — passed
  • npm run typecheck -w @maka/ui — passed
  • npm run typecheck -w @maka/desktop — passed
  • npm run check:architecture -w @maka/desktop — passed, 98 tests
  • node --test packages/ui/dist/session-setting-intent.test.js — passed, 9 tests
  • node scripts/asf-license-headers.mjs check — passed
  • git diff --check origin/main...HEAD — passed
  • Mutation checks proved the moved contracts fail for: premature plus-menu close, stale catalog reuse after a context switch, regressed sidebar nesting, dropped latest intent, uncleared queued intent, and uncaught catalog-refresh rejection.

The two retained Electron specs were attempted twice after a full Desktop build. Both runs timed out in the shared fixture's electron.launch before either test body ran; the launched process entered a native [NSAlert runModal] JavaScript-error dialog. This is a local launch blocker, not an assertion result.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented the test migrations, removed retired fixture paths, ran mutation checks, and prepared this PR.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/XXL Over 2500 readable lines label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XXL Over 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant