fix(mcp): adapt e2e node-ops calls to the #413 XOR input of patchNode/insertNode

#413 changed patchNode/insertNode to take { markdown? | node? } (exactly
one), but test-e2e.mjs still passed the raw ProseMirror node directly,
so the e2e-mcp CI job died with the XOR guard error right after the
node_ops seed step. Wrap both call sites in { node: ... }.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 00:08:00 +03:00
parent e670f7498a
commit 3411bda2d1
+3 -2
View File
@@ -316,7 +316,8 @@ async function main() {
const [idA, idB, idC] = seedIds;
// patchNode: replace the middle paragraph; siblings' ids must be unchanged.
await client.patchNode(nid, idB, mkPara(idB, "Bravo PATCHED."));
// #413 XOR input: the raw ProseMirror node goes under the `node` key.
await client.patchNode(nid, idB, { node: mkPara(idB, "Bravo PATCHED.") });
await new Promise((r) => setTimeout(r, 16000));
const afterPatch = (await client.getPageJson(nid)).content;
const patchText = JSON.stringify(afterPatch);
@@ -327,7 +328,7 @@ async function main() {
// insertNode: place a new block after the first paragraph.
await client.insertNode(
nid,
mkPara("nodeops-ins", "Inserted paragraph."),
{ node: mkPara("nodeops-ins", "Inserted paragraph.") },
{ position: "after", anchorNodeId: idA },
);
await new Promise((r) => setTimeout(r, 16000));