From ab2b00093e1a40fc8dabd2c95b4bbd576e88e953 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 31 Jul 2018 12:25:12 +0200 Subject: Fixed replies We accidentally ended up stripping newlines --- framework/qml/TextEditor.qml | 2 +- views/composer/tests/tst_composerview.qml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index 45bf2ecd..7dd30625 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml @@ -96,7 +96,7 @@ FocusScope { focus: true selectByMouse: true wrapMode: TextEdit.Wrap - textFormat: Qt.RichText + textFormat: Qt.AutoText onCursorRectangleChanged: flickableItem.ensureVisible(cursorRectangle) color: Kube.Colors.textColor diff --git a/views/composer/tests/tst_composerview.qml b/views/composer/tests/tst_composerview.qml index d3b6a420..74a62630 100644 --- a/views/composer/tests/tst_composerview.qml +++ b/views/composer/tests/tst_composerview.qml @@ -119,7 +119,7 @@ ViewTestCase { mails:[{ resource: "resource1", subject: "subject", - body: "body", + body: "body\nnewline", to: ["to@example.org"], cc: ["cc@example.org"], bcc: ["bcc@example.org"], @@ -134,7 +134,11 @@ ViewTestCase { var subject = findChild(composer, "subject"); verify(subject) tryVerify(function(){ return subject.text == "RE: subject" }) - tryVerify(function(){ return subject.body != "" }) + + var textEditor = findChild(composer, "textEditor"); + verify(textEditor) + var expectedText = "you wrote:\n> body\n> newline" + tryVerify(function(){ return textEditor.text.match(expectedText) }) } function test_5loadHtmlDraft() { -- cgit v1.2.3