mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-27 00:52:27 +08:00
fix test
This commit is contained in:
parent
77946c0f5d
commit
ab696c2b10
@ -138,10 +138,16 @@ test('navigating to download link emits download', async ({ startClient, server,
|
|||||||
res.end('Hello world!');
|
res.end('Hello world!');
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(await client.callTool({
|
const navigateResponse = await client.callTool({
|
||||||
name: 'browser_navigate',
|
name: 'browser_navigate',
|
||||||
arguments: {
|
arguments: {
|
||||||
url: server.PREFIX + 'download',
|
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');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user