mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
itch.io: platform and tag filters (#1497)
This commit is contained in:
1 parent
8d66570d33
commit
7b518d7e6a
38 files changed
+198
-3
No files matched your search
@@ -52,6 +52,25 @@ class ItchBrowseTest {
|
||||
assertEquals("pixel-art", ItchBrowse.tagSlug(" Pixel Art "))
|
||||
}
|
||||
|
||||
@Test fun aSortAPricePlatformAndTagCombineInThatOrder() {
|
||||
assertEquals(
|
||||
"https://itch.io/games/top-rated/free/platform-windows/tag-pixel-art.xml",
|
||||
ItchBrowse.url(BrowseQuery(ItchBrowse.SORT_TOP_RATED, ItchBrowse.PRICE_FREE, setOf("windows"), listOf("pixel-art")), 1),
|
||||
)
|
||||
}
|
||||
|
||||
@Test fun severalPlatformsAndTagsAreAllInTheAddress() {
|
||||
assertEquals(
|
||||
"https://itch.io/games/platform-windows/platform-linux/tag-pixel-art/tag-2d",
|
||||
path(platforms = setOf("linux", "windows"), tags = listOf("pixel-art", "2d")),
|
||||
)
|
||||
}
|
||||
|
||||
@Test fun aTypedTagBecomesItsSlug() {
|
||||
assertEquals("visual-novel", ItchBrowse.tagSlug("Visual Novel!"))
|
||||
assertEquals("", ItchBrowse.tagSlug(" !! "))
|
||||
}
|
||||
|
||||
@Test fun theSamePlatformsInAnyOrderGiveTheSameAddress() {
|
||||
assertEquals(path(platforms = setOf("web", "linux")), path(platforms = setOf("linux", "web")))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user