Skip to content

Commit 9ced351

Browse files
antonisclaude
andauthored
chore(e2e): Move replaysOnErrorSampleRate out of _experiments (#5601)
* test(e2e): Fix capture replay E2E test failure * test(e2e): Fix replay verification to check correct event fields The E2E test was looking for replay_id in event._dsc.replay_id, but the Sentry API may not include _dsc in the event JSON response. The SDK correctly adds replay_id to event.contexts.replay.replay_id. Changes: - Update sentryApi.js to check event.contexts.replay.replay_id first - Fallback to event._dsc.replay_id for backwards compatibility - Add clear error message if replay_id not found in either location - Add type conversion for LaunchArguments.replaysOnErrorSampleRate to ensure it's always a number (LaunchArguments may return strings) This fixes the iOS E2E test failure that started on Jan 28, 2026 after JS SDK bump to 10.37.0. The issue was not with the SDK (replays work correctly), but with how the test verifies replay attachment. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Reverse test code * Log errors * Revert "Log errors" This reverts commit 604d202. --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 42a723e commit 9ced351

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dev-packages/e2e-tests/patch-scripts/rn.patch.app.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Sentry.init({
2727
release: '${SENTRY_RELEASE}',
2828
dist: '${SENTRY_DIST}',
2929
dsn: 'https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561',
30-
_experiments: {
31-
replaysOnErrorSampleRate: LaunchArguments.value().replaysOnErrorSampleRate,
32-
},
30+
replaysOnErrorSampleRate: LaunchArguments.value().replaysOnErrorSampleRate,
3331
integrations: [
3432
Sentry.mobileReplayIntegration(),
3533
Sentry.feedbackIntegration({

0 commit comments

Comments
 (0)