Merge lp:~daker/ubuntu-ui-toolkit/fix.1341559 into lp:ubuntu-ui-toolkit/staging
- fix.1341559
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 2177 |
Merged at revision: | 2175 |
Proposed branch: | lp:~daker/ubuntu-ui-toolkit/fix.1341559 |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
50 lines (+16/-0) 3 files modified
components.api (+1/-0) src/imports/Components/1.3/OptionSelector.qml (+6/-0) tests/unit/visual/tst_optionselector.13.qml (+9/-0) |
To merge this branch: | bzr merge lp:~daker/ubuntu-ui-toolkit/fix.1341559 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Review via email: mp+317568@code.launchpad.net |
Commit message
Add count prop to OptionSelector
Description of the change
Add count prop to OptionSelector
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2174
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 2175. By Adnane Belmadiaf
-
Fix components.api
- 2176. By Adnane Belmadiaf
-
Add test for the OptionSelector count prop
Cris Dywan (kalikiana) wrote : | # |
Looks good! Let's see if Jenkins agrees.
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2176
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
@@ -731,6 +731,7 @@ Ubuntu.
Ubuntu.
property bool colourImage
property double containerHeight
+ readonly property int count
property bool currentlyExpanded
property Component delegate
property bool expanded
@@ -740,7 +741,6 @@ Ubuntu.
property var model
property bool multiSelection
property int selectedIndex
- readonly property int count
Ubuntu.
property color assetColour
property bool colourImage
Differences in API. Did you forget to update components.api?
- 2177. By Adnane Belmadiaf
-
Fix components.api
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Cris Dywan (kalikiana) wrote : | # |
Sweet! Thanks for fixing!
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2177
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'components.api' | |||
2 | --- components.api 2017-01-26 11:59:45 +0000 | |||
3 | +++ components.api 2017-02-21 14:57:14 +0000 | |||
4 | @@ -731,6 +731,7 @@ | |||
5 | 731 | Ubuntu.Components.OptionSelector 1.3: Empty | 731 | Ubuntu.Components.OptionSelector 1.3: Empty |
6 | 732 | property bool colourImage | 732 | property bool colourImage |
7 | 733 | property double containerHeight | 733 | property double containerHeight |
8 | 734 | readonly property int count | ||
9 | 734 | property bool currentlyExpanded | 735 | property bool currentlyExpanded |
10 | 735 | property Component delegate | 736 | property Component delegate |
11 | 736 | property bool expanded | 737 | property bool expanded |
12 | 737 | 738 | ||
13 | === modified file 'src/imports/Components/1.3/OptionSelector.qml' | |||
14 | --- src/imports/Components/1.3/OptionSelector.qml 2016-08-22 10:18:57 +0000 | |||
15 | +++ src/imports/Components/1.3/OptionSelector.qml 2017-02-21 14:57:14 +0000 | |||
16 | @@ -155,6 +155,12 @@ | |||
17 | 155 | } | 155 | } |
18 | 156 | 156 | ||
19 | 157 | /*! | 157 | /*! |
20 | 158 | \qmlproperty int count | ||
21 | 159 | This property holds the number of items in the OptionSelector. | ||
22 | 160 | */ | ||
23 | 161 | property alias count: list.count | ||
24 | 162 | |||
25 | 163 | /*! | ||
26 | 158 | \qmlproperty int selectedIndex | 164 | \qmlproperty int selectedIndex |
27 | 159 | The index of the currently selected element in our list. | 165 | The index of the currently selected element in our list. |
28 | 160 | */ | 166 | */ |
29 | 161 | 167 | ||
30 | === modified file 'tests/unit/visual/tst_optionselector.13.qml' | |||
31 | --- tests/unit/visual/tst_optionselector.13.qml 2016-09-19 11:13:19 +0000 | |||
32 | +++ tests/unit/visual/tst_optionselector.13.qml 2017-02-21 14:57:14 +0000 | |||
33 | @@ -183,8 +183,17 @@ | |||
34 | 183 | function test_custom_data() { | 183 | function test_custom_data() { |
35 | 184 | return test_arrow_select_data() | 184 | return test_arrow_select_data() |
36 | 185 | } | 185 | } |
37 | 186 | |||
38 | 186 | function test_custom(data) { | 187 | function test_custom(data) { |
39 | 187 | test_arrow_select(data, customSelector, 2); | 188 | test_arrow_select(data, customSelector, 2); |
40 | 188 | } | 189 | } |
41 | 190 | |||
42 | 191 | function test_count() { | ||
43 | 192 | var selector = defaultSelector; | ||
44 | 193 | sections.selectedIndex = 0; | ||
45 | 194 | selector.forceActiveFocus(); | ||
46 | 195 | waitForRendering(selector); | ||
47 | 196 | compare(selector.count, customModel.count); | ||
48 | 197 | } | ||
49 | 189 | } | 198 | } |
50 | 190 | } | 199 | } |
Can we have a unit test in tests/unit/ visual/ tst_optionselec tor.13. qml verifying that the count is correct?