From 113d6091d91a3aac1f9a59ff6c5e07610ed59859 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Wed, 8 Feb 2023 21:36:11 +0100 Subject: [PATCH] fixed the issue that prevented the avatar of the room to be displayed in the mocks, and updated the tests --- ElementX/Sources/Services/Media/MockMediaProvider.swift | 2 +- .../de-DE-iPad-9th-generation.roomEncryptedWithAvatar.png | 4 ++-- .../Application/de-DE-iPhone-14.roomEncryptedWithAvatar.png | 4 ++-- .../en-GB-iPad-9th-generation.roomEncryptedWithAvatar.png | 4 ++-- .../Application/en-GB-iPhone-14.roomEncryptedWithAvatar.png | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ElementX/Sources/Services/Media/MockMediaProvider.swift b/ElementX/Sources/Services/Media/MockMediaProvider.swift index 23e39d08a2..9e65aa95a2 100644 --- a/ElementX/Sources/Services/Media/MockMediaProvider.swift +++ b/ElementX/Sources/Services/Media/MockMediaProvider.swift @@ -19,7 +19,7 @@ import UIKit struct MockMediaProvider: MediaProviderProtocol { func imageFromSource(_ source: MediaSourceProxy?, size: CGSize?) -> UIImage? { - nil + return imageFromURL(source?.url, size: size) } func loadImageFromSource(_ source: MediaSourceProxy, size: CGSize?) async -> Result { diff --git a/UITests/Sources/__Snapshots__/Application/de-DE-iPad-9th-generation.roomEncryptedWithAvatar.png b/UITests/Sources/__Snapshots__/Application/de-DE-iPad-9th-generation.roomEncryptedWithAvatar.png index c8d49fd9f7..48b98f8c62 100644 --- a/UITests/Sources/__Snapshots__/Application/de-DE-iPad-9th-generation.roomEncryptedWithAvatar.png +++ b/UITests/Sources/__Snapshots__/Application/de-DE-iPad-9th-generation.roomEncryptedWithAvatar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32e747c2a8b7b7cd5aeee2f8e50f26ef2af0bf03d2fd4a89e25fad0104687fcf -size 211496 +oid sha256:4687a8dd1909ff3b8e309dbaf8f6adf07bb18c39cd1d0b890d0220ca3da9e330 +size 222368 diff --git a/UITests/Sources/__Snapshots__/Application/de-DE-iPhone-14.roomEncryptedWithAvatar.png b/UITests/Sources/__Snapshots__/Application/de-DE-iPhone-14.roomEncryptedWithAvatar.png index e2de30f70c..c79b17ff4d 100644 --- a/UITests/Sources/__Snapshots__/Application/de-DE-iPhone-14.roomEncryptedWithAvatar.png +++ b/UITests/Sources/__Snapshots__/Application/de-DE-iPhone-14.roomEncryptedWithAvatar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ba4ef4f768e1c44c0e058db23dc97e8a50516af2a2001fc5f433abf16aeac1a -size 366658 +oid sha256:144c168d55608c3d15ea3f952374fee7f0750bffddaa57847f23166e2a395b68 +size 345783 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomEncryptedWithAvatar.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomEncryptedWithAvatar.png index d14bd95100..d948781a87 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomEncryptedWithAvatar.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomEncryptedWithAvatar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:874b7aafe67bc385648ffdfce0d6fa8b75899dcd923de24a97b2d9a5246d4e9e -size 210847 +oid sha256:a0129e1b6f13fbd21d167be2903217600653f4ddef38388ad6da6ba14c55fa38 +size 222460 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomEncryptedWithAvatar.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomEncryptedWithAvatar.png index 96429918c7..f03b123b08 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomEncryptedWithAvatar.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomEncryptedWithAvatar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa7c6d90c7f8021a1131a5c5db0f15aaf282548642cd97aeecac8574969771d3 -size 366679 +oid sha256:2bb1114f2446389241e47b57c5c345c2fda25f0e4068d8dfa3b611dcf9563ac9 +size 346522