diff --git a/e2e/playwright/projects.spec.ts b/e2e/playwright/projects.spec.ts index ca014cb2e..6aba2a6bd 100644 --- a/e2e/playwright/projects.spec.ts +++ b/e2e/playwright/projects.spec.ts @@ -147,9 +147,6 @@ test.describe('Can export from electron app', () => { const u = await getUtils(page) page.on('console', console.log) - await electronApp.context().addInitScript(async () => { - ;(window as any).playwrightSkipFilePicker = true - }) const pointOnModel = { x: 630, y: 280 } diff --git a/src/lib/exportSave.ts b/src/lib/exportSave.ts index f21d94140..8d7701ef7 100644 --- a/src/lib/exportSave.ts +++ b/src/lib/exportSave.ts @@ -14,7 +14,7 @@ const save_ = async (file: ModelingAppFile) => { extensions.push(extension) } - if (!(window as any).playwrightSkipFilePicker) { + if (window.electron.process.env.IS_PLAYWRIGHT) { // skip file picker, save to default location await window.electron.writeFile( file.name,