Skip to content

test(embed): cut the e2e suite from 120 cases to the 46 only the embed can prove - #674

Merged
omridevk merged 2 commits into
mainfrom
tests-cut-embed
Nov 1, 2026
Merged

omridevk merged 2 commits into
mainfrom
tests-cut-embed

Conversation

@omridevk

@omridevk omridevk commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Why

Test consolidation, cut pass for @conciv/embed. #664 folded the e2e files into one Playwright file with 120 runtime cases that run one after another (workers 1), 5.8 minutes on shard 1. An audit of every assertion found 42 restating a faster app, ui-kit or core test, 18 asserting socket, request or attribute counts, and 23 one-per-past-fix variants of a neighbour.

What is cut

120 cases to 46, 3.2k lines to 1.7k, Playwright run 5.8 min to 2.1 min.

  • Duplicates of page, core or ui-kit-chat tests: page verb semantics (missing target, refs, no React fiber, invalid args, journal), draft storage rows, catalog cards, failed-send restore, Stop versus Send, session canonicalize.
  • Mechanism: push and chat socket counts across tabs, HTTP RPC URL counts, drafts.set call counts, aria-busy mirrors, native bridge payload shapes, transport field on the wire, a 32s wait followed by a poll count.
  • Splinters: forward delete beside backspace, Tab closes the menu, each close path of panel focus, the other two host styles in selection containment, the fresh-handle remount variant, mismatched native requestId.
  • Helper-heavy and library: API-base probes through the fixture extension, __TSR_ROUTER__ restore, the create conciv handle lifecycle (the kept remount case covers mount, unmount, remount).

What stays against the audit

Cases whose cited app duplicate was deleted by #666: dead engine boot with Retry, mid-session outage notice appearing and clearing, model load retry, shell painting while the session list loads. virtualize threshold cliff stays because the ui-kit-chat audit names it as the owner. page_effect highlight enable, disable and toggle moved into the parity describe since nothing else proves the widget registers and draws highlight.

Two cases were reduced instead of deleted: draft send remount waits on the draft row and the visible reply instead of a 350ms sleep and a 2s DB poll; the heartbeat case waits on the session boot traffic instead of a 3s sleep and asserts only the notice.

The element capture describe is byte-identical: its Script button click flake is under RCA on its own branch.

Cleanup

Helpers that lost all users are gone (sendHeldTurn, the backdrop code, proxy request and socket counters, upgrade blocking, the embedBundle export is internal again), the mount probe left handle-entry.tsx, concivNativeRebind left globals.d.ts. No src changes, no new exports, no new files.

Verification

  • TURBO_CONCURRENCY=1 VITEST_MAX_FORKS=1 turbo run test --filter=@conciv/embed: 17 unit, 46 e2e passed (the first local run hit the element capture flake once; the rerun was green).
  • typecheck, lint, fallow audit (warn only on removed test cases) pass; changeset for @conciv/embed.
  • pnpm format:check fails on two files under packages/extensions/design/src that are unformatted on main; untouched here.

🤖 Generated with Claude Code

omridevk and others added 2 commits November 1, 2026 02:04
The embed end-to-end file drops from 120 runtime cases to 46. Cases that
only counted sockets, requests, RPC calls or attribute mirrors are gone, as
are cases that restate behaviour owned by ui-kit-chat, ui-kit-tap, page,
extensions/page, core and client tests. Cases whose cited coverage no longer
exists after the apps/conciv consolidation stay. The heartbeat and draft
send remount cases keep only their visible assertions with no fixed sleeps.
Orphaned helpers, the backdrop code, the mount probe fixture and the native
rebind global go with them. The element capture describe is untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 00:07
@coderabbitai

coderabbitai Bot commented Nov 1, 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 1 minute.

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: fa904022-49c6-403a-9c98-aa50f37bd748
Commits

Reviewing files that changed from the base of the PR and between 4465b85 and 8625fe6.

Files selected for processing: 5
  • .changeset/tests-cut-embed.md
  • packages/embed/tests/e2e/embed.it.test.ts
  • packages/embed/tests/fixtures/handle-entry.tsx
  • packages/embed/tests/globals.d.ts
  • packages/embed/tests/helpers.ts
  • 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.

🟢 Approval recommended

No active review issues remain for the embed test-suite consolidation.

No open issues 🎉

What changed in this PR

Continues the test consolidation from #664 and #666 by reducing @conciv/embed coverage to integration scenarios intended to require the built widget, without changing production source.

Changes:

  • Reduces the end-to-end suite from 120 to 46 cases, removing duplicate coverage, mechanism assertions, and redundant variants.
  • Replaces fixed waits in draft-remount and heartbeat tests with observable events, and moves highlight-effect coverage into dispatch parity tests.
  • Removes unused test helpers, fixture probes, and globals; adds an embed patch changeset.
File Description
packages/​embed/​tests/​helpers.ts Removes unused helpers and simplifies host and proxy setup.
packages/​embed/​tests/​globals.d.ts Removes the unused native-rebind test global.
packages/​embed/​tests/​fixtures/​handle-entry.tsx Removes the mount-probe extension and its registration.
packages/​embed/​tests/​e2e/​embed.it.test.ts Cuts redundant cases and streamlines retained integration coverage.
.changeset/​tests-cut-embed.md Records the test-suite reduction as an embed patch changeset.

Review effort: Balanced

@omridevk
omridevk merged commit 15c2fcb into main Nov 1, 2026
28 checks passed
@omridevk
omridevk deleted the tests-cut-embed branch November 1, 2026 00:19
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