mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-14 09:58:55 +02:00
Playwright Codegen and CI setup
- 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`).
This commit is contained in:
13
playwright/codegen.ts
Normal file
13
playwright/codegen.ts
Normal file
@ -0,0 +1,13 @@
|
||||
const path = require('path');
|
||||
const { startApp } = require('./electron.ts');
|
||||
|
||||
async function main() {
|
||||
const { app, context } = await startApp();
|
||||
let outputFile = process.argv[2]?.trim();
|
||||
if (outputFile && !/\.(ts|js)$/.test(outputFile)) {
|
||||
outputFile = path.join(__dirname, '../e2e-tests/', outputFile + '.spec.ts');
|
||||
}
|
||||
await context._enableRecorder({ language: 'playwright-test', mode: 'recording', outputFile });
|
||||
}
|
||||
|
||||
main();
|
Reference in New Issue
Block a user