07akioni 1 månad sedan
förälder
incheckning
dd3ea3db2e

+ 4 - 0
apps/web/tests/seeded-history.e2e.ts

@@ -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: 'Couldn’t open file' }).count() > 0) {
+        await page.keyboard.press('Escape')
+      }
       openPath.mockRestore()
     }
   })

+ 1 - 1
packages/client/ui-conversation/tests/apply-inject.client.spec.tsx

@@ -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'] })
     })

+ 1 - 1
packages/client/ui-conversation/tests/chat-view.client.spec.tsx

@@ -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',
         }

+ 1 - 1
packages/client/ui-conversation/tests/views-type-chain.client.spec.tsx

@@ -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