Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('waitForWindowCount should wait for window window number increase and decrease', async () => {
const actionPage: ActionsPage = new ActionsPage();
await openUrlInNewTab(actionPage.url);
await waitForWindowCount(2);
await expect(getWindowHandlesCount()).toBe(2);
await closeWindow(1);
await waitForWindowCount(1);
await expect(getWindowHandlesCount()).toBe(1);
});
});
it('waitForWindowCount should wait for window window number increase and decrease', () => {
const actionPage: ActionsPage = new ActionsPage();
openUrlInNewTab(actionPage.url);
waitForWindowCount(2);
closeWindow(1);
waitForWindowCount(1);
});
});