diff options
author | Jonas Kalderstam <jonas@cowboyprogrammer.org> | 2020-11-16 11:29:11 +0100 |
---|---|---|
committer | Jonas Kalderstam <jonas@cowboyprogrammer.org> | 2021-02-05 11:15:22 +0100 |
commit | 08edd151f9bc01873128fa97c948841b65b6455c (patch) | |
tree | dd44dccccd873ecf2e5a4da49ef6d050fe72fddf /app/src/androidTest | |
parent | 9924952e2f33cca36f44463426d63411d56edfe5 (diff) | |
download | AntennaPod-08edd151f9bc01873128fa97c948841b65b6455c.zip |
Added new cleanup option: when not favorited
This is another way of solving #2077.
The root issue is that queued episodes are never auto-deleted
currently which means that if you automatically add episodes to the
queue you will eventually end up with AntennaPod refusing to auto
download more episodes because the cache is full and it can't make
space.
This option will only refuse to delete favorited items. Otherwise it
will simply delete the oldest episodes.
Diffstat (limited to 'app/src/androidTest')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java index 3cdb09605..bba546a88 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java @@ -15,6 +15,7 @@ import de.danoeh.antennapod.core.storage.APCleanupAlgorithm; import de.danoeh.antennapod.core.storage.APNullCleanupAlgorithm; import de.danoeh.antennapod.core.storage.APQueueCleanupAlgorithm; import de.danoeh.antennapod.core.storage.EpisodeCleanupAlgorithm; +import de.danoeh.antennapod.core.storage.ExceptFavoriteCleanupAlgorithm; import de.danoeh.antennapod.fragment.EpisodesFragment; import de.danoeh.antennapod.fragment.QueueFragment; import de.danoeh.antennapod.fragment.SubscriptionFragment; @@ -372,6 +373,17 @@ public class PreferencesTest { } @Test + public void testEpisodeCleanupFavoriteOnly() { + clickPreference(R.string.network_pref); + onView(withText(R.string.pref_automatic_download_title)).perform(click()); + onView(withText(R.string.pref_episode_cleanup_title)).perform(click()); + onView(isRoot()).perform(waitForView(withText(R.string.episode_cleanup_except_favorite_removal), 1000)); + onView(withText(R.string.episode_cleanup_except_favorite_removal)).perform(click()); + Awaitility.await().atMost(1000, MILLISECONDS) + .until(() -> UserPreferences.getEpisodeCleanupAlgorithm() instanceof ExceptFavoriteCleanupAlgorithm); + } + + @Test public void testEpisodeCleanupQueueOnly() { clickPreference(R.string.network_pref); onView(withText(R.string.pref_automatic_download_title)).perform(click()); |