mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-18 14:06:01 +02:00
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 |
||
|---|---|---|
| .. | ||
| @n8n | ||
| cli | ||
| core | ||
| extensions/insights | ||
| frontend | ||
| modules | ||
| node-dev | ||
| nodes-base | ||
| testing | ||
| workflow | ||