16a28bfd90
Fix a bug that was preventing JPG and webp exports from working. Also: - Re-enable our export snapshot tests which got commented out again - Fix some react act errors when running tests ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix
14 lines
406 B
TypeScript
14 lines
406 B
TypeScript
import { setupWithShapes } from '../shared-e2e'
|
|
import test from './fixtures/fixtures'
|
|
|
|
test.beforeEach(setupWithShapes)
|
|
|
|
test.describe('api', () => {
|
|
for (const format of ['svg', 'png', 'jpeg', 'webp', 'json'] as const) {
|
|
test(`export as ${format}`, async ({ page, api }) => {
|
|
const downloadEvent = page.waitForEvent('download')
|
|
await api.exportAsFormat(format)
|
|
await downloadEvent
|
|
})
|
|
}
|
|
})
|