diff options
author | ByteHamster <info@bytehamster.com> | 2019-12-02 15:49:57 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-12-12 09:47:16 +0100 |
commit | 376600d5b4c41f6167d5d4161a7ef8e3a132d715 (patch) | |
tree | a740703cb837839476f2e5a00a2ef54d4048249f /app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java | |
parent | 51442cb047ef47c0ddaf922ffb559804e4100fa8 (diff) | |
download | AntennaPod-376600d5b4c41f6167d5d4161a7ef8e3a132d715.zip |
Read current media from preferences instead of activity->fragment->controller
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java index bdcad215d..0784cb078 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java @@ -29,10 +29,12 @@ import static androidx.test.espresso.contrib.ActivityResultMatchers.hasResultCod import static androidx.test.espresso.intent.Intents.intended; import static androidx.test.espresso.intent.Intents.times; import static androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent; +import static androidx.test.espresso.matcher.ViewMatchers.isRoot; import static androidx.test.espresso.matcher.ViewMatchers.withId; import static androidx.test.espresso.matcher.ViewMatchers.withText; import static de.test.antennapod.EspressoTestUtils.clickPreference; import static de.test.antennapod.EspressoTestUtils.openNavDrawer; +import static de.test.antennapod.EspressoTestUtils.waitForView; import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -79,7 +81,7 @@ public class MainActivityTest { onView(withText(R.string.confirm_label)).perform(scrollTo(), click()); Espresso.closeSoftKeyboard(); onView(withText(R.string.subscribe_label)).perform(click()); - intended(hasComponent(MainActivity.class.getName()), times(2)); + onView(isRoot()).perform(waitForView(withId(R.id.butShowSettings), 5000)); } private String getActionbarTitle() { |