Merge lp:~unity-team/unity8/fix_ticket_1105_tests into lp:unity8

Proposed by Lukáš Tinkl on 2016-03-15
Status: Merged
Approved by: Michael Zanetti on 2016-03-15
Approved revision: 2280
Merged at revision: 2301
Proposed branch: lp:~unity-team/unity8/fix_ticket_1105_tests
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/listitemworkaround
Diff against target: 167 lines (+16/-28)
7 files modified
qml/Dash/DashPageHeader.qml (+1/-0)
qml/Dash/Filters/FilterWidgetFactory.qml (+1/-0)
tests/plugins/Dash/tst_ScopeStyle.qml (+1/-1)
tests/qmltests/Dash/Filters/tst_FilterWidgetFactory.qml (+2/-1)
tests/qmltests/Dash/tst_DashContent.qml (+8/-23)
tests/qmltests/Dash/tst_GenericScopeView.qml (+2/-2)
tests/qmltests/Dash/tst_PreviewView.qml (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity8/fix_ticket_1105_tests
Reviewer Review Type Date Requested Status
Michael Zanetti (community) 2016-03-15 Approve on 2016-03-15
Unity8 CI Bot continuous-integration 2016-03-15 Needs Fixing on 2016-03-15
Review via email: mp+289087@code.launchpad.net

This proposal supersedes a proposal from 2016-03-15.

Commit Message

Fix various tests

test_navigationShowFilterButton is gone since it was testing a feature that no longer exists

Description of the Change

 * Are there any related MPs required for this MP to build/function as expected
Prereq

 * 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.
Michael Zanetti (mzanetti) wrote :

lgtm

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

only test fixes

 * Did CI run pass? If not, please explain why.

no, all the prereqs prevent it from running, this however, fixes broken tests discovered in silo testing

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

yes

review: Approve
2281. By Albert Astals Cid on 2016-03-16

Another small test fix

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashPageHeader.qml'
2--- qml/Dash/DashPageHeader.qml 2016-03-16 08:31:00 +0000
3+++ qml/Dash/DashPageHeader.qml 2016-03-16 08:31:00 +0000
4@@ -258,6 +258,7 @@
5
6 AbstractButton {
7 id: settingsButton
8+ objectName: "settingsButton"
9
10 width: root.scopeHasFilters ? height : 0
11 visible: width > 0
12
13=== modified file 'qml/Dash/Filters/FilterWidgetFactory.qml'
14--- qml/Dash/Filters/FilterWidgetFactory.qml 2016-03-16 08:31:00 +0000
15+++ qml/Dash/Filters/FilterWidgetFactory.qml 2016-03-16 08:31:00 +0000
16@@ -53,6 +53,7 @@
17
18 Loader {
19 id: loader
20+ objectName: "loader"
21
22 anchors {
23 top: title.bottom
24
25=== modified file 'tests/plugins/Dash/tst_ScopeStyle.qml'
26--- tests/plugins/Dash/tst_ScopeStyle.qml 2015-07-15 15:07:19 +0000
27+++ tests/plugins/Dash/tst_ScopeStyle.qml 2016-03-16 08:31:00 +0000
28@@ -137,7 +137,7 @@
29
30 function test_headerBackground_data() {
31 return [
32- { tag: "default", index: 0, headerBackground: "color:///#f5f5f5" },
33+ { tag: "default", index: 0, headerBackground: "color:///#ffffff" },
34 { tag: "black", index: 3, headerBackground: "gradient:///white/blue" },
35 ];
36 }
37
38=== modified file 'tests/qmltests/Dash/Filters/tst_FilterWidgetFactory.qml'
39--- tests/qmltests/Dash/Filters/tst_FilterWidgetFactory.qml 2016-03-16 08:31:00 +0000
40+++ tests/qmltests/Dash/Filters/tst_FilterWidgetFactory.qml 2016-03-16 08:31:00 +0000
41@@ -51,7 +51,8 @@
42 factory.widgetData = {};
43 factory.widgetType = data.type;
44
45- verify((String(factory.source)).indexOf(data.source) != -1);
46+ var loader = findChild(factory, "loader");
47+ verify((String(loader.source)).indexOf(data.source) != -1);
48 }
49 }
50 }
51
52=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
53--- tests/qmltests/Dash/tst_DashContent.qml 2016-03-16 08:31:00 +0000
54+++ tests/qmltests/Dash/tst_DashContent.qml 2016-03-16 08:31:00 +0000
55@@ -215,7 +215,7 @@
56 verify(pageHeader, "Could not find the scope page header.");
57 var innerHeader = findChild(pageHeader, "innerPageHeader");
58 verify(innerHeader, "Could not find the scope page header.");
59- compare(innerHeader.config.contents.text, scopesModel.getScope(data.index).name);
60+ compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
61 }
62
63 function test_is_active_data() {
64@@ -285,11 +285,12 @@
65 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
66 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
67 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
68- var searchButton = findChild(dashContentList.currentItem, "search_action_button");
69+ var searchButton = findChild(dashContentList.currentItem, "search_button");
70 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
71 compare(peExtraPanel.visible, false);
72 mouseClick(searchButton);
73 tryCompare(peExtraPanel, "visible", true);
74+ peExtraPanel.searchHistory.clear();
75
76 var navigationListView = findChild(dashNavigation, "navigationListView");
77 tryCompareFunction(function() {
78@@ -405,7 +406,7 @@
79 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
80 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
81 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
82- var searchButton = findChild(dashContentList.currentItem, "search_action_button");
83+ var searchButton = findChild(dashContentList.currentItem, "search_button");
84 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
85 compare(peExtraPanel.visible, false);
86 mouseClick(searchButton);
87@@ -497,7 +498,7 @@
88
89 function test_clearSearchWithNavigationClosed() {
90 var dashContentList = findChild(dashContent, "dashContentList");
91- var searchButton = findChild(dashContentList.currentItem, "search_action_button");
92+ var searchButton = findChild(dashContentList.currentItem, "search_button");
93 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
94 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
95
96@@ -513,32 +514,16 @@
97 tryCompare(peExtraPanel, "visible", true);
98 }
99
100- function test_navigationShowFilterButton() {
101- goToSecondLevel();
102-
103- var dashContentList = findChild(dashContent, "dashContentList");
104- var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
105-
106- verify(!searchTextField.focus)
107- verify(searchTextField.clearIsSettings)
108-
109- mouseClick(searchTextField)
110-
111- verify(searchTextField.focus)
112- verify(!searchTextField.clearIsSettings)
113- }
114-
115 function test_navigationShowFilterPopup() {
116 goToSecondLevel();
117
118 var dashContentList = findChild(dashContent, "dashContentList");
119- var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
120- var clearIcon = findChild(searchTextField, "clearIcon");
121+ var settingsButton = findChild(dashContentList.currentItem, "settingsButton");
122
123 var filtersPopover = findChild(shell, "filtersPopover")
124 verify(!filtersPopover);
125
126- mouseClick(clearIcon);
127+ mouseClick(settingsButton);
128
129 filtersPopover = findChild(shell, "filtersPopover")
130
131@@ -550,7 +535,7 @@
132 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
133 dashContentList.currentItem.item.scope.setHasNavigation(false);
134 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
135- var searchButton = findChild(dashContentList.currentItem, "search_action_button");
136+ var searchButton = findChild(dashContentList.currentItem, "search_button");
137
138 compare(peExtraPanel.visible, false);
139 mouseClick(searchButton);
140
141=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
142--- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-03-16 08:31:00 +0000
143+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-03-16 08:31:00 +0000
144@@ -428,8 +428,8 @@
145
146 function test_header_style_data() {
147 return [
148- { tag: "Default", index: 0, foreground: UbuntuColors.darkGrey, background: "color:///#f5f5f5", logo: "" },
149- { tag: "Foreground", index: 1, foreground: "yellow", background: "color:///#f5f5f5", logo: "" },
150+ { tag: "Default", index: 0, foreground: UbuntuColors.darkGrey, background: "color:///#ffffff", logo: "" },
151+ { tag: "Foreground", index: 1, foreground: "yellow", background: "color:///#ffffff", logo: "" },
152 { tag: "Logo+Background", index: 2, foreground: UbuntuColors.darkGrey, background: "gradient:///lightgrey/grey",
153 logo: Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg") },
154 ];
155
156=== modified file 'tests/qmltests/Dash/tst_PreviewView.qml'
157--- tests/qmltests/Dash/tst_PreviewView.qml 2016-03-16 08:31:00 +0000
158+++ tests/qmltests/Dash/tst_PreviewView.qml 2016-02-23 16:30:23 +0000
159@@ -98,7 +98,7 @@
160 var header = findChild(view, "innerPageHeader");
161 verify(header, "Could not find the preview header");
162
163- compare(header.config.contents.text, "Mock Scope");
164+ compare(header.config.title, "Mock Scope");
165 }
166
167 function test_header_style() {

Subscribers

People subscribed via source and target branches