Update UI tests (#730)

* Update snapshots.

* Fix timeline grouping and UI tests.

* Remove German UI tests with double-length pseudolanguage.

Avoids tests breaking when translations are updated.
This commit is contained in:
Doug
2023-03-28 14:06:53 +01:00
committed by GitHub
parent e1df5310b7
commit d7622ea731
230 changed files with 536 additions and 384 deletions
@@ -128,24 +128,17 @@ struct RoomDetailsScreen: View {
private var securitySection: some View {
Section {
HStack(alignment: .top) {
Label {
VStack(alignment: .leading, spacing: 2) {
Text(L10n.screenRoomDetailsEncryptionEnabledTitle)
Text(L10n.screenRoomDetailsEncryptionEnabledSubtitle)
.foregroundColor(.element.secondaryContent)
.font(.element.footnote)
}
} icon: {
Image(systemName: "lock.shield")
Label {
VStack(alignment: .leading, spacing: 2) {
Text(L10n.screenRoomDetailsEncryptionEnabledTitle)
Text(L10n.screenRoomDetailsEncryptionEnabledSubtitle)
.foregroundColor(.element.secondaryContent)
.font(.element.footnote)
}
.labelStyle(FormRowLabelStyle(alignment: .top))
Spacer()
Image(systemName: "checkmark")
.foregroundColor(.element.quaternaryContent)
} icon: {
Image(systemName: "lock.shield")
}
.labelStyle(FormRowLabelStyle(alignment: .top))
} header: {
Text(L10n.commonSecurity)
.formSectionHeader()
@@ -196,7 +196,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
}
// can be improved by adding a date threshold
return otherEventTimelineItem.properties.reactions.isEmpty && eventTimelineItem.sender == otherEventTimelineItem.sender
return eventTimelineItem.properties.reactions.isEmpty && eventTimelineItem.sender == otherEventTimelineItem.sender
}
private func sendCurrentMessage() async {
@@ -23,14 +23,10 @@ struct MockMediaProvider: MediaProviderProtocol {
return nil
}
#warning("Fix me. this is stupid!")
if let size {
if size == AvatarSize.room(on: .details).scaledSize
|| size == AvatarSize.room(on: .home).scaledSize
|| size == AvatarSize.room(on: .timeline).scaledSize {
return Asset.Images.appLogo.image
}
if source?.url == .picturesDirectory {
return Asset.Images.appLogo.image
}
return UIImage(systemName: "photo")
}
@@ -161,7 +161,7 @@ extension RoomTimelineViewProvider: View {
}
}
private var timelineGroupStyle: TimelineGroupStyle {
var timelineGroupStyle: TimelineGroupStyle {
switch self {
case .text(_, let groupStyle),
.separator(_, let groupStyle),