Ensure consistent AggregatedReaction screenshots

Different system locales can generate different screenshots, causing CI
to be unhappy. Hardcoding a locale ensures the same date format is
always used.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock
2024-08-22 10:35:19 +01:00
parent 6a9f233283
commit 5529345bf1
3 changed files with 6 additions and 6 deletions

View File

@@ -38,10 +38,10 @@ fun anAggregatedReaction(
count: Int = 1,
isHighlighted: Boolean = false,
): AggregatedReaction {
val timeFormatter = DateFormat.getTimeInstance(DateFormat.SHORT, java.util.Locale.US)
val date = Date(1_689_061_264L)
val senders = buildList {
repeat(count) { index ->
val timeFormatter = DateFormat.getTimeInstance(DateFormat.SHORT)
val date = Date(1_689_061_264L)
add(
AggregatedReactionSender(
senderId = if (isHighlighted && index == 0) userId else UserId("@user$index:server.org"),