BrowsingInteractions

object BrowsingInteractions

Interactions for instrumented tests involving the panels to browse media of the stock media frontend.

This object contains ready-to-use Espresso, ViewInteractions and waiters for media browsing panels of the stock media frontend, such as the root browsing panel with category tabs.

See SearchPanelInteractions and PlaylistPanelInteractions for more interactions related to browsing.

Properties

Link copied to clipboard
val thatIsAnyDisplayedMediaContainer: Matcher<View>

Matcher for any MediaContentView displayed while browsing a source.

Link copied to clipboard
val thatIsBrowsingContainer: Matcher<View>

Matcher for a MediaContentView displaying normal browsable content (e.g. not a playlist) while browsing a source.

Link copied to clipboard
val thatIsMediaSearchButton: Matcher<View>

Matcher for a 'search' button in the root browsing panel of a source. Used to open the search panel.

Link copied to clipboard
val thatIsNavigationBarBreadcrumbs: Matcher<View>

Matcher for the navigation breadcrumbs container while browsing a source.

Functions

Link copied to clipboard
fun browseToMediaItem(title: String): ViewInteraction

ViewInteraction to browse to the browsable media item with title, such as an album or playlist, which is currently shown by any MediaContentView.

Link copied to clipboard
fun selectTab(withName: String): ViewInteraction

ViewInteraction to select a tab in the root browsing panel of a source.

Link copied to clipboard
fun tapSearchEntryPoint(): ViewInteraction

ViewInteraction to tap a 'search' button in the root browsing panel of a source.

Link copied to clipboard
fun thatIsDisplayedCategoryTab(withName: String): Matcher<View>

Matcher for a tab withName shown in the root browsing panel of a source.

Link copied to clipboard
fun thatIsVisibleMediaItem(title: String): Matcher<View>

Matcher for any media item container, displayed inside a MediaContentView, whose title is title.

Link copied to clipboard
fun thatIsVisibleMediaItemWithSubstring(substring: String): Matcher<View>

Matcher for any media item container, displayed inside a MediaContentView, whose title contains substring.

Link copied to clipboard
fun waitForCategoryTabs(names: List<String>, selectedIndex: Int)

Helper method to expect specific tab names and a selectedIndex in the root browsing panel of a source.

Link copied to clipboard
fun waitForDisplayedMediaBrowser(): ViewInteraction

ViewInteraction to expect any type of media browsing panel to be displayed.