fix export snapshot race condition (#2280)
Fixes a race condition with our snapshot export tests that was causing them to be flaky. ### Change Type - [x] `tests` — Changes to any test code only[^2] ### Test Plan - [x] End to end tests
This commit is contained in:
parent
7d699a749f
commit
7c77944951
2 changed files with 4 additions and 2 deletions
|
@ -207,7 +207,7 @@ test.describe('Export snapshots', () => {
|
|||
}
|
||||
|
||||
async function snapshotTest(page: Page) {
|
||||
page.waitForEvent('download').then(async (download) => {
|
||||
const downloadAndSnapshot = page.waitForEvent('download').then(async (download) => {
|
||||
const path = (await download.path()) as string
|
||||
assert(path)
|
||||
await rename(path, path + '.svg')
|
||||
|
@ -230,5 +230,6 @@ test.describe('Export snapshots', () => {
|
|||
})
|
||||
})
|
||||
await page.evaluate(() => (window as any)['tldraw-export']())
|
||||
await downloadAndSnapshot
|
||||
}
|
||||
})
|
||||
|
|
|
@ -15576,7 +15576,7 @@
|
|||
"text": "export interface TLUiContextMenuProps "
|
||||
}
|
||||
],
|
||||
"fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu.tsx",
|
||||
"fileUrlPath": "packages/tldraw/.tsbuild-api/lib/ui/components/ContextMenu.d.ts",
|
||||
"releaseTag": "Public",
|
||||
"name": "TLUiContextMenuProps",
|
||||
"preserveMemberOrder": false,
|
||||
|
@ -15599,6 +15599,7 @@
|
|||
"text": ";"
|
||||
}
|
||||
],
|
||||
"fileUrlPath": "packages/tldraw/src/lib/ui/components/ContextMenu.tsx",
|
||||
"isReadonly": false,
|
||||
"isOptional": false,
|
||||
"releaseTag": "Public",
|
||||
|
|
Loading…
Reference in a new issue