Merge lp:~renatofilho/address-book-app/fix-1411323-rtm into lp:address-book-app/rtm-14.09

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 293
Merged at revision: 293
Proposed branch: lp:~renatofilho/address-book-app/fix-1411323-rtm
Merge into: lp:address-book-app/rtm-14.09
Diff against target: 90 lines (+61/-2)
2 files modified
src/imports/ContactList/ContactListPage.qml (+1/-1)
tests/qml/tst_ContactList.qml (+60/-1)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1411323-rtm
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+247142@code.launchpad.net

Commit message

Use the "tick" icon as confirm button while in Pick mode.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? NO

Is your branch in sync with latest trunk? YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? YES

Did you successfully run all tests found in your component's Test Plan on device or emulator? YES

If you changed the UI, was the change specified/approved by design? YES

If you changed UI labels, did you update the pot file? NO LABEL CHANGED

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP? NO PACKAGE CHANGED

292. By Renato Araujo Oliveira Filho

Added unit test for "share" button icon.

293. By Renato Araujo Oliveira Filho

Fixed icon name on comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/imports/ContactList/ContactListPage.qml'
--- src/imports/ContactList/ContactListPage.qml 2014-12-04 13:18:23 +0000
+++ src/imports/ContactList/ContactListPage.qml 2015-01-22 16:04:59 +0000
@@ -421,7 +421,7 @@
421 Action {421 Action {
422 objectName: "share"422 objectName: "share"
423 text: i18n.tr("Share")423 text: i18n.tr("Share")
424 iconName: "share"424 iconName: mainPage.pickMode ? "tick" : "share"
425 visible: contactList.isInSelectionMode425 visible: contactList.isInSelectionMode
426 onTriggered: {426 onTriggered: {
427 var contacts = []427 var contacts = []
428428
=== modified file 'tests/qml/tst_ContactList.qml'
--- tests/qml/tst_ContactList.qml 2014-12-04 13:18:23 +0000
+++ tests/qml/tst_ContactList.qml 2015-01-22 16:04:59 +0000
@@ -88,7 +88,7 @@
8888
89 function cleanup()89 function cleanup()
90 {90 {
91 root.contactListPageObj.destroy()91 root.contactListPageObj = null
92 }92 }
9393
94 function test_title()94 function test_title()
@@ -137,5 +137,64 @@
137 tryCompare(dialog.item, "dialogVisible", false)137 tryCompare(dialog.item, "dialogVisible", false)
138 }138 }
139139
140 function test_pickButtonIcon()
141 {
142 tryCompare(root.contactListPageObj, "state", "default")
143 var activeActions = root.contactListPageObj.head.actions
144
145
146 // before start the pick mode the action is not visible
147 for(var i = 0; i < activeActions.length; i++) {
148 if (activeActions[i].objectName === "share")
149 fail("Share icon is visible but the list is not in selection mode")
150 }
151
152 // start selection
153 var view = findChild(root.contactListPageObj, "contactListView")
154 view.startSelection()
155 tryCompare(root.contactListPageObj, "state", "selection")
156
157 // on selection mode the share shuld be visible and using the 'share' icon
158 var shareAction = null
159 activeActions = root.contactListPageObj.head.actions
160 for(var i = 0; i < activeActions.length; i++) {
161 if (activeActions[i].objectName === "share") {
162 shareAction = activeActions[i]
163 break
164 }
165 }
166 verify(shareAction != null, "Share button is not visible while the list is in selection mode")
167 tryCompare(shareAction, "visible", true)
168 tryCompare(shareAction, "iconName", "share")
169
170 // cancel selection
171 view.cancelSelection()
172
173 // check if the list went back to default state
174 tryCompare(root.contactListPageObj, "state", "default")
175 activeActions = root.contactListPageObj.head.actions
176 for(var i = 0; i < activeActions.length; i++) {
177 if (activeActions[i].objectName === "share")
178 fail("Share icon is visible but the list is not in selection mode")
179 }
180
181
182 // enter on pick mode
183 root.contactListPageObj.startPickMode(true, null)
184
185 // share button is visible and using the 'tick' icon
186 tryCompare(root.contactListPageObj, "state", "selection")
187 shareAction = null
188 activeActions = root.contactListPageObj.head.actions
189 for(var i = 0; i < activeActions.length; i++) {
190 if (activeActions[i].objectName === "share") {
191 shareAction = activeActions[i]
192 break
193 }
194 }
195 verify(shareAction != null, "Share button is not visible while the list is in pick mode")
196 tryCompare(shareAction, "visible", true)
197 tryCompare(shareAction, "iconName", "tick")
198 }
140 }199 }
141}200}

Subscribers

People subscribed via source and target branches