summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/de/test/antennapod
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2019-10-20 21:58:11 +0200
committerByteHamster <info@bytehamster.com>2019-10-20 21:58:11 +0200
commit381732c582546368084eb22aeac9c85cdf0d7b3a (patch)
tree67ba60eb9d5d5d5c1b82466a25cb4b05b351d42b /app/src/androidTest/java/de/test/antennapod
parentf1f91478b6057dbaaaa5255d14dfe254bdc10f1d (diff)
downloadAntennaPod-381732c582546368084eb22aeac9c85cdf0d7b3a.zip
Fixed queue test
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/QueueFragmentTest.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/QueueFragmentTest.java b/app/src/androidTest/java/de/test/antennapod/ui/QueueFragmentTest.java
index 7f0bf8fa2..37d76bb6d 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/QueueFragmentTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/QueueFragmentTest.java
@@ -15,17 +15,20 @@ import org.junit.runner.RunWith;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
+import static androidx.test.espresso.matcher.ViewMatchers.withClassName;
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.endsWith;
/**
- * User interface tests for queue fragment
+ * User interface tests for queue fragment.
*/
@RunWith(AndroidJUnit4.class)
public class QueueFragmentTest {
@Rule
- public IntentsTestRule<MainActivity> mActivityRule = new IntentsTestRule<>(MainActivity.class, false, false);
+ public IntentsTestRule<MainActivity> activityRule = new IntentsTestRule<>(MainActivity.class, false, false);
@Before
public void setUp() {
@@ -33,12 +36,13 @@ public class QueueFragmentTest {
EspressoTestUtils.makeNotFirstRun();
EspressoTestUtils.clearDatabase();
EspressoTestUtils.setLastNavFragment(QueueFragment.TAG);
- mActivityRule.launchActivity(new Intent());
+ activityRule.launchActivity(new Intent());
}
@Test
public void testLockEmptyQueue() {
onView(withContentDescription(R.string.lock_queue)).perform(click());
+ onView(allOf(withClassName(endsWith("Button")), withText(R.string.lock_queue))).perform(click());
onView(withContentDescription(R.string.unlock_queue)).perform(click());
}