|
|
|
@ -65,8 +65,8 @@ class NotificationRobot {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifyPrivateTabsNotification() {
|
|
|
|
|
mDevice.waitNotNull(Until.hasObject(text("Close private tabs")), waitingTime)
|
|
|
|
|
assertPrivateTabsNotification()
|
|
|
|
|
verifySystemNotificationExists("$appName (Private)")
|
|
|
|
|
verifySystemNotificationExists("Close private tabs")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun clickMediaNotificationControlButton(action: String) {
|
|
|
|
@ -115,7 +115,14 @@ class NotificationRobot {
|
|
|
|
|
class Transition {
|
|
|
|
|
|
|
|
|
|
fun clickClosePrivateTabsNotification(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
|
|
|
|
|
NotificationRobot().verifySystemNotificationExists("Close private tabs")
|
|
|
|
|
try {
|
|
|
|
|
assertTrue(
|
|
|
|
|
closePrivateTabsNotification().exists()
|
|
|
|
|
)
|
|
|
|
|
} catch (e: AssertionError) {
|
|
|
|
|
notificationTray().flingToEnd(1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
closePrivateTabsNotification().click()
|
|
|
|
|
|
|
|
|
|
HomeScreenRobot().interact()
|
|
|
|
@ -129,11 +136,6 @@ fun notificationShade(interact: NotificationRobot.() -> Unit): NotificationRobot
|
|
|
|
|
return NotificationRobot.Transition()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun assertPrivateTabsNotification() {
|
|
|
|
|
mDevice.findObject(UiSelector().text("Firefox Preview (Private)")).exists()
|
|
|
|
|
mDevice.findObject(UiSelector().text("Close private tabs")).exists()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun closePrivateTabsNotification() =
|
|
|
|
|
mDevice.findObject(UiSelector().text("Close private tabs"))
|
|
|
|
|
|
|
|
|
|