on xenial help sign in
reverted unnecessary changes
1b3c968Nick Dedekind
tests/mocks/Unity/Indicators/IndicatorsModel.qml+5−5
@@ -105,7 +105,7 @@ Indicators.FakeIndicatorsModel {
105
105
106 property var originalModelData: [
106 property var originalModelData: [
107 {
107 {
108− "identifier": "fake-indicator-1",
108+ "identifier": "indicator-fake1",
109 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
109 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
110 "pageSource": "Indicators/DefaultIndicatorPage.qml",
110 "pageSource": "Indicators/DefaultIndicatorPage.qml",
111 "indicatorProperties": {
111 "indicatorProperties": {
@@ -116,7 +116,7 @@ Indicators.FakeIndicatorsModel {
116 }
116 }
117 },
117 },
118 {
118 {
119− "identifier": "fake-indicator-2",
119+ "identifier": "indicator-fake2",
120 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
120 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
121 "pageSource": "Indicators/DefaultIndicatorPage.qml",
121 "pageSource": "Indicators/DefaultIndicatorPage.qml",
122 "indicatorProperties": {
122 "indicatorProperties": {
@@ -127,7 +127,7 @@ Indicators.FakeIndicatorsModel {
127 }
127 }
128 },
128 },
129 {
129 {
130− "identifier": "fake-indicator-3",
130+ "identifier": "indicator-fake3",
131 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
131 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
132 "pageSource": "Indicators/DefaultIndicatorPage.qml",
132 "pageSource": "Indicators/DefaultIndicatorPage.qml",
133 "indicatorProperties": {
133 "indicatorProperties": {
@@ -138,7 +138,7 @@ Indicators.FakeIndicatorsModel {
138 }
138 }
139 },
139 },
140 {
140 {
141− "identifier": "fake-indicator-4",
141+ "identifier": "indicator-fake4",
142 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
142 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
143 "pageSource": "Indicators/DefaultIndicatorPage.qml",
143 "pageSource": "Indicators/DefaultIndicatorPage.qml",
144 "indicatorProperties": {
144 "indicatorProperties": {
@@ -149,7 +149,7 @@ Indicators.FakeIndicatorsModel {
149 }
149 }
150 },
150 },
151 {
151 {
152− "identifier": "fake-indicator-5",
152+ "identifier": "indicator-fake5",
153 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
153 "widgetSource": "Indicators/DefaultIndicatorWidget.qml",
154 "pageSource": "Indicators/DefaultIndicatorPage.qml",
154 "pageSource": "Indicators/DefaultIndicatorPage.qml",
155 "indicatorProperties": {
155 "indicatorProperties": {
tests/qmltests/Panel/tst_IndicatorRow.qml+3−3
@@ -69,17 +69,17 @@ Item {
69 function test_set_current_item() {
69 function test_set_current_item() {
70 indicatorRow.setCurrentItemIndex(0);
70 indicatorRow.setCurrentItemIndex(0);
71 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
71 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
72− "fake-indicator-1",
72+ "indicator-fake1",
73 "Incorrect item at position 0");
73 "Incorrect item at position 0");
74
74
75 indicatorRow.setCurrentItemIndex(1);
75 indicatorRow.setCurrentItemIndex(1);
76 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
76 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
77− "fake-indicator-2",
77+ "indicator-fake2",
78 "Incorrect item at position 1");
78 "Incorrect item at position 1");
79
79
80 indicatorRow.setCurrentItemIndex(2);
80 indicatorRow.setCurrentItemIndex(2);
81 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
81 compare(indicatorRow.indicatorsModel.data(indicatorRow.currentItemIndex, Indicators.IndicatorsModelRole.Identifier),
82− "fake-indicator-3",
82+ "indicator-fake3",
83 "Incorrect item at position 2");
83 "Incorrect item at position 2");
84 }
84 }
85
85
tests/qmltests/Panel/tst_Indicators.qml+8−8
@@ -180,7 +180,7 @@ Item {
180 var count = data.visible.length
180 var count = data.visible.length
181 for (var i = 0; i< data.visible.length; i++) {
181 for (var i = 0; i< data.visible.length; i++) {
182 if (data.visible[i] === false) {
182 if (data.visible[i] === false) {
183− init_invisible_indicator("fake-indicator-" + (i + 1));
183+ init_invisible_indicator("indicator-fake" + (i + 1));
184 count--;
184 count--;
185 }
185 }
186 }
186 }
@@ -188,8 +188,8 @@ Item {
188 tryCompare(indicatorRowItems, "count", count);
188 tryCompare(indicatorRowItems, "count", count);
189
189
190 for (i = 0; i < data.visible.length; i++) {
190 for (i = 0; i < data.visible.length; i++) {
191− var widgetName = "fake-indicator-" + (i + 1 + "-widget");
191+ var widgetName = "indicator-fake" + (i + 1 + "-widget");
192− var pageName = "fake-indicator-" + (i + 1 + "-page");
192+ var pageName = "indicator-fake" + (i + 1 + "-page");
193
193
194 // check for item
194 // check for item
195 tryCompareFunction(function() { return findChild(indicatorRowItems, widgetName) !== null }, data.visible[i]);
195 tryCompareFunction(function() { return findChild(indicatorRowItems, widgetName) !== null }, data.visible[i]);
@@ -200,10 +200,10 @@ Item {
200 }
200 }
201
201
202 function test_indicator_visible_correct_menu_data() { return [
202 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" },
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: "fake-indicator-4" },
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: "fake-indicator-1" },
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: "fake-indicator-2" }];
206+ {tag: "before", currentIndex: 1, visible: [false, true, true, true, true], expectedIndex: 1, expextedMenu: "indicator-fake2" }];
207 }
207 }
208
208
209 function test_indicator_visible_correct_menu(data) {
209 function test_indicator_visible_correct_menu(data) {
@@ -216,7 +216,7 @@ Item {
216
216
217 for (var i = 0; i< data.visible.length; i++) {
217 for (var i = 0; i< data.visible.length; i++) {
218 if (data.visible[i] === false) {
218 if (data.visible[i] === false) {
219− init_invisible_indicator("fake-indicator-" + (i + 1));
219+ init_invisible_indicator("indicator-fake" + (i + 1));
220 }
220 }
221 }
221 }
222
222
tests/qmltests/tst_Shell.qml+1
@@ -65,6 +65,7 @@ Row {
65 property bool itemDestroyed: false
65 property bool itemDestroyed: false
66 sourceComponent: Component {
66 sourceComponent: Component {
67 Shell {
67 Shell {
68+ property string indicatorProfile: "phone"
68 Component.onDestruction: {
69 Component.onDestruction: {
69 shellLoader.itemDestroyed = true;
70 shellLoader.itemDestroyed = true;
70 }
71 }
tests/qmltests/tst_ShellWithPin.qml+2
@@ -51,6 +51,8 @@ Item {
51 Shell {
51 Shell {
52 id: shell
52 id: shell
53 maxFailedLogins: maxRetriesTextField.text
53 maxFailedLogins: maxRetriesTextField.text
54+
55+ property string indicatorProfile: "phone"
54 }
56 }
55 Column {
57 Column {
56 anchors { top: parent.top; right: parent.right; bottom: parent.bottom; margins:units.gu(1) }
58 anchors { top: parent.top; right: parent.right; bottom: parent.bottom; margins:units.gu(1) }