Loading app/src/androidTest/java/org/mozilla/fenix/helpers/TestHelper.kt +0 −21 Original line number Diff line number Diff line Loading @@ -12,11 +12,6 @@ import android.os.Build import android.os.Environment import androidx.preference.PreferenceManager import androidx.test.espresso.Espresso.onView import androidx.test.espresso.ViewAction import androidx.test.espresso.action.CoordinatesProvider import androidx.test.espresso.action.GeneralClickAction import androidx.test.espresso.action.Press import androidx.test.espresso.action.Tap import androidx.test.espresso.action.ViewActions.longClick import androidx.test.espresso.assertion.ViewAssertions import androidx.test.espresso.matcher.ViewMatchers.withId Loading Loading @@ -108,22 +103,6 @@ object TestHelper { } } fun sendSingleTapToScreen(x: Int, y: Int): ViewAction? { return GeneralClickAction( Tap.SINGLE, CoordinatesProvider { view -> val screenPos = IntArray(2) view.getLocationOnScreen(screenPos) val screenX = screenPos[0] + x.toFloat() val screenY = screenPos[1] + y.toFloat() floatArrayOf(screenX, screenY) }, Press.FINGER, 0, 0 ) } // Remove test file from the device Downloads folder @Suppress("Deprecation") fun deleteDownloadFromStorage(fileName: String) { Loading app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt +0 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import org.junit.Test import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.sendSingleTapToScreen import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar Loading Loading @@ -254,8 +253,6 @@ class TabbedBrowsingTest { notificationShade { verifyPrivateTabsNotification() }.clickClosePrivateTabsNotification { // Tap an empty spot on the app homescreen to make sure it's into focus sendSingleTapToScreen(20, 20) verifyHomeScreen() } } Loading app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt +4 −1 Original line number Diff line number Diff line Loading @@ -486,8 +486,11 @@ private fun assertFocusedNavigationToolbar() = onView(allOf(withHint("Search or enter address"))) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) private fun assertHomeScreen() = onView(ViewMatchers.withResourceName("homeLayout")) private fun assertHomeScreen() { mDevice.findObject(UiSelector().resourceId("$packageName:id/homeLayout")).waitForExists(waitingTime) onView(ViewMatchers.withResourceName("homeLayout")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) } private fun assertHomeMenu() = onView(ViewMatchers.withResourceName("menuButton")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) Loading app/src/androidTest/java/org/mozilla/fenix/ui/robots/NotificationRobot.kt +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ class NotificationRobot { fun clickClosePrivateTabsNotification(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition { NotificationRobot().verifySystemNotificationExists("Close private tabs") closePrivateTabsNotification().clickAndWaitForNewWindow() closePrivateTabsNotification().click() HomeScreenRobot().interact() return HomeScreenRobot.Transition() Loading Loading
app/src/androidTest/java/org/mozilla/fenix/helpers/TestHelper.kt +0 −21 Original line number Diff line number Diff line Loading @@ -12,11 +12,6 @@ import android.os.Build import android.os.Environment import androidx.preference.PreferenceManager import androidx.test.espresso.Espresso.onView import androidx.test.espresso.ViewAction import androidx.test.espresso.action.CoordinatesProvider import androidx.test.espresso.action.GeneralClickAction import androidx.test.espresso.action.Press import androidx.test.espresso.action.Tap import androidx.test.espresso.action.ViewActions.longClick import androidx.test.espresso.assertion.ViewAssertions import androidx.test.espresso.matcher.ViewMatchers.withId Loading Loading @@ -108,22 +103,6 @@ object TestHelper { } } fun sendSingleTapToScreen(x: Int, y: Int): ViewAction? { return GeneralClickAction( Tap.SINGLE, CoordinatesProvider { view -> val screenPos = IntArray(2) view.getLocationOnScreen(screenPos) val screenX = screenPos[0] + x.toFloat() val screenY = screenPos[1] + y.toFloat() floatArrayOf(screenX, screenY) }, Press.FINGER, 0, 0 ) } // Remove test file from the device Downloads folder @Suppress("Deprecation") fun deleteDownloadFromStorage(fileName: String) { Loading
app/src/androidTest/java/org/mozilla/fenix/ui/TabbedBrowsingTest.kt +0 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import org.junit.Test import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.helpers.TestAssetHelper import org.mozilla.fenix.helpers.TestHelper.sendSingleTapToScreen import org.mozilla.fenix.ui.robots.browserScreen import org.mozilla.fenix.ui.robots.homeScreen import org.mozilla.fenix.ui.robots.navigationToolbar Loading Loading @@ -254,8 +253,6 @@ class TabbedBrowsingTest { notificationShade { verifyPrivateTabsNotification() }.clickClosePrivateTabsNotification { // Tap an empty spot on the app homescreen to make sure it's into focus sendSingleTapToScreen(20, 20) verifyHomeScreen() } } Loading
app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt +4 −1 Original line number Diff line number Diff line Loading @@ -486,8 +486,11 @@ private fun assertFocusedNavigationToolbar() = onView(allOf(withHint("Search or enter address"))) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) private fun assertHomeScreen() = onView(ViewMatchers.withResourceName("homeLayout")) private fun assertHomeScreen() { mDevice.findObject(UiSelector().resourceId("$packageName:id/homeLayout")).waitForExists(waitingTime) onView(ViewMatchers.withResourceName("homeLayout")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) } private fun assertHomeMenu() = onView(ViewMatchers.withResourceName("menuButton")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) Loading
app/src/androidTest/java/org/mozilla/fenix/ui/robots/NotificationRobot.kt +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ class NotificationRobot { fun clickClosePrivateTabsNotification(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition { NotificationRobot().verifySystemNotificationExists("Close private tabs") closePrivateTabsNotification().clickAndWaitForNewWindow() closePrivateTabsNotification().click() HomeScreenRobot().interact() return HomeScreenRobot.Transition() Loading