From cc78c53093831ee965f8c11f0e7b03272477b4ec Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Wed, 31 Jul 2024 16:13:52 +0200 Subject: [PATCH] use crash helper --- tests/library/page-event-crash.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/library/page-event-crash.spec.ts b/tests/library/page-event-crash.spec.ts index 939eed8134..c4ed7d1b26 100644 --- a/tests/library/page-event-crash.spec.ts +++ b/tests/library/page-event-crash.spec.ts @@ -80,10 +80,10 @@ test('should be able to close context when page crashes', async ({ isAndroid, is await page.context().close(); }); -test('should not hang when page crashed', async ({ page }) => { +test('should not hang when page crashed', async ({ page, crash }) => { test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/31907' }); const expectPromise = expect(page.getByText('child')).toBeVisible(); - await page.goto('chrome://crash').catch(e => {}); + crash(); await expect(expectPromise).rejects.toThrowError(); }); \ No newline at end of file