on xenial help sign in
reverted unnecessary changes
commit1b3c9689bb490f7ba1a6314bbe8cdf4d273bc3ee authorNick Dedekind <nick.dedekind@canonical.com> dateTue 7 Oct 2014, 11:36 (12 years ago) parent902b392
5 files changed+19−16
tests/mocks/Unity/Indicators/IndicatorsModel.qml+5−5 tests/qmltests/Panel/tst_IndicatorRow.qml+3−3 tests/qmltests/Panel/tst_Indicators.qml+8−8 tests/qmltests/tst_Shell.qml+1 tests/qmltests/tst_ShellWithPin.qml+2
tests/mocks/Unity/Indicators/IndicatorsModel.qml+5−5
@@ -105,7 +105,7 @@ Indicators.FakeIndicatorsModel {
105105
106106 property var originalModelData: [
107107 {
108− "identifier": "fake-indicator-1",
108+ "identifier": "indicator-fake1",
109109 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
110110 "pageSource": "Indicators/DefaultIndicatorPage.qml",
111111 "indicatorProperties": {
@@ -116,7 +116,7 @@ Indicators.FakeIndicatorsModel {
116116 }
117117 },
118118 {
119− "identifier": "fake-indicator-2",
119+ "identifier": "indicator-fake2",
120120 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
121121 "pageSource": "Indicators/DefaultIndicatorPage.qml",
122122 "indicatorProperties": {
@@ -127,7 +127,7 @@ Indicators.FakeIndicatorsModel {
127127 }
128128 },
129129 {
130− "identifier": "fake-indicator-3",
130+ "identifier": "indicator-fake3",
131131 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
132132 "pageSource": "Indicators/DefaultIndicatorPage.qml",
133133 "indicatorProperties": {
@@ -138,7 +138,7 @@ Indicators.FakeIndicatorsModel {
138138 }
139139 },
140140 {
141− "identifier": "fake-indicator-4",
141+ "identifier": "indicator-fake4",
142142 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
143143 "pageSource": "Indicators/DefaultIndicatorPage.qml",
144144 "indicatorProperties": {
@@ -149,7 +149,7 @@ Indicators.FakeIndicatorsModel {
149149 }
150150 },
151151 {
152− "identifier": "fake-indicator-5",
152+ "identifier": "indicator-fake5",
153153 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
154154 "pageSource": "Indicators/DefaultIndicatorPage.qml",
155155 "indicatorProperties": {
tests/qmltests/Panel/tst_IndicatorRow.qml+3−3
@@ -69,17 +69,17 @@ Item {
6969 function test_set_current_item() {
7070 indicatorRow.setCurrentItemIndex(0);
7171 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
72− "fake-indicator-1",
72+ "indicator-fake1",
7373 "Incorrect item at position 0");
7474
7575 indicatorRow.setCurrentItemIndex(1);
7676 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
77− "fake-indicator-2",
77+ "indicator-fake2",
7878 "Incorrect item at position 1");
7979
8080 indicatorRow.setCurrentItemIndex(2);
8181 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
82− "fake-indicator-3",
82+ "indicator-fake3",
8383 "Incorrect item at position 2");
8484 }
8585
tests/qmltests/Panel/tst_Indicators.qml+8−8
@@ -180,7 +180,7 @@ Item {
180180 var count = data.visible.length
181181 for (var i = 0; i< data.visible.length; i++) {
182182 if (data.visible[i] === false) {
183− init_invisible_indicator("fake-indicator-" + (i + 1));
183+ init_invisible_indicator("indicator-fake" + (i + 1));
184184 count--;
185185 }
186186 }
@@ -188,8 +188,8 @@ Item {
188188 tryCompare(indicatorRowItems, "count", count);
189189
190190 for (i = 0; i < data.visible.length; i++) {
191− var widgetName = "fake-indicator-" + (i + 1 + "-widget");
192− var pageName = "fake-indicator-" + (i + 1 + "-page");
191+ var widgetName = "indicator-fake" + (i + 1 + "-widget");
192+ var pageName = "indicator-fake" + (i + 1 + "-page");
193193
194194 // check for item
195195 tryCompareFunction(function() { return findChild(indicatorRowItems, widgetName) !== null }, data.visible[i]);
@@ -200,10 +200,10 @@ Item {
200200 }
201201
202202 function test_indicator_visible_correct_menu_data() { return [
203− {tag: "current-first", currentIndex: 0, visible: [false, true, true, true, true], expectedIndex: 0, expextedMenu: "fake-indicator-2" },
204− {tag: "current-last", currentIndex: 4, visible: [true, true, true, true, false], expectedIndex: 3, expextedMenu: "fake-indicator-4" },
205− {tag: "after", currentIndex: 0, visible: [true, false, true, true, true], expectedIndex: 0, expextedMenu: "fake-indicator-1" },
206− {tag: "before", currentIndex: 1, visible: [false, true, true, true, true], expectedIndex: 1, expextedMenu: "fake-indicator-2" }];
203+ {tag: "current-first", currentIndex: 0, visible: [false, true, true, true, true], expectedIndex: 0, expextedMenu: "indicator-fake2" },
204+ {tag: "current-last", currentIndex: 4, visible: [true, true, true, true, false], expectedIndex: 3, expextedMenu: "indicator-fake4" },
205+ {tag: "after", currentIndex: 0, visible: [true, false, true, true, true], expectedIndex: 0, expextedMenu: "indicator-fake1" },
206+ {tag: "before", currentIndex: 1, visible: [false, true, true, true, true], expectedIndex: 1, expextedMenu: "indicator-fake2" }];
207207 }
208208
209209 function test_indicator_visible_correct_menu(data) {
@@ -216,7 +216,7 @@ Item {
216216
217217 for (var i = 0; i< data.visible.length; i++) {
218218 if (data.visible[i] === false) {
219− init_invisible_indicator("fake-indicator-" + (i + 1));
219+ init_invisible_indicator("indicator-fake" + (i + 1));
220220 }
221221 }
222222
tests/qmltests/tst_Shell.qml+1
@@ -65,6 +65,7 @@ Row {
6565 property bool itemDestroyed: false
6666 sourceComponent: Component {
6767 Shell {
68+ property string indicatorProfile: "phone"
6869 Component.onDestruction: {
6970 shellLoader.itemDestroyed = true;
7071 }
tests/qmltests/tst_ShellWithPin.qml+2
@@ -51,6 +51,8 @@ Item {
5151 Shell {
5252 id: shell
5353 maxFailedLogins: maxRetriesTextField.text
54+
55+ property string indicatorProfile: "phone"
5456 }
5557 Column {
5658 anchors { top: parent.top; right: parent.right; bottom: parent.bottom; margins:units.gu(1) }