Skip to content

Commit 7a208e1

Browse files
authored
test(e2e): Unflake replay recording data optional e2e test (getsentry#15168)
Relax the assertion for the replay recording data test so that we allow arbitrary order but still assert on the exact amount and contents of the received recording items. closes getsentry#15167
1 parent 6571e0c commit 7a208e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev-packages/e2e-tests/test-applications/react-send-to-sentry/tests/send-to-sentry.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ test('Sends a Replay recording to Sentry', async ({ browser }) => {
190190

191191
if (response.ok) {
192192
const data = await response.json();
193-
return data[0];
193+
return { data: data[0], length: data[0].length };
194194
}
195195

196196
return response.status;
@@ -199,5 +199,6 @@ test('Sends a Replay recording to Sentry', async ({ browser }) => {
199199
timeout: EVENT_POLLING_TIMEOUT,
200200
},
201201
)
202-
.toEqual(ReplayRecordingData);
202+
// Check that that all expected data is present but relax the order to avoid flakes
203+
.toEqual({ data: expect.arrayContaining(ReplayRecordingData), length: ReplayRecordingData.length });
203204
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy