Deflake CloseImeOnDismissPopupDialogTest

In imeLayerAndImeSnapshotVisibleOnScreen, add "isOptional = true" when
verifying IME snapshot isVisible, in case a false alarm flakiness
happens when the IME snapshot surface removed when the popup editor
dialog was dismissed.

Bug: 274653385
Test: atest FlickerTests:CloseImeOnDismissPopupDialogTest
--rerun-until-falure 10 passed on cuttlefish devices.

Change-Id: I61bf11a5b63b5a540e3693f33253b2a599c2142d
This commit is contained in:
Ming-Shin Lu
2023-03-29 12:11:38 +00:00
parent 7473649bdc
commit d51eab2cb4

View File

@@ -66,7 +66,7 @@ open class CloseImeOnDismissPopupDialogTest(flicker: FlickerTest) : BaseTest(fli
flicker.assertLayers {
this.isVisible(ComponentNameMatcher.IME)
.then()
.isVisible(ComponentNameMatcher.IME_SNAPSHOT)
.isVisible(ComponentNameMatcher.IME_SNAPSHOT, isOptional = true)
.then()
.isInvisible(ComponentNameMatcher.IME_SNAPSHOT, isOptional = true)
.isInvisible(ComponentNameMatcher.IME)