mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1822050 - Verify HTTPS summary updates in UI tests
This commit is contained in:
parent
5913d09770
commit
479fbd0206
@ -68,6 +68,8 @@ class SettingsHTTPSOnlyModeTest {
|
||||
allTabsOptionSelected = true,
|
||||
privateTabsOptionSelected = false,
|
||||
)
|
||||
}.goBack {
|
||||
verifyHTTPSOnlyModeSummary("On in all tabs")
|
||||
exitMenu()
|
||||
}
|
||||
navigationToolbar {
|
||||
@ -127,6 +129,8 @@ class SettingsHTTPSOnlyModeTest {
|
||||
allTabsOptionSelected = false,
|
||||
privateTabsOptionSelected = true,
|
||||
)
|
||||
}.goBack {
|
||||
verifyHTTPSOnlyModeSummary("On in private tabs")
|
||||
exitMenu()
|
||||
}
|
||||
navigationToolbar {
|
||||
@ -183,6 +187,8 @@ class SettingsHTTPSOnlyModeTest {
|
||||
}.openHttpsOnlyModeMenu {
|
||||
clickHttpsOnlyModeSwitch()
|
||||
verifyHttpsOnlyModeIsEnabled(false)
|
||||
}.goBack {
|
||||
verifyHTTPSOnlyModeSummary("Off")
|
||||
exitMenu()
|
||||
}
|
||||
navigationToolbar {
|
||||
|
@ -60,7 +60,7 @@ class SettingsTest {
|
||||
}.goBack {
|
||||
// HTTPS-Only Mode
|
||||
verifyHTTPSOnlyModeButton()
|
||||
verifyHTTPSOnlyModeState("Off")
|
||||
verifyHTTPSOnlyModeSummary("Off")
|
||||
|
||||
// ENHANCED TRACKING PROTECTION
|
||||
verifyEnhancedTrackingProtectionButton()
|
||||
|
@ -87,7 +87,13 @@ class SettingsRobot {
|
||||
fun verifyPrivacyHeading() = assertPrivacyHeading()
|
||||
|
||||
fun verifyHTTPSOnlyModeButton() = assertHTTPSOnlyModeButton()
|
||||
fun verifyHTTPSOnlyModeState(state: String) = assertHTTPSOnlyModeState(state)
|
||||
fun verifyHTTPSOnlyModeSummary(HTTPSOnlyModeSummary: String) =
|
||||
onView(
|
||||
allOf(
|
||||
withText(R.string.preferences_https_only_title),
|
||||
hasSibling(withText(HTTPSOnlyModeSummary)),
|
||||
),
|
||||
).check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||
fun verifyEnhancedTrackingProtectionButton() = assertEnhancedTrackingProtectionButton()
|
||||
fun verifyLoginsAndPasswordsButton() = assertLoginsAndPasswordsButton()
|
||||
fun verifyEnhancedTrackingProtectionState(option: String) =
|
||||
@ -440,15 +446,6 @@ private fun assertHTTPSOnlyModeButton() {
|
||||
).check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||
}
|
||||
|
||||
private fun assertHTTPSOnlyModeState(state: String) {
|
||||
onView(
|
||||
allOf(
|
||||
withText(R.string.preferences_https_only_title),
|
||||
hasSibling(withText(state)),
|
||||
),
|
||||
).check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
|
||||
}
|
||||
|
||||
private fun assertEnhancedTrackingProtectionButton() {
|
||||
mDevice.wait(Until.findObject(By.text("Privacy and Security")), waitingTime)
|
||||
onView(withId(R.id.recycler_view)).perform(
|
||||
|
Loading…
Reference in New Issue
Block a user