mirror of
https://github.com/plankanban/planka.git
synced 2025-08-04 13:05:24 +02:00
32 lines
737 B
JavaScript
32 lines
737 B
JavaScript
|
// cucumber.conf.js file
|
||
|
|
||
|
const { Before, BeforeAll, AfterAll, After, setDefaultTimeout } = require('@cucumber/cucumber');
|
||
|
const { chromium } = require('playwright');
|
||
|
|
||
|
setDefaultTimeout(60000);
|
||
|
|
||
|
// launch the browser
|
||
|
BeforeAll(async function () {
|
||
|
global.browser = await chromium.launch({
|
||
|
headless: false,
|
||
|
slowMo: 1000,
|
||
|
});
|
||
|
});
|
||
|
|
||
|
// close the browser
|
||
|
AfterAll(async function () {
|
||
|
await global.browser.close();
|
||
|
});
|
||
|
|
||
|
// Create a new browser context and page per scenario
|
||
|
Before(async function () {
|
||
|
global.context = await global.browser.newContext();
|
||
|
global.page = await global.context.newPage();
|
||
|
});
|
||
|
|
||
|
// Cleanup after each scenario
|
||
|
After(async function () {
|
||
|
await global.page.close();
|
||
|
await global.context.close();
|
||
|
});
|