mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user