[fenix] For https://github.com/mozilla-mobile/fenix/issues/21002 update and add missing tabs setting validations

pull/600/head
AndiAJ 3 years ago committed by mergify[bot]
parent 8681ba904d
commit 3af7f3dfd4

@ -150,17 +150,6 @@ class SettingsBasicsTest {
}
}
@Test
fun changeCloseTabsSetting() {
// Goes through the settings and verified the close tabs setting options.
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openTabsSubMenu {
verifyOptions()
}
}
@Test
fun changeAccessibiltySettings() {
// Goes through the settings and changes the default text on a webpage, then verifies if the text has changed.

@ -1499,11 +1499,13 @@ class SmokeTest {
}
@Test
fun startOnHomeSettingsMenuItemsTest() {
fun tabsSettingsMenuItemsTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openTabsSubMenu {
verifyTabViewOptions()
verifyCloseTabsOptions()
verifyStartOnHomeOptions()
}
}

@ -23,7 +23,9 @@ import org.mozilla.fenix.helpers.click
*/
class SettingsSubMenuTabsRobot {
fun verifyOptions() = assertOptions()
fun verifyTabViewOptions() = assertTabViewOptions()
fun verifyCloseTabsOptions() = assertCloseTabsOptions()
fun verifyStartOnHomeOptions() = assertStartOnHomeOptions()
@ -42,10 +44,21 @@ class SettingsSubMenuTabsRobot {
}
}
private fun assertOptions() {
afterOneDayToggle()
private fun assertTabViewOptions() {
tabViewHeading()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
listToggle()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
gridToggle()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
}
private fun assertCloseTabsOptions() {
closeTabsHeading()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
manuallyToggle()
.check(ViewAssertions.matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
manualToggle()
afterOneDayToggle()
.check(ViewAssertions.matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
afterOneWeekToggle()
.check(ViewAssertions.matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
@ -64,7 +77,15 @@ private fun assertStartOnHomeOptions() {
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
}
private fun manualToggle() = onView(withText("Manually"))
private fun tabViewHeading() = onView(withText("Tab view"))
private fun listToggle() = onView(withText("List"))
private fun gridToggle() = onView(withText("Grid"))
private fun closeTabsHeading() = onView(withText("Close tabs"))
private fun manuallyToggle() = onView(withText("Manually"))
private fun afterOneDayToggle() = onView(withText("After one day"))

Loading…
Cancel
Save