Commit 08a1e0f7 authored by ekager's avatar ekager
Browse files

For #17906 - Allow screenshots for private home screenshot test

parent a98b4089
......@@ -44,10 +44,14 @@ class DefaultHomeScreenTest : ScreenshotTest() {
SystemClock.sleep(TestAssetHelper.waitingTimeShort)
Screengrab.screenshot("HomeScreenRobot_home-screen")
}.openThreeDotMenu {
}.openSettings { }
}.openSettings {
}.openPrivateBrowsingSubMenu {
clickPrivateModeScreenshotsSwitch()
}
// To get private screenshot,
// dismiss onboarding going to settings and back
mDevice.pressBack()
mDevice.pressBack()
homeScreen {
togglePrivateBrowsingModeOnOff()
Screengrab.screenshot("HomeScreenRobot_private-browsing-menu")
......
......@@ -46,6 +46,8 @@ class SettingsSubMenuPrivateBrowsingRobot {
fun verifyPrivateBrowsingShortcutIcon() = assertPrivateBrowsingShortcutIcon()
fun clickPrivateModeScreenshotsSwitch() = screenshotsInPrivateModeSwitch().click()
fun clickOpenLinksInPrivateTabSwitch() = openLinksInPrivateTabSwitch().click()
fun addPrivateShortcutToHomescreen() {
......@@ -92,6 +94,9 @@ private fun assertNavigationToolBarHeader() {
private fun openLinksInPrivateTabSwitch() =
onView(withText("Open links in a private tab"))
private fun screenshotsInPrivateModeSwitch() =
onView(withText("Allow screenshots in private browsing"))
private fun addPrivateBrowsingShortcutButton() = onView(withText("Add private browsing shortcut"))
private fun goBackButton() = onView(withContentDescription("Navigate up"))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment