mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 20:01:28 +00:00
- Improved the Codegen setup - Removed the app-launch related boilerplate from tests - Enable recording mode by default - Option to provide the test file name to save the recording - Added GitHub workflow to run Playwright tests with Electron in Headless mode(mocking display using `xvfb`).
24 lines
634 B
TypeScript
24 lines
634 B
TypeScript
import { test as baseTest, ElectronApplication, Page } from '@playwright/test';
|
|
|
|
const { startApp } = require('./electron.ts');
|
|
|
|
export const test = baseTest.extend<{ page: Page }, { electronApp: ElectronApplication }>({
|
|
electronApp: [
|
|
async ({}, use) => {
|
|
const { app: electronApp, context } = await startApp();
|
|
|
|
await use(electronApp);
|
|
await context.close();
|
|
await electronApp.close();
|
|
},
|
|
{ scope: 'worker' }
|
|
],
|
|
page: async ({ electronApp }, use) => {
|
|
const page = await electronApp.firstWindow();
|
|
await use(page);
|
|
await page.reload();
|
|
}
|
|
});
|
|
|
|
export * from '@playwright/test'
|