Pass various.spec.ts, by far the hardest one

This commit is contained in:
49lf
2024-11-22 14:34:32 -05:00
parent a9b78fb2a4
commit 24011dd100
8 changed files with 664 additions and 934 deletions

View File

@ -17,9 +17,14 @@ const save_ = async (file: ModelingAppFile, toastId: string) => {
}
if (window.electron.process.env.IS_PLAYWRIGHT) {
// skip file picker, save to default location
// Skip file picker, save to the test dir downloads directory
const downloadDir = window.electron.join(
window.electron.process.env.TEST_SETTINGS_FILE_KEY,
"downloads-during-playwright",
)
await window.electron.mkdir(downloadDir, { recursive: true })
await window.electron.writeFile(
file.name,
window.electron.join(downloadDir, file.name),
new Uint8Array(file.contents)
)
toast.success(EXPORT_TOAST_MESSAGES.SUCCESS, { id: toastId })