From 970cdd99054ac6e6b983c7f5664c5b6c5524107d Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Thu, 9 Jan 2020 13:28:53 -0800 Subject: Add summary to main settings/preferences screen (#3745) --- .../java/de/test/antennapod/ui/PreferencesTest.java | 18 +++++++++--------- app/src/main/res/xml/preferences.xml | 5 +++++ core/src/main/res/values/strings.xml | 5 +++++ 3 files changed, 19 insertions(+), 9 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 a68afbc2e..7d3972378 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java @@ -164,7 +164,7 @@ public class PreferencesTest { @Test public void testHeadPhonesDisconnect() { - onView(withText(R.string.playback_pref)).perform(click()); + clickPreference(R.string.playback_pref); final boolean pauseOnHeadsetDisconnect = UserPreferences.isPauseOnHeadsetDisconnect(); onView(withText(R.string.pref_pauseOnHeadsetDisconnect_title)).perform(click()); Awaitility.await().atMost(1000, MILLISECONDS) @@ -176,7 +176,7 @@ public class PreferencesTest { @Test public void testHeadPhonesReconnect() { - onView(withText(R.string.playback_pref)).perform(click()); + clickPreference(R.string.playback_pref); if (!UserPreferences.isPauseOnHeadsetDisconnect()) { onView(withText(R.string.pref_pauseOnHeadsetDisconnect_title)).perform(click()); Awaitility.await().atMost(1000, MILLISECONDS) @@ -193,7 +193,7 @@ public class PreferencesTest { @Test public void testBluetoothReconnect() { - onView(withText(R.string.playback_pref)).perform(click()); + clickPreference(R.string.playback_pref); if (!UserPreferences.isPauseOnHeadsetDisconnect()) { onView(withText(R.string.pref_pauseOnHeadsetDisconnect_title)).perform(click()); Awaitility.await().atMost(1000, MILLISECONDS) @@ -222,7 +222,7 @@ public class PreferencesTest { @Test public void testAutoDelete() { - onView(withText(R.string.storage_pref)).perform(click()); + clickPreference(R.string.storage_pref); final boolean autoDelete = UserPreferences.isAutoDelete(); onView(withText(R.string.pref_auto_delete_title)).perform(click()); Awaitility.await().atMost(1000, MILLISECONDS) @@ -245,7 +245,7 @@ public class PreferencesTest { @Test public void testPauseForInterruptions() { - onView(withText(R.string.playback_pref)).perform(click()); + clickPreference(R.string.playback_pref); final boolean pauseForFocusLoss = UserPreferences.shouldPauseForFocusLoss(); clickPreference(R.string.pref_pausePlaybackForFocusLoss_title); Awaitility.await().atMost(1000, MILLISECONDS) @@ -257,7 +257,7 @@ public class PreferencesTest { @Test public void testDisableUpdateInterval() { - onView(withText(R.string.network_pref)).perform(click()); + clickPreference(R.string.network_pref); onView(withText(R.string.pref_autoUpdateIntervallOrTime_title)).perform(click()); onView(withText(R.string.pref_autoUpdateIntervallOrTime_Disable)).perform(click()); Awaitility.await().atMost(1000, MILLISECONDS) @@ -385,7 +385,7 @@ public class PreferencesTest { @Test public void testEpisodeCleanupQueueOnly() { - onView(withText(R.string.network_pref)).perform(click()); + 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_queue_removal), 1000)); @@ -396,7 +396,7 @@ public class PreferencesTest { @Test public void testEpisodeCleanupNeverAlg() { - onView(withText(R.string.network_pref)).perform(click()); + 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(withId(R.id.select_dialog_listview)).perform(swipeUp()); @@ -407,7 +407,7 @@ public class PreferencesTest { @Test public void testEpisodeCleanupClassic() { - onView(withText(R.string.network_pref)).perform(click()); + 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_after_listening), 1000)); diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 37707ead6..6e734f789 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -12,26 +12,31 @@ Storage + Episode auto delete, Export, Import Project Queue Integrations + External services Automation Details Import/Export @@ -366,7 +368,9 @@ Keep episodes when they are marked Favorite Keep Favorite Episodes Playback + Headphone controls, Skip intervals, Queue Network + Update interval, Download controls, Mobile data Update Interval or Time of Day Specify an interval or a specific time of day to refresh the feeds automatically You can set an interval like \"every 2 hours\", set a specific time of day like \"7:00 AM\" or disable automatic updates altogether.\n\nPlease note: Update times are inexact. You may encounter a short delay. @@ -389,6 +393,7 @@ Episode download Streaming User Interface + Appearance, Subscription order, Lockscreen Select Theme Set Navigation Drawer items Change which items appear in the navigation drawer. -- cgit v1.2.3