For #8766: Update UI Tests
parent
2bb2061931
commit
169a255c7f
|
@ -46,9 +46,9 @@ class HomeScreenTest {
|
||||||
verifyAddTabButton()
|
verifyAddTabButton()
|
||||||
verifyNoTabsOpenedHeader()
|
verifyNoTabsOpenedHeader()
|
||||||
verifyNoTabsOpenedText()
|
verifyNoTabsOpenedText()
|
||||||
verifyCollectionsHeader()
|
verifyCollectionsHeaderIsNotShown()
|
||||||
verifyNoCollectionsHeader()
|
verifyNoCollectionsHeaderIsNotShown()
|
||||||
verifyNoCollectionsText()
|
verifyNoCollectionsTextIsNotShown()
|
||||||
verifyHomeToolbar()
|
verifyHomeToolbar()
|
||||||
verifyHomeComponent()
|
verifyHomeComponent()
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ class TabbedBrowsingTest {
|
||||||
verifyOpenTabsHeader()
|
verifyOpenTabsHeader()
|
||||||
verifyNoTabsOpenedText()
|
verifyNoTabsOpenedText()
|
||||||
verifyNoTabsOpenedHeader()
|
verifyNoTabsOpenedHeader()
|
||||||
verifyNoCollectionsText()
|
verifyNoCollectionsTextIsNotShown()
|
||||||
verifyNoCollectionsHeader()
|
verifyNoCollectionsHeaderIsNotShown()
|
||||||
verifyAddTabButton()
|
verifyAddTabButton()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,6 +83,8 @@ class TabbedBrowsingTest {
|
||||||
TestAssetHelper.waitingTime
|
TestAssetHelper.waitingTime
|
||||||
)
|
)
|
||||||
verifyExistingTabList()
|
verifyExistingTabList()
|
||||||
|
verifyNoCollectionsHeader()
|
||||||
|
verifyNoCollectionsText()
|
||||||
|
|
||||||
}.openTabsListThreeDotMenu {
|
}.openTabsListThreeDotMenu {
|
||||||
verifyCloseAllTabsButton()
|
verifyCloseAllTabsButton()
|
||||||
|
@ -153,8 +155,8 @@ class TabbedBrowsingTest {
|
||||||
verifyShareTabButton()
|
verifyShareTabButton()
|
||||||
verifySaveCollection()
|
verifySaveCollection()
|
||||||
}.closeAllTabs {
|
}.closeAllTabs {
|
||||||
verifyNoCollectionsHeader()
|
verifyNoCollectionsHeaderIsNotShown()
|
||||||
verifyNoCollectionsText()
|
verifyNoCollectionsTextIsNotShown()
|
||||||
verifyNoTabsOpenedHeader()
|
verifyNoTabsOpenedHeader()
|
||||||
verifyNoTabsOpenedText()
|
verifyNoTabsOpenedText()
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,9 @@ class HomeScreenRobot {
|
||||||
fun verifyCollectionsHeader() = assertCollectionsHeader()
|
fun verifyCollectionsHeader() = assertCollectionsHeader()
|
||||||
fun verifyNoCollectionsHeader() = assertNoCollectionsHeader()
|
fun verifyNoCollectionsHeader() = assertNoCollectionsHeader()
|
||||||
fun verifyNoCollectionsText() = assertNoCollectionsText()
|
fun verifyNoCollectionsText() = assertNoCollectionsText()
|
||||||
|
fun verifyNoCollectionsHeaderIsNotShown() = assertNoCollectionsHeaderIsNotVisible()
|
||||||
|
fun verifyCollectionsHeaderIsNotShown() = assertCollectionsHeaderIsNotVisible()
|
||||||
|
fun verifyNoCollectionsTextIsNotShown() = assertNoCollectionsTextIsNotVisible()
|
||||||
fun verifyNoTabsOpenedHeader() = assertNoTabsOpenedHeader()
|
fun verifyNoTabsOpenedHeader() = assertNoTabsOpenedHeader()
|
||||||
fun verifyHomeWordmark() = assertHomeWordmark()
|
fun verifyHomeWordmark() = assertHomeWordmark()
|
||||||
fun verifyHomeToolbar() = assertHomeToolbar()
|
fun verifyHomeToolbar() = assertHomeToolbar()
|
||||||
|
@ -322,13 +325,29 @@ private fun assertNoCollectionsHeader() =
|
||||||
onView(allOf(withText("No collections")))
|
onView(allOf(withText("No collections")))
|
||||||
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||||
|
|
||||||
|
private fun assertNoCollectionsHeaderIsNotVisible() =
|
||||||
|
onView(allOf(withText("No collections")))
|
||||||
|
.check(doesNotExist())
|
||||||
|
|
||||||
|
private fun assertCollectionsHeaderIsNotVisible() =
|
||||||
|
onView(allOf(withText("Collections")))
|
||||||
|
.check(doesNotExist())
|
||||||
|
|
||||||
private fun assertNoCollectionsText() =
|
private fun assertNoCollectionsText() =
|
||||||
|
onView(
|
||||||
|
allOf(
|
||||||
|
withText("Collect the things that matter to you. To start, save open tabs to a new collection.")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||||
|
|
||||||
|
private fun assertNoCollectionsTextIsNotVisible() =
|
||||||
onView(
|
onView(
|
||||||
allOf(
|
allOf(
|
||||||
withText("Collect the things that matter to you. To start, save open tabs to a new collection.")
|
withText("Collect the things that matter to you. To start, save open tabs to a new collection.")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
.check(doesNotExist())
|
||||||
|
|
||||||
private fun assertHomeComponent() = onView(ViewMatchers.withResourceName("sessionControlRecyclerView"))
|
private fun assertHomeComponent() = onView(ViewMatchers.withResourceName("sessionControlRecyclerView"))
|
||||||
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||||
|
|
Loading…
Reference in New Issue