Merge lp:~unity-team/unity8/broken-indicator-tests into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1301
Merged at revision: 1312
Proposed branch: lp:~unity-team/unity8/broken-indicator-tests
Merge into: lp:unity8
Diff against target: 140 lines (+19/-25)
7 files modified
qml/Panel/IndicatorItem.qml (+6/-0)
qml/Panel/Indicators/DefaultIndicatorPage.qml (+1/-1)
qml/Panel/Indicators/IndicatorBase.qml (+1/-0)
qml/Panel/Indicators/MenuItemFactory.qml (+1/-1)
qml/Panel/Indicators/VisibleIndicators.qml (+1/-0)
qml/Panel/MenuContent.qml (+6/-0)
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml (+3/-23)
To merge this branch: bzr merge lp:~unity-team/unity8/broken-indicator-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Zanetti (community) Abstain
Albert Astals Cid (community) Approve
Review via email: mp+236304@code.launchpad.net

Commit message

Fixed DefaultIndicatorPage test. Fixed warnings from test.

Description of the change

Fixed DefaultIndicatorPage test. Fixed warnings from test.

 * Are there any related MPs required for this MP to build/function as expected? Please list.
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) :
review: Approve
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ok. tagspurious tag gone.

review: Abstain
Revision history for this message
Albert Astals Cid (aacid) wrote :

CI has already gone through qmluitests and they pass, still not finished the whole CI run but no need to wait for the rest for this

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Panel/IndicatorItem.qml'
2--- qml/Panel/IndicatorItem.qml 2014-03-03 11:54:55 +0000
3+++ qml/Panel/IndicatorItem.qml 2014-09-29 11:56:02 +0000
4@@ -41,6 +41,12 @@
5
6 Binding {
7 target: item
8+ property: "identifier"
9+ value: identifier
10+ }
11+
12+ Binding {
13+ target: item
14 property: "objectName"
15 value: identifier + "-widget"
16 }
17
18=== modified file 'qml/Panel/Indicators/DefaultIndicatorPage.qml'
19--- qml/Panel/Indicators/DefaultIndicatorPage.qml 2014-09-11 08:04:19 +0000
20+++ qml/Panel/Indicators/DefaultIndicatorPage.qml 2014-09-29 11:56:02 +0000
21@@ -130,7 +130,7 @@
22 visible: status == Loader.Ready
23
24 property int modelIndex: index
25- sourceComponent: factory.load(model, identifier)
26+ sourceComponent: factory.load(model, main.identifier)
27
28 onLoaded: {
29 if (item.hasOwnProperty("selected")) {
30
31=== modified file 'qml/Panel/Indicators/IndicatorBase.qml'
32--- qml/Panel/Indicators/IndicatorBase.qml 2014-08-20 08:39:09 +0000
33+++ qml/Panel/Indicators/IndicatorBase.qml 2014-09-29 11:56:02 +0000
34@@ -26,6 +26,7 @@
35 enabled: menuObjectPath != ""
36
37 //const
38+ property string identifier
39 property string busName
40 property string actionsObjectPath
41 property string menuObjectPath
42
43=== modified file 'qml/Panel/Indicators/MenuItemFactory.qml'
44--- qml/Panel/Indicators/MenuItemFactory.qml 2014-09-24 10:00:26 +0000
45+++ qml/Panel/Indicators/MenuItemFactory.qml 2014-09-29 11:56:02 +0000
46@@ -823,7 +823,7 @@
47 }
48
49 function load(modelData, context) {
50- if (modelData.type !== undefined) {
51+ if (modelData.type !== undefined && modelData.type !== "") {
52 var component = undefined;
53
54 var contextComponents = _map[context];
55
56=== modified file 'qml/Panel/Indicators/VisibleIndicators.qml'
57--- qml/Panel/Indicators/VisibleIndicators.qml 2014-01-30 14:54:01 +0000
58+++ qml/Panel/Indicators/VisibleIndicators.qml 2014-09-29 11:56:02 +0000
59@@ -55,6 +55,7 @@
60 delegate: IndicatorDelegate {
61 id: item
62 objectName: model.identifier + "-delegate"
63+ identifier: model.identifier
64 Component.onCompleted: {
65 for(var pName in indicatorProperties) {
66 if (item.hasOwnProperty(pName)) {
67
68=== modified file 'qml/Panel/MenuContent.qml'
69--- qml/Panel/MenuContent.qml 2014-09-19 14:46:53 +0000
70+++ qml/Panel/MenuContent.qml 2014-09-29 11:56:02 +0000
71@@ -125,6 +125,12 @@
72
73 Binding {
74 target: loader.item
75+ property: "identifier"
76+ value: identifier
77+ }
78+
79+ Binding {
80+ target: loader.item
81 property: "objectName"
82 value: identifier + "-page"
83 }
84
85=== modified file 'tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml'
86--- tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-06-27 09:16:16 +0000
87+++ tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-09-29 11:56:02 +0000
88@@ -29,14 +29,14 @@
89 id: page
90
91 anchors.fill: parent
92- contentActive: true
93
94 menuModel: UnityMenuModel {}
95 busName: "test"
96 actionsObjectPath: "test"
97 menuObjectPath: "test"
98
99- rootMenuType: ""
100+ identifier: "test-indicator"
101+ rootMenuType: "com.canonical.indicator.root"
102 }
103
104 property var fullMenuData: [{
105@@ -117,13 +117,8 @@
106 name: "DefaultIndicatorPage"
107
108 function init() {
109- page.stop();
110 var mainMenu = findChild(page, "mainMenu");
111- verify(mainMenu.model === undefined);
112-
113- page.rootMenuType = "com.canonical.indicator.root";
114- page.start();
115-
116+ page.menuModel.modelData = [];
117 verify(mainMenu.model !== null);
118 }
119
120@@ -157,20 +152,5 @@
121 var mainMenu = findChild(page, "mainMenu");
122 tryCompare(mainMenu, "count", data.expectedCount);
123 }
124-
125- function test_empty_data() {
126- return [
127- { tag: "EmptyNoData", modelData: [], visible: true},
128- { tag: "EmptySubmenu", modelData: emptySubMenuData, visible: true},
129- { tag: "NotEmpty", modelData: fullMenuData, visible: false},
130- ]
131- }
132-
133- function test_empty(data) {
134- page.menuModel.modelData = data.modelData;
135-
136- var emptyLabel = findChild(page, "emptyLabel");
137- tryCompare(emptyLabel, "visible", data.visible);
138- }
139 }
140 }

Subscribers

People subscribed via source and target branches