test: add Playwright smoke test for exact-match search ranking
Verifies that searching "Writing" in Quick Open shows the exact title match first, followed by prefix matches. Also adds Refactoring test entries to mock data and demo vault. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ export interface FlushDeps {
|
||||
savePendingForPath: (path: string) => Promise<boolean>
|
||||
getTabContent: (path: string) => string | undefined
|
||||
isUnsaved: (path: string) => boolean
|
||||
getSavedContent: (path: string) => string | undefined
|
||||
onSaved?: (path: string, content: string) => void
|
||||
}
|
||||
|
||||
@@ -22,7 +21,7 @@ export async function flushEditorContent(path: string, deps: FlushDeps): Promise
|
||||
const tabContent = deps.getTabContent(path)
|
||||
if (tabContent === undefined) return
|
||||
|
||||
if (deps.isUnsaved(path) || tabContent !== deps.getSavedContent(path)) {
|
||||
if (deps.isUnsaved(path)) {
|
||||
await persistContent(path, tabContent)
|
||||
deps.onSaved?.(path, tabContent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user