summaryrefslogtreecommitdiffstats
path: root/framework/qml/tests/tst_texteditor.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-10-06 09:57:20 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-10-06 10:41:24 +0200
commited277f30c8a95eadfc4a351b032ded333783e3b5 (patch)
treec29278dc04ac6166f5fdc32b24db73542112455b /framework/qml/tests/tst_texteditor.qml
parent44f1baac26944c1c5061fadf163846958095a425 (diff)
downloadkube-ed277f30c8a95eadfc4a351b032ded333783e3b5.tar.gz
kube-ed277f30c8a95eadfc4a351b032ded333783e3b5.zip
TextEditor html conversion and testrunner
Diffstat (limited to 'framework/qml/tests/tst_texteditor.qml')
-rw-r--r--framework/qml/tests/tst_texteditor.qml46
1 files changed, 46 insertions, 0 deletions
diff --git a/framework/qml/tests/tst_texteditor.qml b/framework/qml/tests/tst_texteditor.qml
new file mode 100644
index 00000000..21ebe642
--- /dev/null
+++ b/framework/qml/tests/tst_texteditor.qml
@@ -0,0 +1,46 @@
1/*
2 * Copyright 2017 Christian Mollekopf <mollekopf@kolabsystems.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20import QtQuick 2.7
21import QtTest 1.0
22import org.kube.framework 1.0 as Kube
23
24
25TestCase {
26 id: testCase
27 width: 400
28 height: 400
29 name: "TextEditor"
30
31 Kube.TextEditor {
32 id: editor
33 initialText: "Foobar"
34 htmlEnabled: false
35 }
36
37 function test_1initialText() {
38 compare(editor.text, editor.initialText)
39 }
40
41 function test_2htmlConversion() {
42 editor.htmlEnabled = true
43 editor.htmlEnabled = false
44 compare(editor.text, editor.initialText)
45 }
46}