Skip to content

Commit b5eb64d

Browse files
committed
skipping replay in test when running on gh
1 parent fb88c1f commit b5eb64d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

  • sentry-android-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android

sentry-android-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/UserFeedbackUiTest.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ class UserFeedbackUiTest : BaseUiTest() {
479479
// because it would block the espresso interactions (button click)
480480
it.feedbackOptions.onSubmitSuccess = SentryFeedbackCallback { relayIdlingResource.increment(); relayIdlingResource.increment() }
481481
// Let's capture a replay, so we can check the replayId in the feedback
482-
it.sessionReplay.sessionSampleRate = 1.0
482+
483+
// GH actions emulator don't allow capturing screenshots properly
484+
it.sessionReplay.sessionSampleRate = if (BuildConfig.ENVIRONMENT != "github") 1.0 else 0.0
483485
}
484486

485487
showDialogAndCheck {
@@ -503,9 +505,13 @@ class UserFeedbackUiTest : BaseUiTest() {
503505
assertEquals("Description filled", feedback.message)
504506
// The screen name should be set in the url
505507
assertEquals("io.sentry.uitest.android.EmptyActivity", feedback.url)
506-
// The current replay should be set in the replayId
507-
assertNotNull(feedback.replayId)
508-
assertEquals(Sentry.getCurrentScopes().options.replayController.replayId, feedback.replayId)
508+
509+
// GH actions emulator don't allow capturing screenshots properly
510+
if (BuildConfig.ENVIRONMENT != "github") {
511+
// The current replay should be set in the replayId
512+
assertNotNull(feedback.replayId)
513+
assertEquals(Sentry.getCurrentScopes().options.replayController.replayId, feedback.replayId)
514+
}
509515
}
510516
}
511517
}

0 commit comments

Comments
 (0)