mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
added tests for the room header view
This commit is contained in:
@@ -69,13 +69,18 @@ struct RoomHeaderView_Previews: PreviewProvider, TestablePreview {
|
|||||||
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .notVerified)
|
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .notVerified)
|
||||||
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .verified)
|
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .verified)
|
||||||
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .verificationViolation)
|
makeHeader(avatarURL: .mockMXCAvatar, verificationState: .verificationViolation)
|
||||||
|
makeHeader(avatarURL: .mockMXCAvatar,
|
||||||
|
roomSubtitle: "Subtitle",
|
||||||
|
verificationState: .verified)
|
||||||
}
|
}
|
||||||
.previewLayout(.sizeThatFits)
|
.previewLayout(.sizeThatFits)
|
||||||
}
|
}
|
||||||
|
|
||||||
static func makeHeader(avatarURL: URL?,
|
static func makeHeader(avatarURL: URL?,
|
||||||
|
roomSubtitle: String? = nil,
|
||||||
verificationState: UserIdentityVerificationState) -> some View {
|
verificationState: UserIdentityVerificationState) -> some View {
|
||||||
RoomHeaderView(roomName: "Some Room name",
|
RoomHeaderView(roomName: "Some Room name",
|
||||||
|
roomSubtitle: roomSubtitle,
|
||||||
roomAvatar: .room(id: "1",
|
roomAvatar: .room(id: "1",
|
||||||
name: "Some Room Name",
|
name: "Some Room Name",
|
||||||
avatarURL: avatarURL),
|
avatarURL: avatarURL),
|
||||||
|
|||||||
@@ -67,9 +67,6 @@ struct ThreadTimelineScreen: View {
|
|||||||
// Using a button stops it from getting truncated in the navigation bar
|
// Using a button stops it from getting truncated in the navigation bar
|
||||||
.contentShape(.rect)
|
.contentShape(.rect)
|
||||||
}
|
}
|
||||||
if #available(iOS 26, *) {
|
|
||||||
ToolbarSpacer()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var isAtBottomAndLive: Bool {
|
private var isAtBottomAndLive: Bool {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cc0cdc8acbebb3c2baadb2bcb4c7ee71cec89f39453e839e11fe782df6948c93
|
oid sha256:dae344ccfc330c8c842ce441fc614f91f3b00eb502accca23557efd03c9480c1
|
||||||
size 73716
|
size 96968
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cc0cdc8acbebb3c2baadb2bcb4c7ee71cec89f39453e839e11fe782df6948c93
|
oid sha256:dae344ccfc330c8c842ce441fc614f91f3b00eb502accca23557efd03c9480c1
|
||||||
size 73716
|
size 96968
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7e976095d663adc5bd9d2efaabea7428964578f46011e5b5064b3828dac0b939
|
oid sha256:b3ff9854297e3c6dcee4181367080a2ec6192489e66470de043150ac9a10323a
|
||||||
size 56159
|
size 74611
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7e976095d663adc5bd9d2efaabea7428964578f46011e5b5064b3828dac0b939
|
oid sha256:b3ff9854297e3c6dcee4181367080a2ec6192489e66470de043150ac9a10323a
|
||||||
size 56159
|
size 74611
|
||||||
|
|||||||
Reference in New Issue
Block a user