Skip to content

Commit 3fa3510

Browse files
authored
test(v8/e2e): Unflake replay recording data optional e2e test (#15168) (#15172)
v8 backport of #15168
1 parent fe0272a commit 3fa3510

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

+3-2
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)