diff options
author | ByteHamster <info@bytehamster.com> | 2022-09-15 20:25:22 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-09-18 19:12:41 +0200 |
commit | cbff160bd549ee4e093491512acd99970cd9a2b6 (patch) | |
tree | 7bb94fe0d4487df1316712adbab1e6d77d788b5e | |
parent | 37b49b1e386be9449f8c093ab0b23c83d4b57ac1 (diff) | |
download | AntennaPod-cbff160bd549ee4e093491512acd99970cd9a2b6.zip |
Extend unit tests
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java | 2 | ||||
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java b/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java index 49a252ea1..58a4a0bb6 100644 --- a/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java +++ b/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java @@ -59,7 +59,7 @@ public class ShareDialogTest { onDrawerItem(withText(R.string.episodes_label)).perform(click()); Matcher<View> allEpisodesMatcher; - allEpisodesMatcher = Matchers.allOf(withId(android.R.id.list), isDisplayed(), hasMinimumChildCount(2)); + allEpisodesMatcher = Matchers.allOf(withId(R.id.recyclerView), isDisplayed(), hasMinimumChildCount(2)); onView(isRoot()).perform(waitForView(allEpisodesMatcher, 1000)); onView(allEpisodesMatcher).perform(actionOnItemAtPosition(0, click())); onView(first(EspressoTestUtils.actionBarOverflow())).perform(click()); diff --git a/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java b/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java index 97c199e26..c0e86d046 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java @@ -81,12 +81,24 @@ public class NavigationDrawerTest { UserPreferences.setHiddenDrawerItems(new ArrayList<>()); activityRule.launchActivity(new Intent()); + // home + openNavDrawer(); + onDrawerItem(withText(R.string.home_label)).perform(click()); + onView(isRoot()).perform(waitForView(allOf(isDescendantOfA(withId(R.id.toolbar)), + withText(R.string.home_label)), 1000)); + // queue openNavDrawer(); onDrawerItem(withText(R.string.queue_label)).perform(click()); onView(isRoot()).perform(waitForView(allOf(isDescendantOfA(withId(R.id.toolbar)), withText(R.string.queue_label)), 1000)); + // Inbox + openNavDrawer(); + onDrawerItem(withText(R.string.inbox_label)).perform(click()); + onView(isRoot()).perform(waitForView(allOf(isDescendantOfA(withId(R.id.toolbar)), + withText(R.string.inbox_label)), 1000)); + // episodes openNavDrawer(); onDrawerItem(withText(R.string.episodes_label)).perform(click()); @@ -143,6 +155,7 @@ public class NavigationDrawerTest { openNavDrawer(); onDrawerItem(withText(R.string.queue_label)).perform(longClick()); onView(withText(R.string.episodes_label)).perform(click()); + onView(withId(R.id.contentPanel)).perform(swipeUp()); onView(withText(R.string.playback_history_label)).perform(click()); onView(withText(R.string.confirm_label)).perform(click()); @@ -160,8 +173,9 @@ public class NavigationDrawerTest { openNavDrawer(); onView(first(withText(R.string.queue_label))).perform(longClick()); - onView(withText(R.string.downloads_label)).perform(click()); onView(withText(R.string.queue_label)).perform(click()); + onView(withId(R.id.contentPanel)).perform(swipeUp()); + onView(withText(R.string.downloads_label)).perform(click()); onView(withText(R.string.confirm_label)).perform(click()); hidden = UserPreferences.getHiddenDrawerItems(); @@ -184,7 +198,7 @@ public class NavigationDrawerTest { onView(allOf(withText(title), isDisplayed())).perform(click()); if (i == 3) { - onView(withId(R.id.select_dialog_listview)).perform(swipeUp()); + onView(withId(R.id.contentPanel)).perform(swipeUp()); } } @@ -206,6 +220,7 @@ public class NavigationDrawerTest { openNavDrawer(); onView(first(withText(R.string.queue_label))).perform(longClick()); + onView(withId(R.id.contentPanel)).perform(swipeUp()); onView(first(withText(R.string.downloads_label))).perform(click()); onView(withText(R.string.confirm_label)).perform(click()); |