From 01d51d596c4265d5f1743beab061a509db96156f Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 7 Nov 2024 13:32:37 +0000 Subject: [PATCH] test(e2e): Fix react router 6 canary test --- .../test-applications/react-router-6/tests/sse.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts b/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts index 24ae70449ced..b34fc8123899 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts +++ b/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts @@ -66,8 +66,12 @@ test('Waits for sse streaming when sse has been explicitly aborted', async ({ pa expect(resolveBodyDuration).toBe(0); // validate abort error was thrown by inspecting console - const consoleBreadcrumb = rootSpan.breadcrumbs?.find(breadcrumb => breadcrumb.category === 'console'); - expect(consoleBreadcrumb?.message).toBe('Could not fetch sse AbortError: BodyStreamBuffer was aborted'); + expect(rootSpan.breadcrumbs).toContainEqual( + expect.objectContaining({ + category: 'console', + message: 'Could not fetch sse AbortError: BodyStreamBuffer was aborted', + }), + ); }); test('Aborts when stream takes longer than 5s, by not updating the span duration', async ({ page }) => {