import Planka upstream

This commit is contained in:
xiaojibeier
2026-07-18 11:48:22 +08:00
commit c26fd3b190
1564 changed files with 214813 additions and 0 deletions
@@ -0,0 +1,24 @@
import { After, AfterAll, Before, BeforeAll, setDefaultTimeout } from '@cucumber/cucumber';
import { chromium } from 'playwright';
import Config from './Config.js';
setDefaultTimeout(Config.TIMEOUT);
BeforeAll(async () => {
global.browser = await chromium.launch(Config.PLAYWRIGHT);
});
Before(async () => {
global.context = await global.browser.newContext();
global.page = await global.context.newPage();
});
After(async () => {
await global.page.close();
await global.context.close();
});
AfterAll(async () => {
await global.browser.close();
});