wip
This commit is contained in:
@@ -22,19 +22,21 @@ export class ElectronTestHarness {
|
||||
async launch(): Promise<void> {
|
||||
// Path to the built Electron app entry point
|
||||
const electronEntryPath = path.join(__dirname, '../../../apps/companion/dist/main/main.cjs');
|
||||
|
||||
|
||||
// Launch Electron app with the compiled entry file
|
||||
// Note: Playwright may have compatibility issues with certain Electron versions
|
||||
// regarding --remote-debugging-port flag
|
||||
this.app = await electron.launch({
|
||||
const launchOptions: any = {
|
||||
args: [electronEntryPath],
|
||||
env: {
|
||||
...process.env,
|
||||
...Object.fromEntries(Object.entries(process.env).filter(([_, v]) => v !== undefined)),
|
||||
NODE_ENV: 'test',
|
||||
},
|
||||
// Try to disable Chrome DevTools Protocol features that might conflict
|
||||
executablePath: process.env.ELECTRON_EXECUTABLE_PATH,
|
||||
});
|
||||
};
|
||||
if (process.env.ELECTRON_EXECUTABLE_PATH) {
|
||||
launchOptions.executablePath = process.env.ELECTRON_EXECUTABLE_PATH;
|
||||
}
|
||||
this.app = await electron.launch(launchOptions);
|
||||
|
||||
// Wait for first window (renderer process)
|
||||
this.mainWindow = await this.app.firstWindow({
|
||||
|
||||
Reference in New Issue
Block a user