From ab696c2b1089de0af24e774a933595a78adf357a Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 11 Jun 2025 15:10:17 +0200 Subject: [PATCH] fix test --- tests/files.spec.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/files.spec.ts b/tests/files.spec.ts index 3653bca..eedbdc5 100644 --- a/tests/files.spec.ts +++ b/tests/files.spec.ts @@ -138,10 +138,16 @@ test('navigating to download link emits download', async ({ startClient, server, res.end('Hello world!'); }); - expect(await client.callTool({ + const navigateResponse = await client.callTool({ name: 'browser_navigate', arguments: { url: server.PREFIX + 'download', }, - })).toContainTextContent('### Downloads'); + }); + if (process.platform === 'win32') { + // windows is racy, downloads might arrive after the snapshot + await expect.poll(() => client.callTool({ name: 'browser_snapshot' })).toContainTextContent('### Downloads'); + } else { + expect(navigateResponse).toContainTextContent('### Downloads'); + } });