From e593e37dd5ba514a52b0bac9af344b4f9aabbdff Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 28 Nov 2019 22:55:11 +0100 Subject: Simplified playback test --- .../java/de/test/antennapod/playback/PlaybackTest.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/src/androidTest/java/de/test/antennapod/playback/PlaybackTest.java b/app/src/androidTest/java/de/test/antennapod/playback/PlaybackTest.java index f9cd3aeeb..be2fc432c 100644 --- a/app/src/androidTest/java/de/test/antennapod/playback/PlaybackTest.java +++ b/app/src/androidTest/java/de/test/antennapod/playback/PlaybackTest.java @@ -38,12 +38,12 @@ import static de.test.antennapod.NthMatcher.nth; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; /** - * test cases for starting and ending playback from the MainActivity and AudioPlayerActivity + * Test cases for starting and ending playback from the MainActivity and AudioPlayerActivity. */ public abstract class PlaybackTest { @@ -317,10 +317,7 @@ public abstract class PlaybackTest { // assert item no longer in queue (needs to wait till skip is asynchronously processed) Awaitility.await() .atMost(1000, MILLISECONDS) - .untilAsserted(() -> { - assertThat("Ensure smart mark as play will lead to the item removed from the queue", - DBReader.getQueue(), not(hasItems(feedItem))); - }); - assertThat(DBReader.getFeedItem(feedItem.getId()).isPlayed(), is(true)); + .until(() -> !DBReader.getQueue().contains(feedItem)); + assertTrue(DBReader.getFeedItem(feedItem.getId()).isPlayed()); } } -- cgit v1.2.3