Native Android client for Spotify, built with Jetpack Compose
Kotlin ad-freeadblockandroidjetpack-composekotlinlyricsmusic-playermusic-videomyspotispotifyspotify-adblockerspotify-clientspotify-connectspotui
A live test reads the What's New feed and checks that every entry is an album or an episode, for both pills
andreiP4083ffe4ba531
diff --git a/base/host-cdp/src/test/kotlin/app/myspoti/host/cdp/LiveDomainsTest.kt b/base/host-cdp/src/test/kotlin/app/myspoti/host/cdp/LiveDomainsTest.ktindex 0d56c8ab..19faabe5 100644--- a/base/host-cdp/src/test/kotlin/app/myspoti/host/cdp/LiveDomainsTest.kt+++ b/base/host-cdp/src/test/kotlin/app/myspoti/host/cdp/LiveDomainsTest.kt@@ -6,6 +6,7 @@ import app.myspoti.api.LibraryFilterimport app.myspoti.api.LibrarySortimport app.myspoti.api.MediaKindimport app.myspoti.api.TimeRange+import app.myspoti.api.WhatsNewContentimport app.myspoti.spotify.SpotifyApiimport kotlinx.coroutines.CoroutineScopeimport kotlinx.coroutines.Dispatchers@@ -77,6 +78,16 @@ class LiveDomainsTest {assertTrue(page.title.isNotBlank() && page.shelves.isNotEmpty())}+ // Reads only: the entries' seen state is left as it was (no markWhatsNewSeen).+ @Test+ fun `what's new feed holds albums and episodes, per pill`() = live {+ val all = api.home.whatsNewFeed(0, 20)+ assertTrue(all.items.all { it.id.isNotBlank() && (it.album != null) != (it.episode != null) })+ assertTrue(all.items.all { it.uri.startsWith("spotify:album:") || it.uri.startsWith("spotify:episode:") })+ assertTrue(api.home.whatsNewFeed(0, 20, WhatsNewContent.MUSIC).items.all { it.album != null })+ assertTrue(api.home.whatsNewFeed(0, 20, WhatsNewContent.PODCASTS).items.all { it.episode != null })+ }+@Testfun `search every tab and recent searches`() = live {assertTrue(api.search.shows("france inter").items.first().kind == MediaKind.SHOW)