mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Reverting RTE to use SDK markdown when in markdown mode (#2327)
This commit is contained in:
@@ -179,4 +179,18 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
|
||||
try await deferred.fulfill()
|
||||
}
|
||||
|
||||
func testSuggestionsAreIgnoredWhenRTEDisabled() async throws {
|
||||
appSettings.richTextEditorEnabled = false
|
||||
let suggestions: [SuggestionItem] = [.user(item: MentionSuggestionItem(id: "@user_mention_1:matrix.org", displayName: "User 1", avatarURL: nil)),
|
||||
.user(item: MentionSuggestionItem(id: "@user_mention_2:matrix.org", displayName: "User 2", avatarURL: URL.documentsDirectory))]
|
||||
let mockCompletionSuggestionService = CompletionSuggestionServiceMock(configuration: .init(suggestions: suggestions))
|
||||
viewModel = ComposerToolbarViewModel(wysiwygViewModel: wysiwygViewModel,
|
||||
completionSuggestionService: mockCompletionSuggestionService,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock)
|
||||
|
||||
XCTAssertEqual(viewModel.state.suggestions, [])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user