Skip to content

test(desktop): add edit-agent dialog e2e coverage (Phase 1B.3b-pre)#1628

Merged
wesbillman merged 1 commit into
mainfrom
test/edit-agent-e2e
Jul 8, 2026
Merged

test(desktop): add edit-agent dialog e2e coverage (Phase 1B.3b-pre)#1628
wesbillman merged 1 commit into
mainfrom
test/edit-agent-e2e

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Phase 1B.3b-pre — edit-agent dialog e2e coverage

Coverage-first slice ahead of B3b (the instance-edit re-host, #centralize-personas-and-agents). Survey found EditAgentDialog had no e2e coverage past dialog-open — the readiness-screenshot spec opens it for a shot and asserts one field visible. Writing the spec against today's dialog, unmodified, off main means the B3b re-host lands guarded by a pre-existing spec rather than one written alongside the change it's meant to guard.

What it covers (3 tests, dialog's only mount path: profile panel → Edit)

  1. Rename persistence — edit name → save → reopen; asserts the save survived the dialog lifecycle via the store, not local state.
  2. Model round-trip — provider (Anthropic) → custom model + required credential → save → reopen; exercises the menu-based PersonaDropdownField interactions (Edit's fields are dropdown-menus, not native selects like Create's).
  3. Routing pin (discovery made writing this spec)handleEditAgent routes persona-linked agents to the definition editor (persona-dialog), never EditAgentDialog. The instance editor is reachable for persona-linked agents only via the requestOpenEditAgent event (ConfigNudgeCard side door) — no plain UI path. The test pins this routing. Consequence for B3b: the nudge-event path is the mount contract to preserve, and the inherit-pin machinery's regression net is the component-level pinning test, since no ordinary user path reaches it.

Disclosed mock boundary (spec header)

The e2eBridge update_managed_agent handler echoes name/model/systemPrompt/envVars/respondTo only — it does not model the diff-based partial-update wire semantics and ignores agentCommand/harnessOverride. This spec pins UI behavior, not wire semantics; the inherit toggle's post-save persistence is covered by B3b's component-level pinning test (inherit-toggle → gate → submit). Extending the mock alongside this spec was deliberately avoided — it would encode assumptions about the very wire semantics B3b re-hosts.

playwright.config.ts (+1 line)

testMatch is an explicit per-file allowlist in both projects — a spec absent from the list silently never runs in CI. Added to the smoke project alongside the other agent/persona specs.

Scope discipline

Verification

  • 3/3 pass locally (--project=smoke), spec resolves via testMatch (--list)
  • tsc, biome, file-size/px-text/pubkey guards clean
  • Cross-reviewed by Pinky: independent verification of the routing finding at source, selector-set match, and his own build + smoke run (channel thread)

Coverage-first slice ahead of the B3b instance-edit re-host: EditAgentDialog
previously had no e2e coverage past dialog-open (the readiness-screenshot
spec opens it for a shot). Written against today's dialog, unmodified, so
the re-host lands guarded by a pre-existing spec.

Three tests via the dialog's only mount path (profile panel Edit action):
- rename → save → reopen asserts persistence through the mock store
- provider + custom model + credential → save → reopen round-trips the model
- routing pin: persona-linked agents open the DEFINITION editor from the
  profile Edit action (handleEditAgent), never EditAgentDialog

Mock-boundary caveat (spec header): the e2eBridge update_managed_agent
handler echoes name/model/systemPrompt/envVars/respondTo only — it does not
model diff-based partial-update wire semantics and ignores agentCommand/
harnessOverride, so the inherit toggle's post-save persistence is component-
test territory (B3b's pinning test), not e2e.

playwright.config.ts gains the one testMatch line (smoke project) — testMatch
is an explicit per-file allowlist, so without it the spec would silently
never run in CI.

Zero src/ changes. Verified: 3/3 pass locally via --project=smoke, spec
listed by testMatch resolution (--list), tsc + biome clean.

Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman merged commit a609e79 into main Jul 8, 2026
25 checks passed
@wesbillman wesbillman deleted the test/edit-agent-e2e branch July 8, 2026 14:04
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