Fix replacesLayer assertion to account for splashscreen layer

Bug: 271553459

Test: atest FlickerTests
Change-Id: Ie399c7333dc7af8c31a144e5e497c7abd96c5d6e
This commit is contained in:
Pablo Gamito
2023-03-03 16:50:47 +00:00
parent dd6e25cdd5
commit 43f5994b18

View File

@@ -317,7 +317,8 @@ fun FlickerTest.replacesLayer(
assertion.then().isVisible(ComponentNameMatcher.SNAPSHOT, isOptional = true)
}
if (ignoreSplashscreen) {
assertion.then().isSplashScreenVisibleFor(newLayer, isOptional = true)
assertion.then().isSplashScreenVisibleFor(
ComponentNameMatcher(newLayer.packageName, className = ""), isOptional = true)
}
assertion.then().isVisible(newLayer)