test(desktop): add edit-agent dialog e2e coverage (Phase 1B.3b-pre)#1628
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
EditAgentDialoghad 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)
PersonaDropdownFieldinteractions (Edit's fields are dropdown-menus, not native selects like Create's).handleEditAgentroutes persona-linked agents to the definition editor (persona-dialog), neverEditAgentDialog. The instance editor is reachable for persona-linked agents only via therequestOpenEditAgentevent (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_agenthandler echoesname/model/systemPrompt/envVars/respondToonly — it does not model the diff-based partial-update wire semantics and ignoresagentCommand/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)
testMatchis 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
src/changes. The spec passes against today'sEditAgentDialogon main, unmodified — findings (the routing discovery) were reported to the channel, not fixed inline.Verification
--project=smoke), spec resolves via testMatch (--list)