test: search wikilink smoke fixture before opening

This commit is contained in:
冰朔 2026-07-15 17:11:14 +08:00
parent d44149cb88
commit 484ff19bb2

View File

@ -44,6 +44,12 @@ test.describe('Wikilink insertion and navigation', () => {
await page.route('**/api/vault/ping', route => route.fulfill({ status: 503 }))
await page.goto('/', { waitUntil: 'domcontentloaded' })
await page.getByTitle('Search notes').click()
const searchInput = page.getByPlaceholder('Search notes...')
await expect(searchInput).toBeVisible({ timeout: 5000 })
await searchInput.fill(SOURCE_NOTE_TITLE)
await expect(page.getByTestId('note-list-search-loading')).toHaveCount(0)
const noteItem = page.locator('.app__note-list .cursor-pointer').filter({ hasText: SOURCE_NOTE_TITLE }).first()
await expect(noteItem).toBeVisible({ timeout: 10_000 })
await noteItem.click()