Skip to content

Commit

Permalink
e2e replay test
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Aug 5, 2024
1 parent 03a948c commit 3c8fac9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/e2e/test/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
10 changes: 10 additions & 0 deletions test/react-native/rn.patch.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ Sentry.init({
release: '${SENTRY_RELEASE}',
dist: '${SENTRY_DIST}',
dsn: 'https://[email protected]/5428561',
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
integrations: [
Sentry.mobileReplayIntegration({
maskAllText: true,
maskAllImages: true,
}),
],
});
`;
const e2eComponentPatch = '<EndToEndTestsScreen />';
Expand Down

0 comments on commit 3c8fac9

Please sign in to comment.