diff --git a/test/e2e/test/e2e.test.ts b/test/e2e/test/e2e.test.ts index 5b61c3f1a..cf9b3c1c1 100644 --- a/test/e2e/test/e2e.test.ts +++ b/test/e2e/test/e2e.test.ts @@ -129,6 +129,11 @@ describe('End to end tests for common events', () => { const eventId = await waitForEventId(); const sentryEvent = await fetchEvent(eventId); expect(sentryEvent.eventID).toMatch(eventId); + + expect(sentryEvent.contexts).toBeDefined(); + const replay = sentryEvent.contexts!['replay'] as any; + expect(replay).toBeDefined(); + expect(replay.replay_id.length).toBe(32); }); test('unhandledPromiseRejection', async () => { diff --git a/test/react-native/rn.patch.app.js b/test/react-native/rn.patch.app.js index c32274bfa..614e31ef7 100755 --- a/test/react-native/rn.patch.app.js +++ b/test/react-native/rn.patch.app.js @@ -26,6 +26,16 @@ Sentry.init({ release: '${SENTRY_RELEASE}', dist: '${SENTRY_DIST}', dsn: 'https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561', + _experiments: { + replaysSessionSampleRate: 1.0, + replaysOnErrorSampleRate: 1.0, + }, + integrations: [ + Sentry.mobileReplayIntegration({ + maskAllText: true, + maskAllImages: true, + }), + ], }); `; const e2eComponentPatch = '';