mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Render state items in the timeline and as the last message on the home screen. (#473)
* State events in the timeline WIP * Implement membership change strings. * Add other state event types and use in RoomSummaryProvider. Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
This commit is contained in:
@@ -23,7 +23,7 @@ class HomeScreenViewModelTests: XCTestCase {
|
||||
var context: HomeScreenViewModelType.Context!
|
||||
|
||||
@MainActor override func setUpWithError() throws {
|
||||
viewModel = HomeScreenViewModel(userSession: MockUserSession(clientProxy: MockClientProxy(userIdentifier: "@mock:client.com"),
|
||||
viewModel = HomeScreenViewModel(userSession: MockUserSession(clientProxy: MockClientProxy(userID: "@mock:client.com"),
|
||||
mediaProvider: MockMediaProvider()),
|
||||
attributedStringBuilder: AttributedStringBuilder())
|
||||
context = viewModel.context
|
||||
|
||||
@@ -206,7 +206,7 @@ class LoggingTests: XCTestCase {
|
||||
XCTAssertFalse(content.contains(lastMessage))
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
// swiftlint:disable:next function_body_length
|
||||
func testTimelineContentIsRedacted() throws {
|
||||
// Given timeline items that contain text
|
||||
let textAttributedString = "TextAttributed"
|
||||
@@ -275,8 +275,6 @@ class LoggingTests: XCTestCase {
|
||||
XCTAssertTrue(content.contains(fileMessage.id))
|
||||
XCTAssertFalse(content.contains(fileMessage.text))
|
||||
}
|
||||
|
||||
// swiftlint:enable function_body_length
|
||||
|
||||
func testRustMessageContentIsRedacted() throws {
|
||||
// Given message content that contain text
|
||||
|
||||
@@ -21,7 +21,7 @@ import Combine
|
||||
|
||||
final class NotificationManagerTests: XCTestCase {
|
||||
var notificationManager: NotificationManager!
|
||||
private let clientProxy = MockClientProxy(userIdentifier: "@test:user.net")
|
||||
private let clientProxy = MockClientProxy(userID: "@test:user.net")
|
||||
private let notificationCenter = UserNotificationCenterSpy()
|
||||
private var authorizationStatusWasGranted = false
|
||||
private var shouldDisplayInAppNotificationReturnValue = false
|
||||
|
||||
@@ -24,7 +24,7 @@ class SettingsViewModelTests: XCTestCase {
|
||||
var context: SettingsViewModelType.Context!
|
||||
|
||||
@MainActor override func setUpWithError() throws {
|
||||
let userSession = MockUserSession(clientProxy: MockClientProxy(userIdentifier: ""),
|
||||
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: ""),
|
||||
mediaProvider: MockMediaProvider())
|
||||
viewModel = SettingsViewModel(withUserSession: userSession)
|
||||
context = viewModel.context
|
||||
|
||||
@@ -19,7 +19,7 @@ import XCTest
|
||||
|
||||
final class UserSessionTests: XCTestCase {
|
||||
var userSession: UserSession!
|
||||
let clientProxy = MockClientProxy(userIdentifier: "@test:user.net")
|
||||
let clientProxy = MockClientProxy(userID: "@test:user.net")
|
||||
|
||||
private var cancellables: Set<AnyCancellable> = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user