guanghu/tests/smoke/cache-invalidation-vault-open.spec.ts
冰朔 8739805f99
Some checks failed
Auto-update PR branches / Update open PR branches (push) Has been cancelled
CI / Frontend Static Quality Checks (push) Has been cancelled
CI / Frontend Tests & Coverage (push) Has been cancelled
CI / Rust Tests & Quality Checks (push) Has been cancelled
CI / Linux build verification (push) Has been cancelled
Release (Alpha) / Compute alpha version (push) Has been cancelled
Release (Alpha) / Build release artifacts (push) Has been cancelled
Release (Alpha) / GitHub Release (alpha) (push) Has been cancelled
Release (Alpha) / Update docs and release pages (push) Has been cancelled
Deploy docs / Build VitePress site (push) Has been cancelled
Deploy docs / Deploy to GitHub Pages (push) Has been cancelled
光湖开源源码快照 · Tolaria AGPL 分叉基线 · 独立更新链
2026-07-05 17:45:16 +08:00

30 lines
1005 B
TypeScript

import { test, expect } from '@playwright/test'
import { openCommandPalette, findCommand } from './helpers'
test.describe('Cache invalidation on vault open', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/')
await page.waitForLoadState('networkidle')
})
test('vault loads without ghost entries — note list matches mock data', async ({
page,
}) => {
// The note list container should be present and rendered.
// Cache pruning correctness is verified by Rust unit tests (prune_stale_entries).
// Here we just verify the UI renders the note list without crashing.
const noteListContainer = page.locator(
'[data-testid="note-list-container"]',
)
await expect(noteListContainer).toBeVisible({ timeout: 5_000 })
})
test('Reload Vault command is available in command palette', async ({
page,
}) => {
await openCommandPalette(page)
const found = await findCommand(page, 'Reload Vault')
expect(found).toBe(true)
})
})