mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Seamlessly switch for the RichTextEditor based message composer to the… (#2753)
* Seemlesly switch for the RichTextEditor based message composer to the plain one depending on whether formatting options are enabled or not. * Address PR comments * Fixes #2803 - Add extra padding at the bottom of the composer suggestions list * Update preview test snapshots * Update UI test snapshots
This commit is contained in:
@@ -30,7 +30,6 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
override func setUp() {
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
appSettings.richTextEditorEnabled = true
|
||||
ServiceLocator.shared.register(appSettings: appSettings)
|
||||
wysiwygViewModel = WysiwygComposerViewModel()
|
||||
completionSuggestionServiceMock = CompletionSuggestionServiceMock(configuration: .init())
|
||||
@@ -39,6 +38,8 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
mediaProvider: MockMediaProvider(),
|
||||
appSettings: appSettings,
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock)
|
||||
|
||||
viewModel.context.composerFormattingEnabled = true
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
@@ -94,7 +95,7 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
XCTAssertTrue(viewModel.state.bindings.composerFocused)
|
||||
viewModel.state.composerEmpty = false
|
||||
viewModel.process(viewAction: .sendMessage)
|
||||
XCTAssertTrue(viewModel.state.bindings.composerActionsEnabled)
|
||||
XCTAssertTrue(viewModel.state.bindings.composerFormattingEnabled)
|
||||
}
|
||||
|
||||
func testAlertIsShownAfterLinkAction() {
|
||||
|
||||
Reference in New Issue
Block a user