Skip to content

test(embed): fold the e2e and unit tests into one file per runner - #664

Merged
omridevk merged 3 commits into
mainfrom
tests-wave10-embed
Oct 31, 2026
Merged

omridevk merged 3 commits into
mainfrom
tests-wave10-embed

Conversation

@omridevk

Copy link
Copy Markdown
Contributor

Why

Test consolidation wave 10, after #625. @conciv/embed had 40 Playwright e2e files, 5 vitest node files and 11 helper modules. The agreed layout is one Playwright file, one node file and one helper module.

What changed

  • tests/e2e/embed.it.test.ts: the old embed suite is the embed boot describe; the other 34 surviving files follow as sibling test.describe blocks named after them, in alphabetical order. File-level hooks, test.use calls and suite setup moved inside their describe.
  • tests/unit/embed.test.ts: mount externals, mount node, native bundle. navigation-storage.test.ts (fake timers; covered by the reload continuity and unknown view restore e2e) and proxy-upgrade.test.ts (tested the test proxy itself) are deleted.
  • tests/helpers.ts: all 11 helper modules folded; no name collided. The widget bundle paths moved up one directory with the file. tests/fixtures/ and tests/globals.d.ts stay (the dead __fabFrames declaration is gone).
  • packages/oxlint-plugin/src/banned-vocabulary.js: its allowlist entry follows the native bridge helper to tests/helpers.ts.
  • Per the repo rule against CSS, class, geometry, screenshot and wall-clock assertions, 13 Playwright cases are deleted rather than moved: fab drag snap (rect and class), fab mascot (class-name locators, 4), landing cost (frame budget), code highlight bundle (shiki class and inline style), element capture theme class, embed host scroll offset and opaque sheet screenshot, native live region rect reports (2), native widget settle window over fixed sleeps. Files left empty by that are gone, along with the host page setup only those cases used.
  • No config edit, no changeset needed.

Verification

  • Playwright list: 133 cases in 40 files before, 120 in 1 file after, exactly the 13 deletions; vitest 22 before, 17 after (the two deleted files).
  • turbo run build --filter=@conciv/embed then TURBO_CONCURRENCY=1 VITEST_MAX_FORKS=1 turbo run test --filter=@conciv/embed: vitest 17 passed, Playwright 120 passed in 5.1 minutes.
  • typecheck 33/33, lint clean, format clean, fallow audit introduces nothing beyond weakened-tests on the deleted unit files.

Known

  • Nine describes and the handle helpers still use page.evaluate to read state (create conciv, element capture, mount ready, page dispatch boot and parity, native live region, native widget, selection containment, panel focus). Four fixed waitForTimeout sleeps remain (idle fetch heartbeat, draft send remount, native widget). Both are pre-existing and a separate decision.
  • One new no-shadow warning: the connection pool body declares a local openPanel that hides the helper import.

🤖 Generated with Claude Code

omridevk and others added 3 commits October 31, 2026 23:48
…helper module

Thirty five e2e files become sibling describes in tests/e2e/embed.it.test.ts, with the old embed suite as the embed boot describe. The three bundle guard node files become tests/unit/embed.test.ts, and the eleven helper modules fold into tests/helpers.ts. The navigation storage fake timer test and the test proxy self test are deleted as approved. Cases that asserted geometry, screenshots, class names, inline styles, frame budgets, wall-clock settle windows or used expect.poll are deleted. The banned vocabulary allowlist follows the native bridge helper to its new path.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
expect.poll is Playwright's retrying assertion, so the draft write churn describe and the six tab connection pool case come back verbatim. The long host page setup in embed boot and the __fabFrames global declaration lost their last users in the fold and are removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 22:01
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 477c6022-28c8-45bf-aa50-03095930ea4c
Commits

Reviewing files that changed from the base of the PR and between 3cff847 and f91d4ef.

Files selected for processing: 60
  • packages/embed/tests/e2e/chat-send-parts.it.test.ts
  • packages/embed/tests/e2e/code-highlight-bundle.it.test.ts
  • packages/embed/tests/e2e/composer-rich-input.it.test.ts
  • packages/embed/tests/e2e/composer-trigger-menu.it.test.ts
  • packages/embed/tests/e2e/connection-pool.it.test.ts
  • packages/embed/tests/e2e/create-conciv.it.test.ts
  • packages/embed/tests/e2e/dead-engine-boot.it.test.ts
  • packages/embed/tests/e2e/draft-selection.it.test.ts
  • packages/embed/tests/e2e/draft-send-remount.it.test.ts
  • packages/embed/tests/e2e/draft-write-churn.it.test.ts
  • packages/embed/tests/e2e/element-capture.it.test.ts
  • packages/embed/tests/e2e/embed.it.test.ts
  • packages/embed/tests/e2e/fab-drag-snap.it.test.ts
  • packages/embed/tests/e2e/fab-mascot.it.test.ts
  • packages/embed/tests/e2e/fab-working.it.test.ts
  • packages/embed/tests/e2e/forced-drop.it.test.ts
  • packages/embed/tests/e2e/helpers/chat.ts
  • packages/embed/tests/e2e/helpers/drafts.ts
  • packages/embed/tests/e2e/helpers/handle.ts
  • packages/embed/tests/e2e/helpers/native-bridge.ts
  • packages/embed/tests/e2e/helpers/page-plane-host.ts
  • packages/embed/tests/e2e/helpers/panel.ts
  • packages/embed/tests/e2e/helpers/proxied-suite.ts
  • packages/embed/tests/e2e/helpers/suite.ts
  • packages/embed/tests/e2e/host-hotkey-isolation.it.test.ts
  • packages/embed/tests/e2e/idle-fetch-heartbeat.it.test.ts
  • packages/embed/tests/e2e/landing-cost.it.test.ts
  • packages/embed/tests/e2e/mid-session-outage.it.test.ts
  • packages/embed/tests/e2e/model-selector.it.test.ts
  • packages/embed/tests/e2e/mount-ready.it.test.ts
  • packages/embed/tests/e2e/native-live-region.it.test.ts
  • packages/embed/tests/e2e/native-widget.it.test.ts
  • packages/embed/tests/e2e/page-dispatch-boot.it.test.ts
  • packages/embed/tests/e2e/page-dispatch-parity.it.test.ts
  • packages/embed/tests/e2e/page-plane.it.test.ts
  • packages/embed/tests/e2e/panel-focus.it.test.ts
  • packages/embed/tests/e2e/panel-session-switch.it.test.ts
  • packages/embed/tests/e2e/rebind.it.test.ts
  • packages/embed/tests/e2e/recording-attachment.it.test.ts
  • packages/embed/tests/e2e/reload-continuity.it.test.ts
  • packages/embed/tests/e2e/remount.it.test.ts
  • packages/embed/tests/e2e/selection-containment.it.test.ts
  • packages/embed/tests/e2e/session-canonicalize.it.test.ts
  • packages/embed/tests/e2e/tool-code-body.it.test.ts
  • packages/embed/tests/e2e/transport-selection.it.test.ts
  • packages/embed/tests/e2e/unknown-view-restore.it.test.ts
  • packages/embed/tests/e2e/virtualize-threshold-cliff.it.test.ts
  • packages/embed/tests/e2e/warm-session-resolve.it.test.ts
  • packages/embed/tests/globals.d.ts
  • packages/embed/tests/helpers.ts
  • packages/embed/tests/helpers/boot.ts
  • packages/embed/tests/helpers/host.ts
  • packages/embed/tests/helpers/proxy.ts
  • packages/embed/tests/unit/embed.test.ts
  • packages/embed/tests/unit/mount-externals.test.ts
  • packages/embed/tests/unit/mount-node.test.ts
  • packages/embed/tests/unit/native-bundle.test.ts
  • packages/embed/tests/unit/navigation-storage.test.ts
  • packages/embed/tests/unit/proxy-upgrade.test.ts
  • packages/oxlint-plugin/src/banned-vocabulary.js
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The test masks unexpected polling failures as success, allowing it to pass without observing the full resurrection window.

1 open issue
What changed in this PR

Consolidates @conciv/embed tests into one file per runner and one shared helper module, continuing the repository’s test-layout cleanup after #625.

Changes:

  • Groups surviving browser and node tests into feature-specific suites.
  • Combines helpers, adjusts bundle paths, and updates the native-bridge vocabulary allowlist.
  • Removes 13 browser cases, two unit suites, and an unused global declaration.
File Description
packages/​oxlint-plugin/​src/​banned-vocabulary.js Updates the native-bridge helper allowlist path.
packages/​embed/​tests/​unit/​proxy-upgrade.test.ts Removes tests of the test proxy.
packages/​embed/​tests/​unit/​navigation-storage.test.ts Removes fake-timer navigation tests.
packages/​embed/​tests/​unit/​native-bundle.test.ts Moves bundle checks into the consolidated node suite.
packages/​embed/​tests/​unit/​mount-node.test.ts Moves non-browser lifecycle checks into the node suite.
packages/​embed/​tests/​unit/​mount-externals.test.ts Moves dependency-sharing checks into the node suite.
packages/​embed/​tests/​unit/​embed.test.ts Collects the 17 surviving node tests.
packages/​embed/​tests/​helpers/​proxy.ts Moves proxy helpers into the shared module.
packages/​embed/​tests/​helpers/​host.ts Moves host-page helpers into the shared module.
packages/​embed/​tests/​helpers/​boot.ts Moves core boot helpers into the shared module.
packages/​embed/​tests/​helpers.ts Combines helpers and adjusts bundle paths.
packages/​embed/​tests/​globals.d.ts Removes the unused frame-sampling declaration.
packages/​embed/​tests/​e2e/​warm-session-resolve.it.test.ts Moves warm-session resolution coverage into the browser suite.
packages/​embed/​tests/​e2e/​virtualize-threshold-cliff.it.test.ts Moves virtualization threshold coverage.
packages/​embed/​tests/​e2e/​unknown-view-restore.it.test.ts Moves missing-extension route recovery coverage.
packages/​embed/​tests/​e2e/​transport-selection.it.test.ts Moves transport selection coverage.
packages/​embed/​tests/​e2e/​tool-code-body.it.test.ts Moves tool-result rendering coverage.
packages/​embed/​tests/​e2e/​session-canonicalize.it.test.ts Moves session canonicalization coverage.
packages/​embed/​tests/​e2e/​selection-containment.it.test.ts Moves host/widget selection coverage.
packages/​embed/​tests/​e2e/​remount.it.test.ts Moves remount continuity coverage.
packages/​embed/​tests/​e2e/​reload-continuity.it.test.ts Moves reload persistence coverage.
packages/​embed/​tests/​e2e/​recording-attachment.it.test.ts Moves recording attachment and replay coverage.
packages/​embed/​tests/​e2e/​rebind.it.test.ts Moves connection rebinding coverage.
packages/​embed/​tests/​e2e/​panel-session-switch.it.test.ts Moves per-session draft coverage.
packages/​embed/​tests/​e2e/​panel-focus.it.test.ts Moves focus and dismissal coverage.
packages/​embed/​tests/​e2e/​page-plane.it.test.ts Moves browser page-tool coverage.
packages/​embed/​tests/​e2e/​page-dispatch-parity.it.test.ts Moves dispatcher parity coverage.
packages/​embed/​tests/​e2e/​page-dispatch-boot.it.test.ts Moves connect-mode dispatcher coverage.
packages/​embed/​tests/​e2e/​native-widget.it.test.ts Moves bridge coverage; removes the settle-window case.
packages/​embed/​tests/​e2e/​native-live-region.it.test.ts Moves panel-state coverage; removes two geometry cases.
packages/​embed/​tests/​e2e/​mount-ready.it.test.ts Moves mount-readiness coverage.
packages/​embed/​tests/​e2e/​model-selector.it.test.ts Moves model-loading recovery coverage.
packages/​embed/​tests/​e2e/​mid-session-outage.it.test.ts Moves outage recovery coverage.
packages/​embed/​tests/​e2e/​landing-cost.it.test.ts Removes the frame-budget test.
packages/​embed/​tests/​e2e/​idle-fetch-heartbeat.it.test.ts Moves heartbeat coverage.
packages/​embed/​tests/​e2e/​host-hotkey-isolation.it.test.ts Moves keyboard isolation coverage.
packages/​embed/​tests/​e2e/​helpers/​suite.ts Moves widget setup and teardown helpers.
packages/​embed/​tests/​e2e/​helpers/​proxied-suite.ts Moves proxied-suite helpers.
packages/​embed/​tests/​e2e/​helpers/​panel.ts Moves panel interaction helpers.
packages/​embed/​tests/​e2e/​helpers/​page-plane-host.ts Moves page-plane readiness helpers.
packages/​embed/​tests/​e2e/​helpers/​native-bridge.ts Moves native bridge helpers.
packages/​embed/​tests/​e2e/​helpers/​handle.ts Moves handle lifecycle helpers.
packages/​embed/​tests/​e2e/​helpers/​drafts.ts Moves draft persistence helpers.
packages/​embed/​tests/​e2e/​helpers/​chat.ts Moves chat interaction helpers.
packages/​embed/​tests/​e2e/​forced-drop.it.test.ts Moves socket reconnection coverage.
packages/​embed/​tests/​e2e/​fab-working.it.test.ts Moves launcher busy-state coverage.
packages/​embed/​tests/​e2e/​fab-mascot.it.test.ts Removes four class-based mascot tests.
packages/​embed/​tests/​e2e/​fab-drag-snap.it.test.ts Removes the geometry-based drag test.
packages/​embed/​tests/​e2e/​element-capture.it.test.ts Moves capture coverage; removes the theme-class case.
packages/​embed/​tests/​e2e/​draft-write-churn.it.test.ts Moves draft write-count coverage.
packages/​embed/​tests/​e2e/​draft-send-remount.it.test.ts Moves sent-draft resurrection coverage.
packages/​embed/​tests/​e2e/​draft-selection.it.test.ts Moves caret persistence coverage.
packages/​embed/​tests/​e2e/​dead-engine-boot.it.test.ts Moves unavailable-engine boot recovery coverage.
packages/​embed/​tests/​e2e/​create-conciv.it.test.ts Moves widget lifecycle coverage.
packages/​embed/​tests/​e2e/​connection-pool.it.test.ts Moves shared-context connection coverage.
packages/​embed/​tests/​e2e/​composer-trigger-menu.it.test.ts Moves command and mention menu coverage.
packages/​embed/​tests/​e2e/​composer-rich-input.it.test.ts Moves rich-input and composition coverage.
packages/​embed/​tests/​e2e/​code-highlight-bundle.it.test.ts Removes the class/style-based highlighting test.
packages/​embed/​tests/​e2e/​chat-send-parts.it.test.ts Moves attachment transport coverage.

Review effort: Balanced

intervalMs: 25,
}).then(
() => true,
() => false,
@omridevk
omridevk merged commit 1bd7dce into main Oct 31, 2026
46 of 48 checks passed
@omridevk
omridevk deleted the tests-wave10-embed branch October 31, 2026 22:17
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.

2 participants