From 18bdd3f102df8a4743499fb5e2dc2c4d67892ec8 Mon Sep 17 00:00:00 2001 From: Andrey Mukamolov Date: Thu, 18 Jul 2019 17:56:33 +0300 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/2142: Added UI test assertion --- .../java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt index dc92176cbf..56b337ca7b 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt @@ -119,7 +119,7 @@ private fun assertHomePrivateBrowsingButton() = onView(ViewMatchers.withResource private fun assertHomeWordmark() = onView(ViewMatchers.withResourceName("wordmark")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) private fun assertHomeToolbar() = onView(ViewMatchers.withResourceName("toolbar")) - .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) + .check(matches(allOf(withEffectiveVisibility(Visibility.VISIBLE), ViewMatchers.hasFocus()))) private fun assertOpenTabsHeader() = onView(CoreMatchers.allOf(ViewMatchers.withText("Open tabs"))) .check(matches(withEffectiveVisibility(Visibility.VISIBLE)))