fix export logic (#3769)

* fix export logic

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-09-04 13:12:16 -07:00
committed by GitHub
parent 84fae12cdd
commit 892e856471
2 changed files with 1 additions and 4 deletions

View File

@ -147,9 +147,6 @@ test.describe('Can export from electron app', () => {
const u = await getUtils(page) const u = await getUtils(page)
page.on('console', console.log) page.on('console', console.log)
await electronApp.context().addInitScript(async () => {
;(window as any).playwrightSkipFilePicker = true
})
const pointOnModel = { x: 630, y: 280 } const pointOnModel = { x: 630, y: 280 }

View File

@ -14,7 +14,7 @@ const save_ = async (file: ModelingAppFile) => {
extensions.push(extension) extensions.push(extension)
} }
if (!(window as any).playwrightSkipFilePicker) { if (window.electron.process.env.IS_PLAYWRIGHT) {
// skip file picker, save to default location // skip file picker, save to default location
await window.electron.writeFile( await window.electron.writeFile(
file.name, file.name,