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
@@ -95,9 +95,17 @@ async function readSelectedFileTreeRows(page) {
result.beforeSelectedRows = await readSelectedFileTreeRows(page);
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,
});