Fix some existing tests after changes
This commit is contained in:
parent
38c4e42846
commit
5a40144a24
7 changed files with 19 additions and 16 deletions
|
|
@ -47,7 +47,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 600,
|
||||
density = 1f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -62,7 +62,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 900,
|
||||
density = 1.5f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -77,7 +77,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 1200,
|
||||
density = 2f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600@2x.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -92,7 +92,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 1800,
|
||||
density = 3f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/800x600@2x.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -107,7 +107,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 2048,
|
||||
density = 1f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/2048x1024.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/2048x1024.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -119,7 +119,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 4096,
|
||||
density = 1f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x2048.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x2048.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -131,7 +131,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 2048,
|
||||
density = 2f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x512@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x512@2x.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -143,7 +143,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 4096,
|
||||
density = 2f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/512x1024@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/512x1024@2x.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -155,7 +155,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = Int.MAX_VALUE,
|
||||
density = 2f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x1024@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/1024x1024@2x.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -170,7 +170,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 0,
|
||||
density = 1f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -182,7 +182,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = 0,
|
||||
density = 2f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0@2x.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0@2x.webp?key=anApiKey&attribution=topright")
|
||||
|
||||
assertThat(
|
||||
builder.build(
|
||||
|
|
@ -194,6 +194,6 @@ class MapTilerStaticMapUrlBuilderTest {
|
|||
height = Int.MIN_VALUE,
|
||||
density = 1f,
|
||||
)
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0.webp?key=anApiKey&attribution=bottomleft")
|
||||
).isEqualTo("https://base.url/aLightMapId/static/-4.56,1.23,7.8/0x0.webp?key=anApiKey&attribution=topright")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
@file:Suppress("COMPOSE_APPLIER_CALL_MISMATCH")
|
||||
|
||||
package io.element.android.features.location.impl.share
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class DefaultPinnedMessagesBannerFormatterTest {
|
|||
ImageMessageType(body, null, null, MediaSource("url"), null),
|
||||
StickerMessageType(body, null, null, MediaSource("url"), null),
|
||||
FileMessageType(body, null, null, MediaSource("url"), null),
|
||||
LocationMessageType(body, "geo:1,2", null),
|
||||
LocationMessageType(body, "geo:1,2", null, null),
|
||||
NoticeMessageType(body, null),
|
||||
EmoteMessageType(body, null),
|
||||
OtherMessageType(msgType = "a_type", body = body),
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ class DefaultRoomLatestEventFormatterTest {
|
|||
ImageMessageType(body, null, null, MediaSource("url"), null),
|
||||
StickerMessageType(body, null, null, MediaSource("url"), null),
|
||||
FileMessageType(body, null, null, MediaSource("url"), null),
|
||||
LocationMessageType(body, "geo:1,2", null),
|
||||
LocationMessageType(body, "geo:1,2", null, null),
|
||||
NoticeMessageType(body, null),
|
||||
EmoteMessageType(body, null),
|
||||
OtherMessageType(msgType = "a_type", body = body),
|
||||
|
|
|
|||
|
|
@ -355,6 +355,7 @@ class InReplyToMetadataKtTest {
|
|||
body = "body",
|
||||
geoUri = "geo:3.0,4.0;u=5.0",
|
||||
description = null,
|
||||
assetType = null
|
||||
)
|
||||
)
|
||||
).metadata(hideImage = false)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class DefaultEventItemFactoryTest {
|
|||
EmoteMessageType("", null),
|
||||
NoticeMessageType("", null),
|
||||
OtherMessageType("", ""),
|
||||
LocationMessageType("", "", null),
|
||||
LocationMessageType("", "", null, null),
|
||||
TextMessageType("", null)
|
||||
)
|
||||
messageTypes.forEach {
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ class DefaultNotifiableEventResolverTest {
|
|||
AN_EVENT_ID to Result.success(aNotificationData(
|
||||
content = NotificationContent.MessageLike.RoomMessage(
|
||||
senderId = A_USER_ID_2,
|
||||
messageType = LocationMessageType("Location", "geo:1,2", null),
|
||||
messageType = LocationMessageType("Location", "geo:1,2", null, null),
|
||||
),
|
||||
))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue