n8n/packages/frontend
Matsuuu 3a047157f1
test(editor): Harden AgentBuilderView MCP-toggle tests against a dropped toggle (no-changelog)
Both MCP-toggle tests fail intermittently on master with `Number of calls: 0`
on the autosave spy (4 of the last 5 Frontend shard-1 failures), which reads as
"the debounce never fired" and sends you looking at the fake clock.

The fake clock is fine. What the assertion cannot distinguish is the case where
the toggle was never accepted: the view renders the editor column as soon as
`initialize()` settles — including the path where the agent failed to load,
since `initialized` is set in the `finally` — and `onToggleMcpAccess` then
returns early on a null agent, leaving nothing queued and nothing to flush.

So assert both preconditions the tests were taking on trust: that the agent is
loaded before emitting, and that the toggle was registered (`agentAvailableInMcp`
flips) before advancing the clock or switching agents. A mount problem now
reports itself at the mount instead of as a spy with zero calls, and neither
test depends on one tick being enough.

https://linear.app/n8n/issue/TRUST-402
2026-08-14 13:05:40 +03:00
..
@n8n feat(editor): Split workflow review inbox sections (#36216) 2026-08-14 08:53:49 +00:00
editor-ui test(editor): Harden AgentBuilderView MCP-toggle tests against a dropped toggle (no-changelog) 2026-08-14 13:05:40 +03:00
AGENTS.md refactor(editor): Retire useDebounce re-export shim (no-changelog) (#34566) 2026-07-21 12:48:52 +00:00
CLAUDE.md chore: Move to AGENTS.md file with agent instructions (#22227) 2025-11-25 12:41:53 +01:00