diff options
author | ByteHamster <info@bytehamster.com> | 2022-05-07 11:10:00 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-05-07 20:45:47 +0200 |
commit | 02197e31b3822d2420a654c03058a62d3b5820db (patch) | |
tree | 9e6598e6261b11dd9d32088d88bb2cca7dd5d56e /app/src/androidTest/java | |
parent | 77ced35dff5b9d398575913e7b751ce2d53f7c6e (diff) | |
download | AntennaPod-02197e31b3822d2420a654c03058a62d3b5820db.zip |
Convert share dialog to bottom sheet
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java b/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java index 29cea18dc..3c32407a5 100644 --- a/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java +++ b/app/src/androidTest/java/de/test/antennapod/dialogs/ShareDialogTest.java @@ -3,27 +3,23 @@ package de.test.antennapod.dialogs; import android.content.Context; import android.content.Intent; import android.view.View; - -import org.hamcrest.Matcher; -import org.hamcrest.Matchers; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - import androidx.test.espresso.intent.rule.IntentsTestRule; -import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.fragment.EpisodesFragment; import de.test.antennapod.EspressoTestUtils; import de.test.antennapod.ui.UITestUtils; +import org.hamcrest.Matcher; +import org.hamcrest.Matchers; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +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.action.ViewActions.scrollTo; -import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.contrib.RecyclerViewActions.actionOnItemAtPosition; import static androidx.test.espresso.matcher.ViewMatchers.hasMinimumChildCount; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; @@ -45,7 +41,6 @@ public class ShareDialogTest { @Rule public IntentsTestRule<MainActivity> activityRule = new IntentsTestRule<>(MainActivity.class, false, false); - private UITestUtils uiTestUtils; protected Context context; @Before @@ -54,7 +49,7 @@ public class ShareDialogTest { EspressoTestUtils.clearPreferences(); EspressoTestUtils.clearDatabase(); EspressoTestUtils.setLastNavFragment(EpisodesFragment.TAG); - uiTestUtils = new UITestUtils(context); + UITestUtils uiTestUtils = new UITestUtils(context); uiTestUtils.setup(); uiTestUtils.addLocalFeedData(true); @@ -73,15 +68,9 @@ public class ShareDialogTest { } @Test - public void testShareDialogDisplayed() throws InterruptedException { + public void testShareDialogDisplayed() { onView(withText(R.string.share_label)).perform(click()); onView(allOf(isDisplayed(), withText(R.string.share_label))); } - @Test - public void testShareDialogCancelButton() { - onView(withText(R.string.share_label)).perform(scrollTo()).perform(click()); - onView(withText(R.string.cancel_label)).check(matches(isDisplayed())).perform(scrollTo()).perform(click()); - } - } |