Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:white_check_mark: Update mind map clipboard palette selector https://github.com/siyuan-note/siyuan/issues/20877

Daniel4f63f2f581cd
diff --git a/app/src/protyle/render/listMindmap/clipboard.test.ts b/app/src/protyle/render/listMindmap/clipboard.test.ts
index d3dde3f12b..4bad0e653f 100644
--- a/app/src/protyle/render/listMindmap/clipboard.test.ts
+++ b/app/src/protyle/render/listMindmap/clipboard.test.ts
@@ -229,7 +229,8 @@ const browserCases = async (source: string, css: string) => {
check.equal(styleChanges.length, 2);
check.equal(model.metadata.nodes[a.id].lineColor, "#15803d");
check.equal(model.metadata.nodes[b.id].lineColor, "#15803d");
- const nodePalette = host.querySelector<HTMLElement>('.mindmap-view__palette[aria-label="color"]');
+ const nodePalette = host.querySelector<HTMLElement>('.mindmap-view__palette[aria-label="listMindmapNodeColor"]');
+ check.ok(nodePalette, "the node color palette uses its dedicated accessible label");
nodePalette.querySelector<HTMLButtonElement>('[aria-label="default"]').click();
check.equal(view.nodeElements.get(a.id).style.backgroundColor, "rgb(37, 99, 235)",
"resetting manual node colors restores the branch theme");