Loading app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -101,6 +102,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -119,6 +121,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -140,6 +143,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -160,6 +164,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -180,6 +185,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -200,6 +206,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -221,6 +228,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading Loading @@ -250,6 +258,7 @@ class HistoryTest { homeScreen { }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -273,6 +282,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -299,6 +309,7 @@ class HistoryTest { }.submitQuery(secondWebPage.url.toString()) { }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading Loading @@ -326,6 +337,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading app/src/androidTest/java/org/mozilla/fenix/ui/robots/HistoryRobot.kt +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ class HistoryRobot { assertEmptyHistoryView() } fun verifyHistoryListExists() = assertHistoryListExists() fun verifyVisitedTimeTitle() { mDevice.waitNotNull( Until.findObject( Loading Loading @@ -131,6 +133,9 @@ private fun assertEmptyHistoryView() = ) .check(matches(withText("No history here"))) private fun assertHistoryListExists() = mDevice.findObject(UiSelector().resourceId("R.id.history_list")).waitForExists(waitingTime) private fun assertVisitedTimeTitle() = onView(withId(R.id.header_title)).check(matches(withText("Today"))) Loading Loading
app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -101,6 +102,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -119,6 +121,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -140,6 +143,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -160,6 +164,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -180,6 +185,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -200,6 +206,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -221,6 +228,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading Loading @@ -250,6 +258,7 @@ class HistoryTest { homeScreen { }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -273,6 +282,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading @@ -299,6 +309,7 @@ class HistoryTest { }.submitQuery(secondWebPage.url.toString()) { }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading Loading @@ -326,6 +337,7 @@ class HistoryTest { mDevice.waitForIdle() }.openThreeDotMenu { }.openHistory { verifyHistoryListExists() historyListIdlingResource = RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list)) IdlingRegistry.getInstance().register(historyListIdlingResource!!) Loading
app/src/androidTest/java/org/mozilla/fenix/ui/robots/HistoryRobot.kt +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ class HistoryRobot { assertEmptyHistoryView() } fun verifyHistoryListExists() = assertHistoryListExists() fun verifyVisitedTimeTitle() { mDevice.waitNotNull( Until.findObject( Loading Loading @@ -131,6 +133,9 @@ private fun assertEmptyHistoryView() = ) .check(matches(withText("No history here"))) private fun assertHistoryListExists() = mDevice.findObject(UiSelector().resourceId("R.id.history_list")).waitForExists(waitingTime) private fun assertVisitedTimeTitle() = onView(withId(R.id.header_title)).check(matches(withText("Today"))) Loading