mirror of
https://github.com/plankanban/planka.git
synced 2025-08-05 05:25:29 +02:00
parent
ad7fb51cfa
commit
2ee1166747
1557 changed files with 76832 additions and 47042 deletions
|
@ -1,35 +1,24 @@
|
|||
// cucumber.conf.js file
|
||||
import { After, AfterAll, Before, BeforeAll, setDefaultTimeout } from '@cucumber/cucumber';
|
||||
import { chromium } from 'playwright';
|
||||
|
||||
const { Before, BeforeAll, AfterAll, After, setDefaultTimeout } = require('@cucumber/cucumber');
|
||||
const { chromium } = require('playwright');
|
||||
const { deleteProject } = require('./testHelpers/apiHelpers');
|
||||
const config = require('./config');
|
||||
import Config from './Config.js';
|
||||
|
||||
setDefaultTimeout(config.timeout);
|
||||
setDefaultTimeout(Config.TIMEOUT);
|
||||
|
||||
// launch the browser
|
||||
BeforeAll(async function () {
|
||||
global.browser = await chromium.launch({
|
||||
// makes true for CI
|
||||
headless: config.headless,
|
||||
slowMo: config.slowMo,
|
||||
});
|
||||
BeforeAll(async () => {
|
||||
global.browser = await chromium.launch(Config.PLAYWRIGHT);
|
||||
});
|
||||
|
||||
// close the browser
|
||||
AfterAll(async function () {
|
||||
await global.browser.close();
|
||||
});
|
||||
|
||||
// Create a new browser context and page per scenario
|
||||
Before(async function () {
|
||||
Before(async () => {
|
||||
global.context = await global.browser.newContext();
|
||||
global.page = await global.context.newPage();
|
||||
});
|
||||
|
||||
// Cleanup after each scenario
|
||||
After(async function () {
|
||||
await deleteProject();
|
||||
After(async () => {
|
||||
await global.page.close();
|
||||
await global.context.close();
|
||||
});
|
||||
|
||||
AfterAll(async () => {
|
||||
await global.browser.close();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue