debian-image-builder-frontend/playwright/fixtures/popupHandler.ts
regexowl 3f35101f68 Migrate ESLint to v 9.x
This bumps needed dependencies and migrates previously used ESLint configs to the new flat config schema.
2025-07-15 13:39:36 +00:00

18 lines
464 B
TypeScript

import { test as base } from '@playwright/test';
import { closePopupsIfExist } from '../helpers/helpers';
export interface PopupHandlerFixture {
popupHandler: void;
}
// This fixture will close any popups that might get opened during the test execution
export const test = base.extend<PopupHandlerFixture>({
popupHandler: [
async ({ page }, use) => {
await closePopupsIfExist(page);
await use(undefined);
},
{ auto: true },
],
});