Show the crash overlay when the Go loader fails to load
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
127f53d5f5
commit
b34562333b
2 files changed
+16
-5
No files matched your search
@@ -11,10 +11,20 @@ test.beforeEach(async ({ page }) => {
|
||||
page.on('pageerror', e => seen.push(e.message))
|
||||
})
|
||||
|
||||
// Every page ends free of errors, unless it expects them.
|
||||
test.afterEach(async ({ page }) => {
|
||||
if (test.info().annotations.some(a => a.type === 'expects errors')) return
|
||||
expect(pageErrors.get(page)).toEqual([])
|
||||
})
|
||||
|
||||
test('a missing loader shows the crash overlay', async ({ page }) => {
|
||||
test.info().annotations.push({ type: 'expects errors' })
|
||||
await page.route('**/a/wasm_exec.*.js', route => route.abort())
|
||||
await page.goto('/')
|
||||
await expect(page.locator('#over')).toBeVisible()
|
||||
await expect(page.locator('#why')).toContainText('wasm_exec.js did not load.')
|
||||
})
|
||||
|
||||
async function open (page, hash = '') {
|
||||
await page.goto('/' + hash)
|
||||
await page.waitForFunction(() => window.__crychicBoot)
|
||||
|
||||
Reference in new issue
Block a user