summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/qml/ViewTestCase.qml30
-rw-r--r--tests/qmldir2
-rw-r--r--views/accounts/tests/tst_accountsview.qml8
-rw-r--r--views/calendar/tests/tst_calendar.qml5
-rw-r--r--views/composer/tests/tst_composerview.qml4
-rw-r--r--views/conversation/tests/tst_conversationview.qml4
-rw-r--r--views/inboxcrusher/tests/tst_inboxcrusher.qml5
-rw-r--r--views/log/tests/tst_logview.qml4
-rw-r--r--views/people/tests/tst_peopleview.qml4
-rw-r--r--views/search/tests/tst_searchview.qml5
11 files changed, 44 insertions, 28 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d7dfe81d..d06880fb 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -11,6 +11,7 @@ target_link_libraries(kubetestrunner
11 kubeframework 11 kubeframework
12) 12)
13 13
14install(DIRECTORY qml/ DESTINATION ${QML_INSTALL_DIR}/org/kube/test)
14install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kube/test) 15install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kube/test)
15 16
16add_library(testplugin SHARED testplugin.cpp teststore.cpp) 17add_library(testplugin SHARED testplugin.cpp teststore.cpp)
diff --git a/tests/qml/ViewTestCase.qml b/tests/qml/ViewTestCase.qml
new file mode 100644
index 00000000..f2d08bb1
--- /dev/null
+++ b/tests/qml/ViewTestCase.qml
@@ -0,0 +1,30 @@
1/*
2 * Copyright 2017 Christian Mollekopf <mollekopf@kolabsys.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 QtTest 1.0
21import org.kube.test 1.0
22
23TestCase {
24 width: 400
25 height: 400
26
27 function cleanup() {
28 TestStore.shutdownResources();
29 }
30}
diff --git a/tests/qmldir b/tests/qmldir
index 2ccb630a..63b4ba66 100644
--- a/tests/qmldir
+++ b/tests/qmldir
@@ -1,3 +1,5 @@
1module org.kube.test 1module org.kube.test
2 2
3ViewTestCase 1.0 ViewTestCase.qml
4
3plugin testplugin 5plugin testplugin
diff --git a/views/accounts/tests/tst_accountsview.qml b/views/accounts/tests/tst_accountsview.qml
index 8d7bc29d..468a0716 100644
--- a/views/accounts/tests/tst_accountsview.qml
+++ b/views/accounts/tests/tst_accountsview.qml
@@ -22,17 +22,11 @@ import QtTest 1.0
22import org.kube.test 1.0 22import org.kube.test 1.0
23import "../qml" 23import "../qml"
24 24
25TestCase { 25ViewTestCase {
26 id: testCase 26 id: testCase
27 width: 400
28 height: 400
29 name: "AccountsView" 27 name: "AccountsView"
30 when: windowShown 28 when: windowShown
31 29
32 function cleanup() {
33 TestStore.shutdownResources();
34 }
35
36 function visitChildren(item) { 30 function visitChildren(item) {
37 console.warn(item) 31 console.warn(item)
38 for (var i = 0; i < item.children.length; i++) { 32 for (var i = 0; i < item.children.length; i++) {
diff --git a/views/calendar/tests/tst_calendar.qml b/views/calendar/tests/tst_calendar.qml
index 46f7dba2..20b78ba7 100644
--- a/views/calendar/tests/tst_calendar.qml
+++ b/views/calendar/tests/tst_calendar.qml
@@ -19,11 +19,10 @@
19 19
20import QtQuick 2.7 20import QtQuick 2.7
21import QtTest 1.0 21import QtTest 1.0
22import org.kube.test 1.0
22import "../qml" 23import "../qml"
23 24
24TestCase { 25ViewTestCase {
25 width: 400
26 height: 400
27 name: "Todo" 26 name: "Todo"
28 27
29 View { 28 View {
diff --git a/views/composer/tests/tst_composerview.qml b/views/composer/tests/tst_composerview.qml
index 61668ecb..d3b6a420 100644
--- a/views/composer/tests/tst_composerview.qml
+++ b/views/composer/tests/tst_composerview.qml
@@ -23,10 +23,8 @@ import org.kube.framework 1.0 as Kube
23import org.kube.test 1.0 23import org.kube.test 1.0
24import "../qml" 24import "../qml"
25 25
26TestCase { 26ViewTestCase {
27 id: testCase 27 id: testCase
28 width: 400
29 height: 400
30 name: "ComposerView" 28 name: "ComposerView"
31 when: windowShown 29 when: windowShown
32 30
diff --git a/views/conversation/tests/tst_conversationview.qml b/views/conversation/tests/tst_conversationview.qml
index 186c2634..b85f4cb6 100644
--- a/views/conversation/tests/tst_conversationview.qml
+++ b/views/conversation/tests/tst_conversationview.qml
@@ -23,10 +23,8 @@ import "../qml"
23import org.kube.framework 1.0 as Kube 23import org.kube.framework 1.0 as Kube
24import org.kube.test 1.0 24import org.kube.test 1.0
25 25
26TestCase { 26ViewTestCase {
27 id: testCase 27 id: testCase
28 width: 400
29 height: 400
30 name: "MailView" 28 name: "MailView"
31 29
32 Component { 30 Component {
diff --git a/views/inboxcrusher/tests/tst_inboxcrusher.qml b/views/inboxcrusher/tests/tst_inboxcrusher.qml
index dba4603a..3e756569 100644
--- a/views/inboxcrusher/tests/tst_inboxcrusher.qml
+++ b/views/inboxcrusher/tests/tst_inboxcrusher.qml
@@ -18,10 +18,10 @@
18 */ 18 */
19 19
20import QtQuick 2.7 20import QtQuick 2.7
21import QtTest 1.0 21import org.kube.test 1.0
22import "../qml" 22import "../qml"
23 23
24TestCase { 24ViewTestCase {
25 width: 400 25 width: 400
26 height: 400 26 height: 400
27 name: "InboxCrusher" 27 name: "InboxCrusher"
@@ -33,4 +33,5 @@ TestCase {
33 function test_start() { 33 function test_start() {
34 verify(view) 34 verify(view)
35 } 35 }
36
36} 37}
diff --git a/views/log/tests/tst_logview.qml b/views/log/tests/tst_logview.qml
index 8f733b6c..2479172d 100644
--- a/views/log/tests/tst_logview.qml
+++ b/views/log/tests/tst_logview.qml
@@ -23,10 +23,8 @@ import org.kube.framework 1.0 as Kube
23import org.kube.test 1.0 23import org.kube.test 1.0
24import "../qml" 24import "../qml"
25 25
26TestCase { 26ViewTestCase {
27 id: logviewTestcase 27 id: logviewTestcase
28 width: 400
29 height: 400
30 name: "LogView" 28 name: "LogView"
31 29
32 View { 30 View {
diff --git a/views/people/tests/tst_peopleview.qml b/views/people/tests/tst_peopleview.qml
index d2764c31..4b940c6d 100644
--- a/views/people/tests/tst_peopleview.qml
+++ b/views/people/tests/tst_peopleview.qml
@@ -22,10 +22,8 @@ import QtTest 1.0
22import org.kube.test 1.0 22import org.kube.test 1.0
23import "../qml" 23import "../qml"
24 24
25TestCase { 25ViewTestCase {
26 id: testCase 26 id: testCase
27 width: 400
28 height: 400
29 name: "PeopleView" 27 name: "PeopleView"
30 28
31 View { 29 View {
diff --git a/views/search/tests/tst_searchview.qml b/views/search/tests/tst_searchview.qml
index 3aeae109..ead62a9d 100644
--- a/views/search/tests/tst_searchview.qml
+++ b/views/search/tests/tst_searchview.qml
@@ -20,13 +20,10 @@
20import QtQuick 2.7 20import QtQuick 2.7
21import QtTest 1.0 21import QtTest 1.0
22import "../qml" 22import "../qml"
23import org.kube.framework 1.0 as Kube
24import org.kube.test 1.0 23import org.kube.test 1.0
25 24
26TestCase { 25ViewTestCase {
27 id: testCase 26 id: testCase
28 width: 400
29 height: 400
30 name: "SearchView" 27 name: "SearchView"
31 28
32 Component { 29 Component {