mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-12 11:50:22 +03:00
test: unflake "should work with newBrowserCDPSession" (#16765)
There could be no targets in a freshly created browser.
This commit is contained in:
parent
4d892475da
commit
42491ecc08
@ -141,7 +141,9 @@ browserTest('should work with newBrowserCDPSession', async function({ browser })
|
||||
let gotEvent = false;
|
||||
session.on('Target.targetCreated', () => gotEvent = true);
|
||||
await session.send('Target.setDiscoverTargets', { discover: true });
|
||||
const page = await browser.newPage();
|
||||
expect(gotEvent).toBe(true);
|
||||
await page.close();
|
||||
|
||||
await session.detach();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user