This commit is contained in:
07akioni
2026-08-18 19:31:12 +08:00
parent 2442e63360
commit dd3ea3db2e
4 changed files with 7 additions and 3 deletions
+4
View File
@@ -440,6 +440,10 @@ describe('web e2e: seeded history renders through cold resume', () => {
timeout: 5_000,
}).toBe(0)
} finally {
// Shared page: a leftover mask blocks later cases even when this one fails.
if (await page.getByRole('dialog', { name: 'Couldnt open file' }).count() > 0) {
await page.keyboard.press('Escape')
}
openPath.mockRestore()
}
})
@@ -233,7 +233,7 @@ describe('conversation slot inject API', () => {
it('openFile (chat view face) resolves against session cwd and calls workspaces.openPath', async () => {
const b = await bench()
const { injected } = b.chatViewApi(ROOT)
injected.openFile('src/a.ts')
await injected.openFile('src/a.ts')
await vi.waitFor(() => {
expect(b.runtime.workspaces.calls).toContainEqual({ method: 'openPath', args: ['/proj/src/a.ts'] })
})
@@ -348,7 +348,7 @@ describe('Chat node rendering', () => {
resolve: (value) => {
if (value !== 'report.html') return undefined
return {
open: () => { h.openFile(`for-seq-${String(owner.seq)}/site/report.html`) },
open: () => { void h.openFile(`for-seq-${String(owner.seq)}/site/report.html`) },
label: '打开 site/report.html',
title: 'site/report.html',
}
@@ -45,7 +45,7 @@ describe('view-ring type negatives (compile-time; body never runs)', () => {
// @ts-expect-error openDetails takes a SelectionTarget, not a string
props.openDetails('nope')
// @ts-expect-error openFile takes a path string, not a SelectionTarget
props.openFile({ turnSeq: 1, callId: 'c' })
void props.openFile({ turnSeq: 1, callId: 'c' })
return null
}
void chatProps