Skip to content

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

:test_tube: Synchronize document title test doubles https://github.com/siyuan-note/siyuan/issues/19938

Daniel31e7aefc279d
diff --git a/app/src/protyle/hint/dailyNoteRef.test.ts b/app/src/protyle/hint/dailyNoteRef.test.ts
index e2505a58cd..cfa2578d9f 100644
--- a/app/src/protyle/hint/dailyNoteRef.test.ts
+++ b/app/src/protyle/hint/dailyNoteRef.test.ts
@@ -24,7 +24,7 @@ test("typing a slash in reference search does not run title replacement or show
Constants: {ZWSP: "\u200b"}, Lute: {Caret: "caret", UnEscapeHTMLStr: (text: string) => text},
getEditorRange: () => ({startContainer: block}), hasClosestBlock: () => block,
isEncryptedBox: () => false, getDailyNoteHints: async (): Promise<IHintData[]> => [],
- replaceFileName: () => assert.fail("typing a query sanitized a document title"),
+ normalizeDocumentTitle: () => assert.fail("typing a query sanitized a document title"),
fetchPost: (path: string, request: {k: string}, callback: (response: unknown) => void) => {
assert.equal(path, "/api/search/searchRefBlock");
assert.equal(request.k, "10/");
diff --git a/app/tests/avRichTextEditor.test.js b/app/tests/avRichTextEditor.test.js
index 37b12ded40..9e34046307 100644
--- a/app/tests/avRichTextEditor.test.js
+++ b/app/tests/avRichTextEditor.test.js
@@ -28,7 +28,6 @@ const runCases = async (sources) => {
callback({code: 0, data: {newDoc: true, k: "New document", blocks: []}});
},
Lute: {UnEscapeHTMLStr: value => value, Caret: "caret"},
- replaceFileName: value => value,
getDailyNoteHints: async () => [],
Constants: {ZWSP: "\u200b"},
};
diff --git a/app/tests/newRefDocAtPath.test.js b/app/tests/newRefDocAtPath.test.js
index 1161efbde0..7108d8ddf2 100644
--- a/app/tests/newRefDocAtPath.test.js
+++ b/app/tests/newRefDocAtPath.test.js
@@ -50,7 +50,7 @@ const fixture = () => {
fetchSyncPost: (url, data) => new Promise(resolve => requests.push({url, data, cb: resolve})),
focusByRange: value => focused.push(value),
getEditorRange: () => range,
- replaceFileName: value => value,
+ normalizeDocumentTitle: value => value,
validateName: () => true,
hideElements: () => {},
shouldCaptureHintUndoFocus: () => true,