Fix some existing tests after changes
This commit is contained in:
parent
461b1c0e52
commit
7c6a5638ad
7 changed files with 19 additions and 16 deletions
|
|
@ -47,7 +47,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 600,
|
height = 600,
|
||||||
density = 1f,
|
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
|
@Test
|
||||||
|
|
@ -62,7 +62,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 900,
|
height = 900,
|
||||||
density = 1.5f,
|
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
|
@Test
|
||||||
|
|
@ -77,7 +77,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 1200,
|
height = 1200,
|
||||||
density = 2f,
|
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
|
@Test
|
||||||
|
|
@ -92,7 +92,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 1800,
|
height = 1800,
|
||||||
density = 3f,
|
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
|
@Test
|
||||||
|
|
@ -107,7 +107,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 2048,
|
height = 2048,
|
||||||
density = 1f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -119,7 +119,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 4096,
|
height = 4096,
|
||||||
density = 1f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -131,7 +131,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 2048,
|
height = 2048,
|
||||||
density = 2f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -143,7 +143,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 4096,
|
height = 4096,
|
||||||
density = 2f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -155,7 +155,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = Int.MAX_VALUE,
|
height = Int.MAX_VALUE,
|
||||||
density = 2f,
|
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
|
@Test
|
||||||
|
|
@ -170,7 +170,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 0,
|
height = 0,
|
||||||
density = 1f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -182,7 +182,7 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = 0,
|
height = 0,
|
||||||
density = 2f,
|
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(
|
assertThat(
|
||||||
builder.build(
|
builder.build(
|
||||||
|
|
@ -194,6 +194,6 @@ class MapTilerStaticMapUrlBuilderTest {
|
||||||
height = Int.MIN_VALUE,
|
height = Int.MIN_VALUE,
|
||||||
density = 1f,
|
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.
|
* 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
|
package io.element.android.features.location.impl.share
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ class DefaultPinnedMessagesBannerFormatterTest {
|
||||||
ImageMessageType(body, null, null, MediaSource("url"), null),
|
ImageMessageType(body, null, null, MediaSource("url"), null),
|
||||||
StickerMessageType(body, null, null, MediaSource("url"), null),
|
StickerMessageType(body, null, null, MediaSource("url"), null),
|
||||||
FileMessageType(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),
|
NoticeMessageType(body, null),
|
||||||
EmoteMessageType(body, null),
|
EmoteMessageType(body, null),
|
||||||
OtherMessageType(msgType = "a_type", body = body),
|
OtherMessageType(msgType = "a_type", body = body),
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ class DefaultRoomLatestEventFormatterTest {
|
||||||
ImageMessageType(body, null, null, MediaSource("url"), null),
|
ImageMessageType(body, null, null, MediaSource("url"), null),
|
||||||
StickerMessageType(body, null, null, MediaSource("url"), null),
|
StickerMessageType(body, null, null, MediaSource("url"), null),
|
||||||
FileMessageType(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),
|
NoticeMessageType(body, null),
|
||||||
EmoteMessageType(body, null),
|
EmoteMessageType(body, null),
|
||||||
OtherMessageType(msgType = "a_type", body = body),
|
OtherMessageType(msgType = "a_type", body = body),
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,7 @@ class InReplyToMetadataKtTest {
|
||||||
body = "body",
|
body = "body",
|
||||||
geoUri = "geo:3.0,4.0;u=5.0",
|
geoUri = "geo:3.0,4.0;u=5.0",
|
||||||
description = null,
|
description = null,
|
||||||
|
assetType = null
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
).metadata(hideImage = false)
|
).metadata(hideImage = false)
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ class DefaultEventItemFactoryTest {
|
||||||
EmoteMessageType("", null),
|
EmoteMessageType("", null),
|
||||||
NoticeMessageType("", null),
|
NoticeMessageType("", null),
|
||||||
OtherMessageType("", ""),
|
OtherMessageType("", ""),
|
||||||
LocationMessageType("", "", null),
|
LocationMessageType("", "", null, null),
|
||||||
TextMessageType("", null)
|
TextMessageType("", null)
|
||||||
)
|
)
|
||||||
messageTypes.forEach {
|
messageTypes.forEach {
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ class DefaultNotifiableEventResolverTest {
|
||||||
AN_EVENT_ID to Result.success(aNotificationData(
|
AN_EVENT_ID to Result.success(aNotificationData(
|
||||||
content = NotificationContent.MessageLike.RoomMessage(
|
content = NotificationContent.MessageLike.RoomMessage(
|
||||||
senderId = A_USER_ID_2,
|
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