summaryrefslogtreecommitdiff
path: root/prototype_2016/third_party/qml-material/tests
diff options
context:
space:
mode:
Diffstat (limited to 'prototype_2016/third_party/qml-material/tests')
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons.yml6
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons/action_alarm.svg1
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons/action_search.svg1
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons/action_settings.svg1
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons/content_add.svg1
-rw-r--r--prototype_2016/third_party/qml-material/tests/icons/icons.qrc14
-rwxr-xr-xprototype_2016/third_party/qml-material/tests/tests.cpp20
-rw-r--r--prototype_2016/third_party/qml-material/tests/tests.pro9
-rw-r--r--prototype_2016/third_party/qml-material/tests/tst_actionbar.qml151
-rwxr-xr-xprototype_2016/third_party/qml-material/tests/tst_card.qml37
-rwxr-xr-xprototype_2016/third_party/qml-material/tests/tst_pagestack.qml59
11 files changed, 0 insertions, 300 deletions
diff --git a/prototype_2016/third_party/qml-material/tests/icons.yml b/prototype_2016/third_party/qml-material/tests/icons.yml
deleted file mode 100644
index 3fe1625..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons.yml
+++ /dev/null
@@ -1,6 +0,0 @@
1out: icons
2icons:
3 - action/alarm
4 - action/search
5 - action/settings
6 - content/add
diff --git a/prototype_2016/third_party/qml-material/tests/icons/action_alarm.svg b/prototype_2016/third_party/qml-material/tests/icons/action_alarm.svg
deleted file mode 100644
index 1a5c539..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons/action_alarm.svg
+++ /dev/null
@@ -1 +0,0 @@
1<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M44 11.44l-9.19-7.71-2.57 3.06 9.19 7.71L44 11.44zM15.76 6.78l-2.57-3.06L4 11.43l2.57 3.06 9.19-7.71zM25 16h-3v12l9.49 5.71L33 31.24l-8-4.74V16zm-1.01-8C14.04 8 6 16.06 6 26s8.04 18 17.99 18S42 35.94 42 26 33.94 8 23.99 8zM24 40c-7.73 0-14-6.27-14-14s6.27-14 14-14 14 6.27 14 14-6.26 14-14 14z"/></svg> \ No newline at end of file
diff --git a/prototype_2016/third_party/qml-material/tests/icons/action_search.svg b/prototype_2016/third_party/qml-material/tests/icons/action_search.svg
deleted file mode 100644
index be555cd..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons/action_search.svg
+++ /dev/null
@@ -1 +0,0 @@
1<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M31 28h-1.59l-.55-.55C30.82 25.18 32 22.23 32 19c0-7.18-5.82-13-13-13S6 11.82 6 19s5.82 13 13 13c3.23 0 6.18-1.18 8.45-3.13l.55.55V31l10 9.98L40.98 38 31 28zm-12 0c-4.97 0-9-4.03-9-9s4.03-9 9-9 9 4.03 9 9-4.03 9-9 9z"/></svg> \ No newline at end of file
diff --git a/prototype_2016/third_party/qml-material/tests/icons/action_settings.svg b/prototype_2016/third_party/qml-material/tests/icons/action_settings.svg
deleted file mode 100644
index 7a01c33..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons/action_settings.svg
+++ /dev/null
@@ -1 +0,0 @@
1<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3c-1.22.51-2.35 1.17-3.38 1.97L9.9 10.1c-.45-.17-.97 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3c1.22-.51 2.35-1.17 3.38-1.97l4.98 2.01c.45.17.97 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></svg> \ No newline at end of file
diff --git a/prototype_2016/third_party/qml-material/tests/icons/content_add.svg b/prototype_2016/third_party/qml-material/tests/icons/content_add.svg
deleted file mode 100644
index 2b3a796..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons/content_add.svg
+++ /dev/null
@@ -1 +0,0 @@
1<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M38 26H26v12h-4V26H10v-4h12V10h4v12h12v4z"/></svg> \ No newline at end of file
diff --git a/prototype_2016/third_party/qml-material/tests/icons/icons.qrc b/prototype_2016/third_party/qml-material/tests/icons/icons.qrc
deleted file mode 100644
index b0e9440..0000000
--- a/prototype_2016/third_party/qml-material/tests/icons/icons.qrc
+++ /dev/null
@@ -1,14 +0,0 @@
1<!DOCTYPE RCC>
2<RCC version="1.0">
3
4<qresource prefix="/icons/action">
5 <file alias="alarm.svg">action_alarm.svg</file>
6 <file alias="search.svg">action_search.svg</file>
7 <file alias="settings.svg">action_settings.svg</file>
8</qresource>
9
10<qresource prefix="/icons/content">
11 <file alias="add.svg">content_add.svg</file>
12</qresource>
13
14</RCC> \ No newline at end of file
diff --git a/prototype_2016/third_party/qml-material/tests/tests.cpp b/prototype_2016/third_party/qml-material/tests/tests.cpp
deleted file mode 100755
index 6d01cdf..0000000
--- a/prototype_2016/third_party/qml-material/tests/tests.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * QML Material - An application framework implementing Material Design.
3 * Copyright (C) 2014 Michael Spencer
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <QtQuickTest/QtQuickTest>
20QUICK_TEST_MAIN(material)
diff --git a/prototype_2016/third_party/qml-material/tests/tests.pro b/prototype_2016/third_party/qml-material/tests/tests.pro
deleted file mode 100644
index dd81acd..0000000
--- a/prototype_2016/third_party/qml-material/tests/tests.pro
+++ /dev/null
@@ -1,9 +0,0 @@
1TEMPLATE = app
2TARGET = tst_material
3CONFIG += warn_on qmltestcase no_testcase_installs
4SOURCES += tests.cpp
5
6RESOURCES += icons/icons.qrc
7
8OTHER_FILES += tst_card.qml \
9 tst_pagestack.qml
diff --git a/prototype_2016/third_party/qml-material/tests/tst_actionbar.qml b/prototype_2016/third_party/qml-material/tests/tst_actionbar.qml
deleted file mode 100644
index bc52522..0000000
--- a/prototype_2016/third_party/qml-material/tests/tst_actionbar.qml
+++ /dev/null
@@ -1,151 +0,0 @@
1/*
2 * QML Material - An application framework implementing Material Design.
3 * Copyright (C) 2015 Michael Spencer <sonrisesoftware@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import QtTest 1.0
21import Material 0.2
22
23Rectangle {
24 width: 400
25 height: 800
26
27 ActionBar {
28 id: actionBar
29
30 width: parent.width
31
32 actions: [
33 Action {
34 id: action1
35 name: "Action 1"
36 iconName: "content/add"
37 objectName: "action1"
38 },
39 Action {
40 name: "Action 2"
41 iconName: "action/search"
42 },
43 Action {
44 name: "Action 3"
45 iconName: "action/settings"
46 },
47 Action {
48 id: action4
49 name: "Action 4"
50 objectName: "action4"
51 iconName: "action/alarm"
52 }
53 ]
54 }
55
56 OverlayLayer {
57 id: tooltipOverlayLayer
58 objectName: "tooltipOverlayLayer"
59 }
60
61 OverlayLayer {
62 id: overlayLayer
63 }
64
65 SignalSpy {
66 id: action1Spy
67 target: action1
68 signalName: "triggered"
69 }
70
71 SignalSpy {
72 id: action4Spy
73 target: action4
74 signalName: "triggered"
75 }
76
77 SignalSpy {
78 id: overflowSpy
79 target: testCase.findChild(actionBar, "action/overflow")
80 signalName: "clicked"
81 }
82
83 TestCase {
84 id: testCase
85 when: windowShown
86 name: "ActionBar Test"
87
88 function init() {
89 var button = testCase.findChild(actionBar, "action/overflow")
90 var overflow = testCase.findChild(actionBar, "overflowMenu")
91 verify(button != null)
92 verify(overflow != null)
93
94 if (overflow.showing) {
95 mouseClick(button, 10, 10)
96 wait(10000)
97 }
98
99 verify(!overflow.showing)
100
101 overflowSpy.clear()
102 }
103
104 function test_click_action() {
105 var button = testCase.findChild(actionBar, "action/" + action1.objectName)
106
107 verify(button != null)
108
109 compare(action1Spy.count, 0)
110 mouseClick(button, 10, 10)
111 wait(10000) // Wait for the overflow to fully open
112 compare(action1Spy.count, 1)
113 }
114
115 function test_open_overflow() {
116 var button = testCase.findChild(actionBar, "action/overflow")
117 var overflow = testCase.findChild(actionBar, "overflowMenu")
118
119 verify(button != null)
120 verify(overflow != null)
121
122 verify(!overflow.showing)
123 compare(overflowSpy.count, 0)
124 mouseClick(button, 10, 10)
125 wait(10000) // Wait for the overflow to fully open
126 compare(overflowSpy.count, 1)
127 verify(overflow.showing)
128 }
129
130 function test_click_action_in_overflow() {
131 var button = testCase.findChild(actionBar, "action/overflow")
132 var listItem = testCase.findChild(actionBar, "action/" + action4.objectName)
133 var overflow = testCase.findChild(actionBar, "overflowMenu")
134
135 verify(button != null)
136 verify(listItem != null)
137 verify(overflow != null)
138
139 compare(action4Spy.count, 0)
140 mouseClick(button, 10, 10)
141
142 wait(10000) // Wait for the overflow to fully open
143
144 verify(overflow.showing)
145 mouseClick(listItem, 10, 10)
146 compare(action4Spy.count, 1)
147
148 wait(400)
149 }
150 }
151}
diff --git a/prototype_2016/third_party/qml-material/tests/tst_card.qml b/prototype_2016/third_party/qml-material/tests/tst_card.qml
deleted file mode 100755
index 8ef29c1..0000000
--- a/prototype_2016/third_party/qml-material/tests/tst_card.qml
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * QML Material - An application framework implementing Material Design.
3 * Copyright (C) 2014 Michael Spencer
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import QtTest 1.0
21import Material 0.2
22
23Card {
24 width: 100
25 height: 100
26 id: card
27
28 TestCase {
29 name: "Card Test"
30 when: windowShown
31
32 function test_showCard() {
33 wait(2000);
34 }
35 }
36
37}
diff --git a/prototype_2016/third_party/qml-material/tests/tst_pagestack.qml b/prototype_2016/third_party/qml-material/tests/tst_pagestack.qml
deleted file mode 100755
index 6b90c9a..0000000
--- a/prototype_2016/third_party/qml-material/tests/tst_pagestack.qml
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * QML Material - An application framework implementing Material Design.
3 * Copyright (C) 2014 Michael Spencer
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import QtTest 1.0
21import Material 0.2
22
23Rectangle {
24 width: 100
25 height: 100
26
27 ApplicationWindow {
28 id: mainwin
29 title: "Application Name"
30 width: 100
31 height: 100
32
33 initialPage: Page {
34 id: page
35 title: "Page Title"
36
37 Label {
38 anchors.centerIn: parent
39 text: "Hello World!"
40 }
41 }
42
43 Component.onCompleted: mainwin.show()
44 }
45
46 TestCase {
47 name: "PageStack Test"
48 when: mainwin.visible
49
50 function test_showCard() {
51 wait(2000);
52 console.log('here');
53
54 verify( page !== null )
55 verify( page !== undefined )
56 }
57 }
58
59}