Files
bruno/playwright/codegen.ts
ramki-bruno aa911f88f2 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`).
2025-05-12 20:35:05 +05:30

14 lines
438 B
TypeScript

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();