2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/15115 - Part 9: Fix ui tests for the tabs settings

This commit is contained in:
Gabriel Luong 2020-10-08 11:46:35 -04:00
parent d7a4925a5a
commit 9b8a3401c8
2 changed files with 9 additions and 9 deletions

View File

@ -69,7 +69,7 @@ class SettingsBasicsTest {
verifyBasicsHeading()
verifySearchEngineButton()
verifyDefaultBrowserItem()
verifyCloseTabsItem()
verifyTabsItem()
// drill down to submenu
}.openSearchSubMenu {
verifyDefaultSearchEngineHeader()
@ -175,7 +175,7 @@ class SettingsBasicsTest {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCloseTabsSubMenu {
}.openTabsSubMenu {
verifyOptions()
}
}

View File

@ -51,7 +51,7 @@ class SettingsRobot {
fun verifyAccessibilityButton() = assertAccessibilityButton()
fun verifySetAsDefaultBrowserButton() = assertSetAsDefaultBrowserButton()
fun verifyDefaultBrowserItem() = assertDefaultBrowserItem()
fun verifyCloseTabsItem() = assertCloseTabsItem()
fun verifyTabsItem() = assertTabsItem()
fun verifyDefaultBrowserIsDisaled() = assertDefaultBrowserIsDisabled()
fun clickDefaultBrowserSwitch() = toggleDefaultBrowserSwitch()
fun verifyAndroidDefaultAppsMenuAppears() = assertAndroidDefaultAppsMenuAppears()
@ -135,10 +135,10 @@ class SettingsRobot {
return SettingsSubMenuThemeRobot.Transition()
}
fun openCloseTabsSubMenu(interact: SettingsSubMenuTabsRobot.() -> Unit): SettingsSubMenuTabsRobot.Transition {
fun openTabsSubMenu(interact: SettingsSubMenuTabsRobot.() -> Unit): SettingsSubMenuTabsRobot.Transition {
fun closeTabsButton() = onView(withText("Close tabs"))
closeTabsButton().click()
fun tabsButton() = onView(withText("Tabs"))
tabsButton().click()
SettingsSubMenuTabsRobot().interact()
return SettingsSubMenuTabsRobot.Transition()
@ -297,9 +297,9 @@ private fun assertDefaultBrowserItem() {
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
}
private fun assertCloseTabsItem() {
mDevice.wait(Until.findObject(By.text("Close tabs")), waitingTime)
onView(withText("Close tabs"))
private fun assertTabsItem() {
mDevice.wait(Until.findObject(By.text("Tabs")), waitingTime)
onView(withText("Tabs"))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
}