on xenial help sign in
add TimeDate and Diagnostics mocks
commit1f594d38d450a40194abc538ebb30724596a0ed0 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 4 Dec 2015, 15:13 (11 years ago) parent7867284
9 files changed+54−1
qml/Wizard/Pages/80-finished.qml+1 tests/mocks/Ubuntu/SystemSettings/CMakeLists.txt+1 tests/mocks/Ubuntu/SystemSettings/Diagnostics/CMakeLists.txt+1 tests/mocks/Ubuntu/SystemSettings/Diagnostics/MockDiagnostics.qml+24 tests/mocks/Ubuntu/SystemSettings/Diagnostics/qmldir+2 tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txt+1 tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qml+21 tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldir+2 tests/qmltests/Wizard/tst_Wizard.qml+1−1
qml/Wizard/Pages/80-finished.qml+1
@@ -118,6 +118,7 @@ LocalComponents.Page {
118118
119119 Label {
120120 id: buttonLabel
121+ objectName: "getStartedButton"
121122 color: "white"
122123 text: i18n.tr("Get Started")
123124 fontSize: "medium"
tests/mocks/Ubuntu/SystemSettings/CMakeLists.txt+1
@@ -1,3 +1,4 @@
11add_subdirectory(LanguagePlugin)
22add_subdirectory(SecurityPrivacy)
33add_subdirectory(TimeDate)
4+add_subdirectory(Diagnostics)
tests/mocks/Ubuntu/SystemSettings/Diagnostics/CMakeLists.txtnew file+1
@@ -0,0 +1 @@
1+add_unity8_mock(Ubuntu.SystemSettings.Diagnostics 1.0 Ubuntu/SystemSettings/Diagnostics)
tests/mocks/Ubuntu/SystemSettings/Diagnostics/MockDiagnostics.qmlnew file+24
@@ -0,0 +1,24 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+
19+Item {
20+ property bool reportCrashes: true
21+ function setReportCrashes(report) {
22+ reportCrashes = report;
23+ }
24+}
tests/mocks/Ubuntu/SystemSettings/Diagnostics/qmldirnew file+2
@@ -0,0 +1,2 @@
1+module Ubuntu.SystemSettings.Diagnostics
2+UbuntuDiagnostics 1.0 MockDiagnostics.qml
tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txtnew file+1
@@ -0,0 +1 @@
1+add_unity8_mock(Ubuntu.SystemSettings.TimeDate 1.0 Ubuntu/SystemSettings/TimeDate)
tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qmlnew file+21
@@ -0,0 +1,21 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+
19+Item {
20+ property string timeZone: "Europe/Prague"
21+}
tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldirnew file+2
@@ -0,0 +1,2 @@
1+module Ubuntu.SystemSettings.TimeDate
2+UbuntuTimeDatePanel 1.0 MockTimeDate.qml
tests/qmltests/Wizard/tst_Wizard.qml+1−1
@@ -220,7 +220,7 @@ Item {
220220
221221 page = waitForPage("finishedPage");
222222 if (name === page.objectName) return page;
223− tap(findChild(page, "forwardButton"));
223+ tap(findChild(page, "getStartedButton"));
224224
225225 tryCompare(wizard, "shown", false);
226226 compare(name, null);