diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-04-28 22:11:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 22:11:37 +0200 |
commit | 257c3bca5e57d3e692d5f8ee086432ec2b6edf82 (patch) | |
tree | 0186c0310cd99aceb47029ef710e66404096a061 | |
parent | 35817876bfc8ba774f2badce73bdada1cd45048d (diff) | |
download | AntennaPod-257c3bca5e57d3e692d5f8ee086432ec2b6edf82.zip |
Fix tests creating FeedItems just once because of duplicate IDs (#7148)
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/ui/TextOnlyFeedsTest.java | 2 | ||||
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/TextOnlyFeedsTest.java b/app/src/androidTest/java/de/test/antennapod/ui/TextOnlyFeedsTest.java index 60621f058..69a8f98ce 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/TextOnlyFeedsTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/TextOnlyFeedsTest.java @@ -66,7 +66,7 @@ public class TextOnlyFeedsTest { onDrawerItem(withText(feed.getTitle())).perform(click()); onView(withText(feed.getItemAtIndex(0).getTitle())).perform(click()); onView(isRoot()).perform(waitForView(withText(R.string.mark_read_no_media_label), 3000)); - onView(withText(R.string.mark_read_no_media_label)).perform(click()); + onView(allOf(withText(R.string.mark_read_no_media_label), isDisplayed())).perform(click()); onView(isRoot()).perform(waitForView(allOf(withText(R.string.mark_read_no_media_label), not(isDisplayed())), 3000)); } diff --git a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java index 979d527f6..eb681cbca 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java @@ -128,13 +128,13 @@ public class UITestUtils { // create items List<FeedItem> items = new ArrayList<>(); for (int j = 0; j < NUM_ITEMS_PER_FEED; j++) { - FeedItem item = new FeedItem(j, "Feed " + (i+1) + ": Item " + (j+1), "item" + j, + FeedItem item = new FeedItem(0, "Feed " + (i+1) + ": Item " + (j+1), "item" + j, "http://example.com/feed" + i + "/item/" + j, new Date(), FeedItem.UNPLAYED, feed); items.add(item); if (!hostTextOnlyFeeds) { File mediaFile = newMediaFile("feed-" + i + "-episode-" + j + ".mp3"); - item.setMedia(new FeedMedia(j, item, 0, 0, mediaFile.length(), "audio/mp3", null, hostFile(mediaFile), false, null, 0, 0)); + item.setMedia(new FeedMedia(0, item, 0, 0, mediaFile.length(), "audio/mp3", null, hostFile(mediaFile), false, null, 0, 0)); } } feed.setItems(items); |