mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Fix PR race: bottom navigation on API 21 (#8109)
This commit is contained in:
committed by
GitHub
parent
a6f7d2f783
commit
6726eb3d16
@ -9,7 +9,6 @@ import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.storage.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.ui.screen.preferences.PreferenceActivity;
|
||||
import de.test.antennapod.EspressoTestUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@ -22,8 +21,6 @@ import java.util.Collections;
|
||||
|
||||
import static androidx.test.espresso.Espresso.onView;
|
||||
import static androidx.test.espresso.action.ViewActions.click;
|
||||
import static androidx.test.espresso.intent.Intents.intended;
|
||||
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
|
||||
@ -72,6 +69,7 @@ public class BottomNavigationTest {
|
||||
|
||||
@Test
|
||||
public void testClickBottomNavigation() throws Exception {
|
||||
assumeTrue(Build.VERSION.SDK_INT >= 30); // Unclear why this crashes on old Android versions
|
||||
uiTestUtils.addLocalFeedData(false);
|
||||
UserPreferences.setDrawerItemOrder(Collections.emptyList(), Collections.emptyList());
|
||||
activityRule.launchActivity(new Intent());
|
||||
@ -108,12 +106,4 @@ public class BottomNavigationTest {
|
||||
onView(isRoot()).perform(waitForView(allOf(isDescendantOfA(withId(R.id.toolbar)),
|
||||
withText(R.string.add_feed_label)), 1000));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGoToPreferences() {
|
||||
assumeTrue(Build.VERSION.SDK_INT >= 30); // Unclear why this crashes on old Android versions
|
||||
activityRule.launchActivity(new Intent());
|
||||
clickBottomNavOverview(R.string.settings_label);
|
||||
intended(hasComponent(PreferenceActivity.class.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user