Skip to content

Commit f770714

Browse files
committed
Add disableFlakyComponentsAndWaitForIdle to all the comparators
1 parent 53cb650 commit f770714

File tree

1 file changed

+2
-0
lines changed
  • android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots

1 file changed

+2
-0
lines changed

android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/screenshots/ScreenshotsRule.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class ScreenshotsRule(
6161
rule: ComposeTestRule,
6262
name: String? = null,
6363
) {
64+
disableFlakyComponentsAndWaitForIdle()
6465
rule.waitForIdle()
6566
val bitmap = rule.onRoot().captureToImage().asAndroidBitmap()
6667
compareScreenshot(bitmap, name)
@@ -93,6 +94,7 @@ public class ScreenshotsRule(
9394
bitmap: Bitmap,
9495
name: String? = null,
9596
) {
97+
disableFlakyComponentsAndWaitForIdle()
9698
val resourceName = "${className}_${name ?: testName}.png"
9799
val fileName = "$resourceName.${System.nanoTime()}"
98100
saveScreenshot(fileName, bitmap)

0 commit comments

Comments
 (0)