Merge lp:~dobey/unity8/no-more-click into lp:unity8
- no-more-click
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Albert Astals Cid |
Approved revision: | 2778 |
Merged at revision: | 2801 |
Proposed branch: | lp:~dobey/unity8/no-more-click |
Merge into: | lp:unity8 |
Diff against target: |
393 lines (+16/-172) 11 files modified
debian/control (+0/-2) qml/Dash/CardGrid.qml (+2/-3) qml/Dash/CardTool.qml (+2/-26) qml/Dash/GenericScopeView.qml (+1/-1) qml/Dash/ScopesListCategory.qml (+1/-1) tests/autopilot/unity8/dash.py (+1/-17) tests/autopilot/unity8/shell/tests/test_helpers.py (+0/-49) tests/mocks/Unity/fake_scopes.cpp (+0/-1) tests/qmltests/Dash/tst_Dash.qml (+1/-48) tests/qmltests/Dash/tst_DashContent.qml (+3/-3) tests/qmltests/Dash/tst_GenericScopeView.qml (+5/-21) |
To merge this branch: | bzr merge lp:~dobey/unity8/no-more-click |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Albert Astals Cid (community) | Approve | ||
Ubuntu Unity PS integration team | Pending | ||
Review via email: mp+315412@code.launchpad.net |
Commit message
Remove dependencies on clickscope.
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
No. But other changes in silo 2272 go along nicely with this change.
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes. Uninstalling unity-scope-click in a VM with unity8 behaves fine.
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Yes.
* If you changed the UI, has there been a design review?
App drawer replacement for click scope is already in unity8, so N/A.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2771
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Please remove this mentions of the clickscope
./Dash/
favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
./Dash/
showStar: model.scopeId !== "clickscope" && (root.isFavorit
./Dash/
readonly property bool isAppLikeScope: scopeId === "clickscope" || scopeId === "libertine-
./Dash/
readonly property bool isAppLikeScopeA
for isAppLikeScopeA
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2771
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2771
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2771
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
dobey (dobey) wrote : | # |
On Wed, 2017-01-25 at 16:51 +0000, Albert Astals Cid wrote:
> for isAppLikeScopeA
> false together with the ifs) that depend on it
I left this value in, as it seems to have a check for libertine scope
as well, but removed the clickscope reference here, as well as the
others you mentioned.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2772
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Actually on a second thought I'm not sure that last change i suggested is a good idea.
Will the user still be able to install the click scope even if we don't ship it by default?
If so I guess we want the CardTool.qml changes back in
dobey (dobey) wrote : | # |
Yes it will still be installable.
On Thu, 2017-01-26 at 08:27 +0000, Albert Astals Cid wrote:
> Actually on a second thought I'm not sure that last change i
> suggested is a good idea.
>
> Will the user still be able to install the click scope even if we
> don't ship it by default?
>
> If so I guess we want the CardTool.qml changes back in
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2773
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2775
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2776
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2776
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Yeah i forgot about the genericscope tests :D
You'll need http://
- 2777. By Albert Astals Cid
-
More test fixes.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2777
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2777
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2777
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Wops, one more thing, can you remove the
// ↓ This is the ubuntu store icon
comment from CardGrid.qml, makes no sense anymore :D
Albert Astals Cid (aacid) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
Yes
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2778
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2778
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2017-01-24 07:38:04 +0000 | |||
3 | +++ debian/control 2017-01-31 14:31:04 +0000 | |||
4 | @@ -141,7 +141,6 @@ | |||
5 | 141 | Recommends: indicator-keyboard, | 141 | Recommends: indicator-keyboard, |
6 | 142 | indicator-session, | 142 | indicator-session, |
7 | 143 | unity-greeter-session-broadcast, | 143 | unity-greeter-session-broadcast, |
8 | 144 | unity-scope-click, | ||
9 | 145 | Suggests: unity-scope-mediascanner2, | 144 | Suggests: unity-scope-mediascanner2, |
10 | 146 | Breaks: indicator-network (<< 0.5.1+14.10.20141014), | 145 | Breaks: indicator-network (<< 0.5.1+14.10.20141014), |
11 | 147 | ubuntu-touch-session (<< 0.107), | 146 | ubuntu-touch-session (<< 0.107), |
12 | @@ -191,7 +190,6 @@ | |||
13 | 191 | python3-gi, | 190 | python3-gi, |
14 | 192 | qttestability-autopilot (>= 1.4), | 191 | qttestability-autopilot (>= 1.4), |
15 | 193 | ubuntu-ui-toolkit-autopilot (>= 1.3.2030), | 192 | ubuntu-ui-toolkit-autopilot (>= 1.3.2030), |
16 | 194 | unity-scope-click, | ||
17 | 195 | unity8 (= ${source:Version}), | 193 | unity8 (= ${source:Version}), |
18 | 196 | unity8-tests (= ${source:Version}), | 194 | unity8-tests (= ${source:Version}), |
19 | 197 | url-dispatcher-tools, | 195 | url-dispatcher-tools, |
20 | 198 | 196 | ||
21 | === modified file 'qml/Dash/CardGrid.qml' | |||
22 | --- qml/Dash/CardGrid.qml 2016-10-12 14:29:02 +0000 | |||
23 | +++ qml/Dash/CardGrid.qml 2017-01-31 14:31:04 +0000 | |||
24 | @@ -25,8 +25,7 @@ | |||
25 | 25 | return cardTool.template["collapsed-rows"]; | 25 | return cardTool.template["collapsed-rows"]; |
26 | 26 | } | 26 | } |
27 | 27 | 27 | ||
30 | 28 | // ↓ This is the ubuntu store icon | 28 | readonly property string backgroundShapeStyle: "flat" |
29 | 29 | readonly property string backgroundShapeStyle: cardTool.isAppLikeScope && !cardTool.isAppLikeScopeAppCategory ? "shadow" : "flat" | ||
31 | 30 | 29 | ||
32 | 31 | expandedHeight: grid.totalContentHeight | 30 | expandedHeight: grid.totalContentHeight |
33 | 32 | collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight) | 31 | collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight) |
34 | @@ -46,7 +45,7 @@ | |||
35 | 46 | ResponsiveGridView { | 45 | ResponsiveGridView { |
36 | 47 | id: grid | 46 | id: grid |
37 | 48 | anchors.fill: parent | 47 | anchors.fill: parent |
39 | 49 | minimumHorizontalSpacing: (cardTool.isAppLikeScopeAppCategory && cardTool.isWideView) ? units.gu(5) : units.gu(1) | 48 | minimumHorizontalSpacing: cardTool.isWideView ? units.gu(5) : units.gu(1) |
40 | 50 | delegateWidth: cardTool.cardWidth | 49 | delegateWidth: cardTool.cardWidth |
41 | 51 | delegateHeight: cardTool.cardHeight | 50 | delegateHeight: cardTool.cardHeight |
42 | 52 | verticalSpacing: units.gu(1) | 51 | verticalSpacing: units.gu(1) |
43 | 53 | 52 | ||
44 | === modified file 'qml/Dash/CardTool.qml' | |||
45 | --- qml/Dash/CardTool.qml 2016-10-12 14:29:02 +0000 | |||
46 | +++ qml/Dash/CardTool.qml 2017-01-31 14:31:04 +0000 | |||
47 | @@ -77,16 +77,8 @@ | |||
48 | 77 | return layout; | 77 | return layout; |
49 | 78 | } | 78 | } |
50 | 79 | 79 | ||
51 | 80 | readonly property bool isAppLikeScope: scopeId === "clickscope" || scopeId === "libertine-scope.ubuntu_libertine-scope" | ||
52 | 81 | readonly property bool isAppLikeScopeAppCategory: ((scopeId === "clickscope" && (categoryId === "predefined" || categoryId === "local")) | ||
53 | 82 | || (scopeId === "libertine-scope.ubuntu_libertine-scope" && categoryId !== "hint")) | ||
54 | 83 | |||
55 | 84 | readonly property string artShapeStyle: { | 80 | readonly property string artShapeStyle: { |
61 | 85 | if (isAppLikeScope) { | 81 | return categoryLayout === "carousel" ? "shadow" : "flat" |
57 | 86 | return isAppLikeScopeAppCategory ? "icon" : "flat"; | ||
58 | 87 | } else { | ||
59 | 88 | return categoryLayout === "carousel" ? "shadow" : "flat" | ||
60 | 89 | } | ||
62 | 90 | } | 82 | } |
63 | 91 | 83 | ||
64 | 92 | // FIXME ? This seems like it should not be needed, but on Qt 5.4 + phone | 84 | // FIXME ? This seems like it should not be needed, but on Qt 5.4 + phone |
65 | @@ -121,18 +113,6 @@ | |||
66 | 121 | If -1, should use implicit width of the actual card. | 113 | If -1, should use implicit width of the actual card. |
67 | 122 | */ | 114 | */ |
68 | 123 | readonly property real cardWidth: { | 115 | readonly property real cardWidth: { |
69 | 124 | if (isAppLikeScopeAppCategory) { | ||
70 | 125 | if (!isNarrowView) { | ||
71 | 126 | if (isWideView) { | ||
72 | 127 | return units.gu(11); | ||
73 | 128 | } else { | ||
74 | 129 | return units.gu(10); | ||
75 | 130 | } | ||
76 | 131 | } else { | ||
77 | 132 | return units.gu(12); | ||
78 | 133 | } | ||
79 | 134 | } | ||
80 | 135 | |||
81 | 136 | switch (categoryLayout) { | 116 | switch (categoryLayout) { |
82 | 137 | case "grid": | 117 | case "grid": |
83 | 138 | case "vertical-journal": | 118 | case "vertical-journal": |
84 | @@ -191,11 +171,7 @@ | |||
85 | 191 | readonly property int headerHeight: cardLoader.item ? cardLoader.item.headerHeight : 0 | 171 | readonly property int headerHeight: cardLoader.item ? cardLoader.item.headerHeight : 0 |
86 | 192 | 172 | ||
87 | 193 | readonly property size artShapeSize: { | 173 | readonly property size artShapeSize: { |
93 | 194 | if (isAppLikeScopeAppCategory) { | 174 | return cardLoader.item ? cardLoader.item.artShapeSize : Qt.size(0, 0) |
89 | 195 | return Qt.size(units.gu(8), units.gu(7.5)); | ||
90 | 196 | } else { | ||
91 | 197 | return cardLoader.item ? cardLoader.item.artShapeSize : Qt.size(0, 0) | ||
92 | 198 | } | ||
94 | 199 | } | 175 | } |
95 | 200 | 176 | ||
96 | 201 | QtObject { | 177 | QtObject { |
97 | 202 | 178 | ||
98 | === modified file 'qml/Dash/GenericScopeView.qml' | |||
99 | --- qml/Dash/GenericScopeView.qml 2016-11-29 09:37:25 +0000 | |||
100 | +++ qml/Dash/GenericScopeView.qml 2017-01-31 14:31:04 +0000 | |||
101 | @@ -582,7 +582,7 @@ | |||
102 | 582 | showSignatureLine: !showBackButton | 582 | showSignatureLine: !showBackButton |
103 | 583 | searchEntryEnabled: true | 583 | searchEntryEnabled: true |
104 | 584 | settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false | 584 | settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false |
106 | 585 | favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope" | 585 | favoriteEnabled: scopeView.scope |
107 | 586 | favorite: scopeView.scope && scopeView.scope.favorite | 586 | favorite: scopeView.scope && scopeView.scope.favorite |
108 | 587 | navigationTag: scopeView.scope ? scopeView.scope.primaryNavigationTag : "" | 587 | navigationTag: scopeView.scope ? scopeView.scope.primaryNavigationTag : "" |
109 | 588 | scopeStyle: scopeView.scopeStyle | 588 | scopeStyle: scopeView.scopeStyle |
110 | 589 | 589 | ||
111 | === modified file 'qml/Dash/ScopesListCategory.qml' | |||
112 | --- qml/Dash/ScopesListCategory.qml 2016-11-17 20:58:14 +0000 | |||
113 | +++ qml/Dash/ScopesListCategory.qml 2017-01-31 14:31:04 +0000 | |||
114 | @@ -89,7 +89,7 @@ | |||
115 | 89 | icon: model.art || model.mascot || "" | 89 | icon: model.art || model.mascot || "" |
116 | 90 | text: model.title || "" | 90 | text: model.title || "" |
117 | 91 | subtext: model.subtitle || "" | 91 | subtext: model.subtitle || "" |
119 | 92 | showStar: model.scopeId !== "clickscope" && (root.isFavoritesFeed || root.isAlsoInstalled) | 92 | showStar: root.isFavoritesFeed || root.isAlsoInstalled |
120 | 93 | isFavorite: root.isFavoritesFeed | 93 | isFavorite: root.isFavoritesFeed |
121 | 94 | 94 | ||
122 | 95 | hideChildren: dragItem.loaderToShrink == loader | 95 | hideChildren: dragItem.loaderToShrink == loader |
123 | 96 | 96 | ||
124 | === modified file 'tests/autopilot/unity8/dash.py' | |||
125 | --- tests/autopilot/unity8/dash.py 2016-10-25 09:28:16 +0000 | |||
126 | +++ tests/autopilot/unity8/dash.py 2017-01-31 14:31:04 +0000 | |||
127 | @@ -48,23 +48,7 @@ | |||
128 | 48 | self.dash_content_list = self.wait_select_single( | 48 | self.dash_content_list = self.wait_select_single( |
129 | 49 | 'QQuickListView', objectName='dashContentList') | 49 | 'QQuickListView', objectName='dashContentList') |
130 | 50 | 50 | ||
148 | 51 | def get_applications_grid(self): | 51 | def get_scope(self, scope_name): |
132 | 52 | get_grid = self.get_scope('clickscope').wait_select_single( | ||
133 | 53 | 'CardGrid', objectName='local') | ||
134 | 54 | return get_grid | ||
135 | 55 | |||
136 | 56 | def get_application_icon(self, text): | ||
137 | 57 | """Returns a 'Tile' icon that has the text 'text' from the application | ||
138 | 58 | grid. | ||
139 | 59 | |||
140 | 60 | :param text: String containing the text of the icon to search for. | ||
141 | 61 | |||
142 | 62 | """ | ||
143 | 63 | app_grid = self.get_applications_grid() | ||
144 | 64 | resp_grid = app_grid.wait_select_single('ResponsiveGridView') | ||
145 | 65 | return resp_grid.select_single('Tile', text=text) | ||
146 | 66 | |||
147 | 67 | def get_scope(self, scope_name='clickscope'): | ||
149 | 68 | return self.dash_content_list.wait_select_single( | 52 | return self.dash_content_list.wait_select_single( |
150 | 69 | 'QQuickLoader', scopeId=scope_name) | 53 | 'QQuickLoader', scopeId=scope_name) |
151 | 70 | 54 | ||
152 | 71 | 55 | ||
153 | === modified file 'tests/autopilot/unity8/shell/tests/test_helpers.py' | |||
154 | --- tests/autopilot/unity8/shell/tests/test_helpers.py 2016-10-25 09:11:13 +0000 | |||
155 | +++ tests/autopilot/unity8/shell/tests/test_helpers.py 2017-01-31 14:31:04 +0000 | |||
156 | @@ -99,12 +99,6 @@ | |||
157 | 99 | self._assert_scope_is_opened(scope, scope_id) | 99 | self._assert_scope_is_opened(scope, scope_id) |
158 | 100 | self.assertIsInstance(scope, dash_helpers.GenericScopeView) | 100 | self.assertIsInstance(scope, dash_helpers.GenericScopeView) |
159 | 101 | 101 | ||
160 | 102 | def test_open_applications_scope(self): | ||
161 | 103 | scope_id = 'clickscope' | ||
162 | 104 | scope = self.dash.open_scope(scope_id) | ||
163 | 105 | self._assert_scope_is_opened(scope, scope_id) | ||
164 | 106 | self.assertIsInstance(scope, dash_helpers.GenericScopeView) | ||
165 | 107 | |||
166 | 108 | 102 | ||
167 | 109 | class GenericScopeViewHelperTestCase(tests.DashBaseTestCase): | 103 | class GenericScopeViewHelperTestCase(tests.DashBaseTestCase): |
168 | 110 | 104 | ||
169 | @@ -122,46 +116,3 @@ | |||
170 | 122 | """Open an item that requires swiping to make it visible.""" | 116 | """Open an item that requires swiping to make it visible.""" |
171 | 123 | preview = self.generic_scope.open_preview('2', 'Title.2.0') | 117 | preview = self.generic_scope.open_preview('2', 'Title.2.0') |
172 | 124 | self.assertIsInstance(preview, dash_helpers.Preview) | 118 | self.assertIsInstance(preview, dash_helpers.Preview) |
173 | 125 | |||
174 | 126 | |||
175 | 127 | class DashAppsHelperTestCase(tests.DashBaseTestCase): | ||
176 | 128 | |||
177 | 129 | available_applications = [ | ||
178 | 130 | 'Title.2.0', 'Title.2.1', 'Title.2.2', 'Title.2.3', 'Title.2.4', | ||
179 | 131 | 'Title.2.5', 'Title.2.6', 'Title.2.7', 'Title.2.8', 'Title.2.9', | ||
180 | 132 | 'Title.2.10', 'Title.2.11', 'Title.2.12', 'Title.2.13', 'Title.2.14', | ||
181 | 133 | 'Title.2.15', 'Title.2.16', 'Title.2.17', 'Title.2.18'] | ||
182 | 134 | |||
183 | 135 | def setUp(self): | ||
184 | 136 | # Set up the fake scopes before launching unity. | ||
185 | 137 | self.useFixture(fixture_setup.FakeScopes()) | ||
186 | 138 | super().setUp() | ||
187 | 139 | self.applications_scope = self.dash.open_scope('clickscope') | ||
188 | 140 | |||
189 | 141 | def test_get_applications_should_return_correct_applications(self): | ||
190 | 142 | category = '2' | ||
191 | 143 | category_element = self.applications_scope._get_category_element( | ||
192 | 144 | category) | ||
193 | 145 | list_view = self.dash.get_scope('clickscope')\ | ||
194 | 146 | .select_single(dash_helpers.ListViewWithPageHeader) | ||
195 | 147 | expected_apps_count = self._get_number_of_application_slots(category) | ||
196 | 148 | expected_applications = self.available_applications[ | ||
197 | 149 | :expected_apps_count] | ||
198 | 150 | x_center = list_view.globalRect.x + list_view.width / 2 | ||
199 | 151 | y_center = list_view.globalRect.y + list_view.height / 2 | ||
200 | 152 | y_diff = ( | ||
201 | 153 | category_element.y - list_view.height + category_element.height | ||
202 | 154 | ) | ||
203 | 155 | list_view._slow_drag(x_center, x_center, y_center, y_center - y_diff) | ||
204 | 156 | applications = self.applications_scope.get_applications(category) | ||
205 | 157 | self.assertEqual(expected_applications, applications) | ||
206 | 158 | |||
207 | 159 | def _get_number_of_application_slots(self, category): | ||
208 | 160 | category_element = self.applications_scope._get_category_element( | ||
209 | 161 | category) | ||
210 | 162 | cardgrid = category_element.select_single('CardGrid') | ||
211 | 163 | if (category_element.expanded): | ||
212 | 164 | return cardgrid.select_single('QQuickGridView').count | ||
213 | 165 | else: | ||
214 | 166 | return cardgrid.collapsedRows \ | ||
215 | 167 | * cardgrid.select_single('ResponsiveGridView').columns | ||
216 | 168 | 119 | ||
217 | === modified file 'tests/mocks/Unity/fake_scopes.cpp' | |||
218 | --- tests/mocks/Unity/fake_scopes.cpp 2017-01-10 14:46:38 +0000 | |||
219 | +++ tests/mocks/Unity/fake_scopes.cpp 2017-01-31 14:31:04 +0000 | |||
220 | @@ -60,7 +60,6 @@ | |||
221 | 60 | addScope(new Scope("MockScope7", "MS7", false, this)); | 60 | addScope(new Scope("MockScope7", "MS7", false, this)); |
222 | 61 | addScope(new Scope("MockScope8", "MS8", false, this)); | 61 | addScope(new Scope("MockScope8", "MS8", false, this)); |
223 | 62 | addScope(new Scope("MockScope9", "MS9", false, this)); | 62 | addScope(new Scope("MockScope9", "MS9", false, this)); |
224 | 63 | addScope(new Scope("libertine-scope.ubuntu_libertine-scope", "Libertine", true, this)); | ||
225 | 64 | 63 | ||
226 | 65 | Scope *longNavigationScope = new Scope( | 64 | Scope *longNavigationScope = new Scope( |
227 | 66 | "LongPrimaryNavigation", "LongPrimaryNavigation", true, this, 1, false, | 65 | "LongPrimaryNavigation", "LongPrimaryNavigation", true, this, 1, false, |
228 | 67 | 66 | ||
229 | === modified file 'tests/qmltests/Dash/tst_Dash.qml' | |||
230 | --- tests/qmltests/Dash/tst_Dash.qml 2016-12-14 17:43:23 +0000 | |||
231 | +++ tests/qmltests/Dash/tst_Dash.qml 2017-01-31 14:31:04 +0000 | |||
232 | @@ -58,7 +58,7 @@ | |||
233 | 58 | tryCompare(dashContentList, "count", 0); | 58 | tryCompare(dashContentList, "count", 0); |
234 | 59 | scopes.load(); | 59 | scopes.load(); |
235 | 60 | tryCompare(dashContentList, "currentIndex", 0); | 60 | tryCompare(dashContentList, "currentIndex", 0); |
237 | 61 | tryCompare(dashContentList, "count", 28); | 61 | tryCompare(dashContentList, "count", 27); |
238 | 62 | tryCompare(scopes, "loaded", true); | 62 | tryCompare(scopes, "loaded", true); |
239 | 63 | tryCompareFunction(function() { | 63 | tryCompareFunction(function() { |
240 | 64 | var mockScope1Loader = findChild(dash, "scopeLoader0"); | 64 | var mockScope1Loader = findChild(dash, "scopeLoader0"); |
241 | @@ -192,24 +192,6 @@ | |||
242 | 192 | tryCompare(expandingItem, "visible", false) | 192 | tryCompare(expandingItem, "visible", false) |
243 | 193 | } | 193 | } |
244 | 194 | 194 | ||
245 | 195 | function test_manage_dash_clickscope_unfavoritable() { | ||
246 | 196 | open_manage_dash(); | ||
247 | 197 | |||
248 | 198 | // Click scope star area is not visible (i.e. can't be unfavorited) | ||
249 | 199 | var favScopesListCategoryList = findChild(findChild(dash, "scopesListCategoryfavorites"), "scopesListCategoryInnerList"); | ||
250 | 200 | var clickScope = findChild(favScopesListCategoryList, "delegateclickscope"); | ||
251 | 201 | var starArea = findChild(clickScope, "starArea"); | ||
252 | 202 | compare(starArea.visible, false); | ||
253 | 203 | |||
254 | 204 | // Go back | ||
255 | 205 | var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController"); | ||
256 | 206 | var scopesList = findChild(dash, "scopesList"); | ||
257 | 207 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); | ||
258 | 208 | var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar; | ||
259 | 209 | mouseClick(backButton); | ||
260 | 210 | tryCompare(bottomEdgeController, "progress", 0); | ||
261 | 211 | } | ||
262 | 212 | |||
263 | 213 | function test_manage_dash_select_same_favorite() { | 195 | function test_manage_dash_select_same_favorite() { |
264 | 214 | open_manage_dash(); | 196 | open_manage_dash(); |
265 | 215 | 197 | ||
266 | @@ -627,35 +609,6 @@ | |||
267 | 627 | tryCompare(dashContent, "x", 0); | 609 | tryCompare(dashContent, "x", 0); |
268 | 628 | } | 610 | } |
269 | 629 | 611 | ||
270 | 630 | function test_cardIconStyle() | ||
271 | 631 | { | ||
272 | 632 | dash.setCurrentScope("clickscope"); | ||
273 | 633 | var dashContent = findChild(dash, "dashContent"); | ||
274 | 634 | tryCompare(dashContent.currentScope, "id", "clickscope"); | ||
275 | 635 | |||
276 | 636 | scrollToCategory("dashCategorypredefined"); | ||
277 | 637 | tryCompareFunction(function() { | ||
278 | 638 | var tile = getCategoryDelegate("predefined", 2); | ||
279 | 639 | var proportionalShape = findChildsByType(tile, "UCProportionalShape"); | ||
280 | 640 | return proportionalShape.length === 1; | ||
281 | 641 | }, | ||
282 | 642 | true | ||
283 | 643 | ); | ||
284 | 644 | |||
285 | 645 | dash.setCurrentScope("libertine-scope.ubuntu_libertine-scope"); | ||
286 | 646 | var dashContent = findChild(dash, "dashContent"); | ||
287 | 647 | tryCompare(dashContent.currentScope, "id", "libertine-scope.ubuntu_libertine-scope"); | ||
288 | 648 | |||
289 | 649 | scrollToCategory("dashCategory2"); | ||
290 | 650 | tryCompareFunction(function() { | ||
291 | 651 | var tile = getCategoryDelegate("2", 2); | ||
292 | 652 | var proportionalShape = findChildsByType(tile, "UCProportionalShape"); | ||
293 | 653 | return proportionalShape.length === 1; | ||
294 | 654 | }, | ||
295 | 655 | true | ||
296 | 656 | ); | ||
297 | 657 | } | ||
298 | 658 | |||
299 | 659 | function test_tempScopeItemXOnResize() | 612 | function test_tempScopeItemXOnResize() |
300 | 660 | { | 613 | { |
301 | 661 | // Go to a temp scope | 614 | // Go to a temp scope |
302 | 662 | 615 | ||
303 | === modified file 'tests/qmltests/Dash/tst_DashContent.qml' | |||
304 | --- tests/qmltests/Dash/tst_DashContent.qml 2016-12-02 00:56:24 +0000 | |||
305 | +++ tests/qmltests/Dash/tst_DashContent.qml 2017-01-31 14:31:04 +0000 | |||
306 | @@ -70,7 +70,7 @@ | |||
307 | 70 | function loadScopes() { | 70 | function loadScopes() { |
308 | 71 | scopeLoadedSpy.clear(); | 71 | scopeLoadedSpy.clear(); |
309 | 72 | scopesModel.load(); | 72 | scopesModel.load(); |
311 | 73 | tryCompare(scopeLoadedSpy, "count", 28, 15000); | 73 | tryCompare(scopeLoadedSpy, "count", 27, 15000); |
312 | 74 | tryCompare(scopesModel, "loaded", true); | 74 | tryCompare(scopesModel, "loaded", true); |
313 | 75 | tryCompareFunction(function() { | 75 | tryCompareFunction(function() { |
314 | 76 | var mockScope1Loader = findChild(shell, "scopeLoader0"); | 76 | var mockScope1Loader = findChild(shell, "scopeLoader0"); |
315 | @@ -120,11 +120,11 @@ | |||
316 | 120 | scopesModel.clear(); | 120 | scopesModel.clear(); |
317 | 121 | compare(dashContentList.count, 0, "DashContent should have 0 items after clearing"); | 121 | compare(dashContentList.count, 0, "DashContent should have 0 items after clearing"); |
318 | 122 | // pretend we're running after a model reset | 122 | // pretend we're running after a model reset |
320 | 123 | dashContentList.currentIndex = 27; | 123 | dashContentList.currentIndex = 26; |
321 | 124 | 124 | ||
322 | 125 | loadScopes(); | 125 | loadScopes(); |
323 | 126 | 126 | ||
325 | 127 | compare(dashContentList.count, 28); | 127 | compare(dashContentList.count, 27); |
326 | 128 | verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count); | 128 | verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count); |
327 | 129 | } | 129 | } |
328 | 130 | 130 | ||
329 | 131 | 131 | ||
330 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' | |||
331 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-12-06 20:16:56 +0000 | |||
332 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2017-01-31 14:31:04 +0000 | |||
333 | @@ -84,6 +84,7 @@ | |||
334 | 84 | genericScopeView.scope = scopes.getScope(2); | 84 | genericScopeView.scope = scopes.getScope(2); |
335 | 85 | genericScopeView.isCurrent = true; | 85 | genericScopeView.isCurrent = true; |
336 | 86 | shell.width = units.gu(120); | 86 | shell.width = units.gu(120); |
337 | 87 | shell.height = units.gu(100); | ||
338 | 87 | genericScopeView.categoryView.positionAtBeginning(); | 88 | genericScopeView.categoryView.positionAtBeginning(); |
339 | 88 | waitForRendering(genericScopeView.categoryView); | 89 | waitForRendering(genericScopeView.categoryView); |
340 | 89 | } | 90 | } |
341 | @@ -195,6 +196,8 @@ | |||
342 | 195 | } | 196 | } |
343 | 196 | 197 | ||
344 | 197 | function test_expand_collapse() { | 198 | function test_expand_collapse() { |
345 | 199 | shell.height = units.gu(120); | ||
346 | 200 | |||
347 | 198 | tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0", 0 /* timeout */) != null; }, true); | 201 | tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0", 0 /* timeout */) != null; }, true); |
348 | 199 | 202 | ||
349 | 200 | var category = findChild(genericScopeView, "dashCategory0") | 203 | var category = findChild(genericScopeView, "dashCategory0") |
350 | @@ -531,6 +534,8 @@ | |||
351 | 531 | } | 534 | } |
352 | 532 | 535 | ||
353 | 533 | function test_seeAllTwoCategoriesScenario2() { | 536 | function test_seeAllTwoCategoriesScenario2() { |
354 | 537 | shell.height = units.gu(120); | ||
355 | 538 | |||
356 | 534 | mockScope.setId("mockScope"); | 539 | mockScope.setId("mockScope"); |
357 | 535 | mockScope.setName("Mock Scope"); | 540 | mockScope.setName("Mock Scope"); |
358 | 536 | mockScope.isActive = true; | 541 | mockScope.isActive = true; |
359 | @@ -587,7 +592,6 @@ | |||
360 | 587 | var innerHeader = findChild(header, "innerPageHeader"); | 592 | var innerHeader = findChild(header, "innerPageHeader"); |
361 | 588 | verify(innerHeader, "Could not find the inner header"); | 593 | verify(innerHeader, "Could not find the inner header"); |
362 | 589 | 594 | ||
363 | 590 | expectFail("Apps", "Click scope should not have a favorite button"); | ||
364 | 591 | var favoriteAction = findChild(innerHeader, "favorite_button"); | 595 | var favoriteAction = findChild(innerHeader, "favorite_button"); |
365 | 592 | verify(favoriteAction, "Could not find the favorite action."); | 596 | verify(favoriteAction, "Could not find the favorite action."); |
366 | 593 | mouseClick(favoriteAction); | 597 | mouseClick(favoriteAction); |
367 | @@ -697,26 +701,6 @@ | |||
368 | 697 | var shape = findChildsByType(artShapeLoader, "UCUbuntuShape"); | 701 | var shape = findChildsByType(artShapeLoader, "UCUbuntuShape"); |
369 | 698 | compare(shape.borderSource, undefined); | 702 | compare(shape.borderSource, undefined); |
370 | 699 | } | 703 | } |
371 | 700 | |||
372 | 701 | function test_clickScopeSizing() { | ||
373 | 702 | genericScopeView.scope = scopes.getScopeFromAll("clickscope"); | ||
374 | 703 | waitForRendering(genericScopeView); | ||
375 | 704 | |||
376 | 705 | var categoryListView = findChild(genericScopeView, "categoryListView"); | ||
377 | 706 | waitForRendering(categoryListView); | ||
378 | 707 | |||
379 | 708 | var categorypredefined = findChild(categoryListView, "dashCategorypredefined"); | ||
380 | 709 | waitForRendering(categorypredefined); | ||
381 | 710 | |||
382 | 711 | var cardTool = findChild(categorypredefined, "cardTool"); | ||
383 | 712 | |||
384 | 713 | compare(cardTool.cardWidth, units.gu(11)); | ||
385 | 714 | shell.width = units.gu(46); | ||
386 | 715 | waitForRendering(genericScopeView); | ||
387 | 716 | compare(cardTool.cardWidth, units.gu(10)); | ||
388 | 717 | |||
389 | 718 | shell.width = units.gu(120) | ||
390 | 719 | } | ||
391 | 720 | } | 704 | } |
392 | 721 | } | 705 | } |
393 | 722 | } | 706 | } |
FAILED: Continuous integration, rev:2771 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3002/ /unity8- jenkins. ubuntu. com/job/ build/3907/ console /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3935 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3780 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3780/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3780 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3780/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3780 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3780/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3780/ console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3780 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3780/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3780 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3780/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3002/ rebuild
https:/