fix: reconcile batch b smoke evidence

This commit is contained in:
lix-2026
2026-05-21 11:53:31 +08:00
parent 175b69db79
commit a0823a7e53
18 changed files with 1045 additions and 41 deletions
@@ -126,9 +126,17 @@ async function readFileTreeState(page, documentId, mindmapId) {
}
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
await page.waitForURL((url) => url.pathname.includes(`/mindmap/${encodeURIComponent(doc.documentId)}/${encodeURIComponent(mindmapId)}`), {
timeout: UI_TIMEOUT_MS,
});
await page.waitForFunction(
({ documentId, mindmapId }) => {
const url = new URL(window.location.href);
if (!url.pathname.includes(`/documents/${encodeURIComponent(documentId)}`)) return false;
const rt = url.searchParams.get("resourceTab") || "";
if (!rt) return false;
return decodeURIComponent(rt).includes(`resource:mindmap:${documentId}:${mindmapId}`);
},
{ documentId: doc.documentId, mindmapId },
{ timeout: UI_TIMEOUT_MS },
);
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
timeout: UI_TIMEOUT_MS,
});
@@ -144,9 +152,17 @@ async function readFileTreeState(page, documentId, mindmapId) {
if (!result.afterPage.fileRootStable) recordFailure("page_click_after_mindmap_replaced_sidebar_root", result.afterPage);
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
await page.waitForURL((url) => url.pathname.includes(`/mindmap/${encodeURIComponent(doc.documentId)}/${encodeURIComponent(mindmapId)}`), {
timeout: UI_TIMEOUT_MS,
});
await page.waitForFunction(
({ mindmapId, docId }) => {
const url = new URL(window.location.href);
if (!url.pathname.startsWith("/documents/")) return false;
const rt = url.searchParams.get("resourceTab") || "";
if (!rt) return false;
return decodeURIComponent(rt).includes(`resource:mindmap:${docId}:${mindmapId}`);
},
{ mindmapId, docId: doc.documentId },
{ timeout: UI_TIMEOUT_MS },
);
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
timeout: UI_TIMEOUT_MS,
});