Merge lp:~renatofilho/address-book-app/mailto into lp:address-book-app
- mailto
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Gustavo Pichorim Boiko |
Approved revision: | 454 |
Merged at revision: | 438 |
Proposed branch: | lp:~renatofilho/address-book-app/mailto |
Merge into: | lp:address-book-app |
Prerequisite: | lp:~renatofilho/address-book-app/no-expasion |
Diff against target: |
342 lines (+101/-17) 10 files modified
src/imports/ABContactViewPage.qml (+1/-1) src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml (+0/-2) src/imports/Ubuntu/AddressBook/ContactView/ContactDetailEmailsView.qml (+3/-0) src/imports/Ubuntu/AddressBook/ContactView/ContactDetailGroupWithTypeView.qml (+4/-3) src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumberView.qml (+5/-3) src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumbersView.qml (+9/-1) src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml (+19/-4) src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml (+5/-1) tests/data/vcard_single.vcf (+1/-0) tests/qml/tst_ContactPreviewPage.qml (+54/-2) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/mailto |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Pichorim Boiko (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+259150@code.launchpad.net |
Commit message
Add 'mailto' url call when clicking on e-mail field.
Description of the change
- 450. By Renato Araujo Oliveira Filho
-
Created unit test for click on e-mail field.
- 451. By Renato Araujo Oliveira Filho
-
Used offscreen module on qmltestrunner instead of xvfb.
- 452. By Renato Araujo Oliveira Filho
-
Removed xvfb from build dep.
PS Jenkins bot (ps-jenkins) wrote : | # |
- 453. By Renato Araujo Oliveira Filho
-
Try fix tests on ppa.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:452
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 454. By Renato Araujo Oliveira Filho
-
Revert xvfb removal.
The tests fail on ppa without it.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:454
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
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 CHANGE
If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
NO PACKAGE CHANGE
Gustavo Pichorim Boiko (boiko) wrote : | # |
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes
Did CI run pass? If not, please explain why.
Yes
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes
- 455. By Renato Araujo Oliveira Filho
-
Use Qt.openUrlExter
nally(" <action> :<value> ") as default instead of Qt.openUrlExter nally(" <action> :///<value> ") - 456. By Renato Araujo Oliveira Filho
-
Fixed detail click function.
- 457. By Renato Araujo Oliveira Filho
-
Create unit test for contacts with multiple e-mails.
Preview Diff
1 | === modified file 'src/imports/ABContactViewPage.qml' | |||
2 | --- src/imports/ABContactViewPage.qml 2015-05-15 20:13:54 +0000 | |||
3 | +++ src/imports/ABContactViewPage.qml 2015-05-15 20:13:54 +0000 | |||
4 | @@ -78,7 +78,7 @@ | |||
5 | 78 | } | 78 | } |
6 | 79 | } | 79 | } |
7 | 80 | 80 | ||
9 | 81 | onActionTrigerred: Qt.openUrlExternally(("%1:///%2").arg(action).arg(detail.value(0))) | 81 | onActionTrigerred: Qt.openUrlExternally(("%1:%2").arg(action).arg(detail.value(0))) |
10 | 82 | 82 | ||
11 | 83 | Component { | 83 | Component { |
12 | 84 | id: contactShareComponent | 84 | id: contactShareComponent |
13 | 85 | 85 | ||
14 | === modified file 'src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml' | |||
15 | --- src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2015-05-15 20:13:54 +0000 | |||
16 | +++ src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2015-05-15 20:13:54 +0000 | |||
17 | @@ -25,8 +25,6 @@ | |||
18 | 25 | property QtObject contact: null | 25 | property QtObject contact: null |
19 | 26 | property QtObject detail: null | 26 | property QtObject detail: null |
20 | 27 | property variant fields: null | 27 | property variant fields: null |
21 | 28 | signal actionTrigerred(string action) | ||
22 | 29 | |||
23 | 30 | // help to test used to retrieve the correct element | 28 | // help to test used to retrieve the correct element |
24 | 31 | property int index: -1 | 29 | property int index: -1 |
25 | 32 | 30 | ||
26 | 33 | 31 | ||
27 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailEmailsView.qml' | |||
28 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailEmailsView.qml 2015-05-15 20:13:54 +0000 | |||
29 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailEmailsView.qml 2015-05-15 20:13:54 +0000 | |||
30 | @@ -19,11 +19,14 @@ | |||
31 | 19 | import Ubuntu.Components 1.1 | 19 | import Ubuntu.Components 1.1 |
32 | 20 | 20 | ||
33 | 21 | ContactDetailGroupWithTypeView { | 21 | ContactDetailGroupWithTypeView { |
34 | 22 | id: root | ||
35 | 23 | |||
36 | 22 | detailType: QtContacts.ContactDetail.Email | 24 | detailType: QtContacts.ContactDetail.Email |
37 | 23 | title: i18n.dtr("address-book-app", "Email") | 25 | title: i18n.dtr("address-book-app", "Email") |
38 | 24 | fields: [ 0 ] | 26 | fields: [ 0 ] |
39 | 25 | defaultAction: Action { | 27 | defaultAction: Action { |
40 | 26 | text: i18n.dtr("address-book-app", "Email") | 28 | text: i18n.dtr("address-book-app", "Email") |
41 | 29 | name: "mailto" | ||
42 | 27 | iconName: "email" | 30 | iconName: "email" |
43 | 28 | } | 31 | } |
44 | 29 | } | 32 | } |
45 | 30 | 33 | ||
46 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailGroupWithTypeView.qml' | |||
47 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailGroupWithTypeView.qml 2015-05-15 20:13:54 +0000 | |||
48 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailGroupWithTypeView.qml 2015-05-15 20:13:54 +0000 | |||
49 | @@ -25,8 +25,8 @@ | |||
50 | 25 | ContactDetailGroupWithTypeBase { | 25 | ContactDetailGroupWithTypeBase { |
51 | 26 | id: root | 26 | id: root |
52 | 27 | 27 | ||
55 | 28 | property Action defaultAction | 28 | property QtObject defaultAction: null |
56 | 29 | signal actionTrigerred(string action, QtObject detail) | 29 | signal actionTrigerred(string actionName, QtObject detail) |
57 | 30 | 30 | ||
58 | 31 | showEmpty: false | 31 | showEmpty: false |
59 | 32 | headerDelegate: ListItem.Empty { | 32 | headerDelegate: ListItem.Empty { |
60 | @@ -61,6 +61,7 @@ | |||
61 | 61 | 61 | ||
62 | 62 | height: implicitHeight | 62 | height: implicitHeight |
63 | 63 | width: root.width | 63 | width: root.width |
65 | 64 | onClicked: root.actionTrigerred(action, detail) | 64 | |
66 | 65 | onClicked: root.actionTrigerred(root.defaultAction.name, detail) | ||
67 | 65 | } | 66 | } |
68 | 66 | } | 67 | } |
69 | 67 | 68 | ||
70 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumberView.qml' | |||
71 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumberView.qml 2015-05-15 20:13:54 +0000 | |||
72 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumberView.qml 2015-05-15 20:13:54 +0000 | |||
73 | @@ -25,6 +25,8 @@ | |||
74 | 25 | property alias lineHeight: view.lineHeight | 25 | property alias lineHeight: view.lineHeight |
75 | 26 | readonly property bool isReady: (fields != null) && (detail != null) | 26 | readonly property bool isReady: (fields != null) && (detail != null) |
76 | 27 | 27 | ||
77 | 28 | signal actionTrigerred(string actionName, QtObject detail) | ||
78 | 29 | |||
79 | 28 | function populateValues() | 30 | function populateValues() |
80 | 29 | { | 31 | { |
81 | 30 | if (isReady) { | 32 | if (isReady) { |
82 | @@ -38,6 +40,7 @@ | |||
83 | 38 | 40 | ||
84 | 39 | implicitHeight: view.implicitHeight | 41 | implicitHeight: view.implicitHeight |
85 | 40 | onIsReadyChanged: populateValues() | 42 | onIsReadyChanged: populateValues() |
86 | 43 | |||
87 | 41 | Connections { | 44 | Connections { |
88 | 42 | target: root.detail | 45 | target: root.detail |
89 | 43 | onDetailChanged: populateValues() | 46 | onDetailChanged: populateValues() |
90 | @@ -71,7 +74,7 @@ | |||
91 | 71 | width: units.gu(4) | 74 | width: units.gu(4) |
92 | 72 | height: units.gu(4) | 75 | height: units.gu(4) |
93 | 73 | iconName: "message" | 76 | iconName: "message" |
95 | 74 | onClicked: root.actionTrigerred("message") | 77 | onClicked: root.actionTrigerred("message", root.detail) |
96 | 75 | } | 78 | } |
97 | 76 | 79 | ||
98 | 77 | 80 | ||
99 | @@ -88,7 +91,6 @@ | |||
100 | 88 | width: units.gu(4) | 91 | width: units.gu(4) |
101 | 89 | height: units.gu(4) | 92 | height: units.gu(4) |
102 | 90 | iconName: "call-start" | 93 | iconName: "call-start" |
104 | 91 | onClicked: root.actionTrigerred("tel") | 94 | onClicked: root.actionTrigerred("tel", root.detail) |
105 | 92 | } | 95 | } |
106 | 93 | |||
107 | 94 | } | 96 | } |
108 | 95 | 97 | ||
109 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumbersView.qml' | |||
110 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumbersView.qml 2015-05-15 20:13:54 +0000 | |||
111 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailPhoneNumbersView.qml 2015-05-15 20:13:54 +0000 | |||
112 | @@ -18,6 +18,7 @@ | |||
113 | 18 | import QtContacts 5.0 as QtContacts | 18 | import QtContacts 5.0 as QtContacts |
114 | 19 | 19 | ||
115 | 20 | import Ubuntu.Contacts 0.1 | 20 | import Ubuntu.Contacts 0.1 |
116 | 21 | import Ubuntu.Components 1.1 | ||
117 | 21 | 22 | ||
118 | 22 | ContactDetailGroupWithTypeView { | 23 | ContactDetailGroupWithTypeView { |
119 | 23 | id: root | 24 | id: root |
120 | @@ -27,15 +28,22 @@ | |||
121 | 27 | 28 | ||
122 | 28 | title: i18n.dtr("address-book-app", "Phone") | 29 | title: i18n.dtr("address-book-app", "Phone") |
123 | 29 | typeModel: ContactDetailPhoneNumberTypeModel { } | 30 | typeModel: ContactDetailPhoneNumberTypeModel { } |
124 | 31 | defaultAction: Action { | ||
125 | 32 | text: i18n.dtr("address-book-app", "Phone") | ||
126 | 33 | name: "default" | ||
127 | 34 | } | ||
128 | 30 | detailDelegate: ContactDetailPhoneNumberView { | 35 | detailDelegate: ContactDetailPhoneNumberView { |
129 | 31 | property variant detailType: detail && root.contact && root.typeModelReady ? root.getType(detail) : null | 36 | property variant detailType: detail && root.contact && root.typeModelReady ? root.getType(detail) : null |
130 | 32 | 37 | ||
131 | 38 | action: root.defaultAction | ||
132 | 33 | contact: root.contact | 39 | contact: root.contact |
133 | 34 | fields: root.fields | 40 | fields: root.fields |
134 | 35 | typeLabel: detailType ? detailType.label : "" | 41 | typeLabel: detailType ? detailType.label : "" |
135 | 36 | 42 | ||
136 | 37 | height: implicitHeight | 43 | height: implicitHeight |
137 | 38 | width: root.width | 44 | width: root.width |
139 | 39 | onActionTrigerred: root.actionTrigerred(action, detail) | 45 | |
140 | 46 | onActionTrigerred: root.actionTrigerred(actionName, detail) | ||
141 | 47 | onClicked: root.actionTrigerred(root.defaultAction.name, detail) | ||
142 | 40 | } | 48 | } |
143 | 41 | } | 49 | } |
144 | 42 | 50 | ||
145 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml' | |||
146 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml 2015-05-15 20:13:54 +0000 | |||
147 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactDetailWithTypeView.qml 2015-05-15 20:13:54 +0000 | |||
148 | @@ -17,6 +17,7 @@ | |||
149 | 17 | import QtQuick 2.2 | 17 | import QtQuick 2.2 |
150 | 18 | import QtContacts 5.0 | 18 | import QtContacts 5.0 |
151 | 19 | 19 | ||
152 | 20 | import Ubuntu.Components 1.1 | ||
153 | 20 | import Ubuntu.AddressBook.Base 0.1 | 21 | import Ubuntu.AddressBook.Base 0.1 |
154 | 21 | 22 | ||
155 | 22 | ContactDetailBase { | 23 | ContactDetailBase { |
156 | @@ -39,6 +40,7 @@ | |||
157 | 39 | 40 | ||
158 | 40 | implicitHeight: view.implicitHeight | 41 | implicitHeight: view.implicitHeight |
159 | 41 | onIsReadyChanged: populateValues() | 42 | onIsReadyChanged: populateValues() |
160 | 43 | |||
161 | 42 | Connections { | 44 | Connections { |
162 | 43 | target: root.detail | 45 | target: root.detail |
163 | 44 | onDetailChanged: populateValues() | 46 | onDetailChanged: populateValues() |
164 | @@ -52,11 +54,24 @@ | |||
165 | 52 | parentIndex: root.index | 54 | parentIndex: root.index |
166 | 53 | 55 | ||
167 | 54 | anchors { | 56 | anchors { |
169 | 55 | right: parent.right | 57 | left: parent.left |
170 | 58 | leftMargin: units.gu(2) | ||
171 | 59 | right: icon.left | ||
172 | 56 | rightMargin: units.gu(2) | 60 | rightMargin: units.gu(2) |
173 | 57 | top: parent.top | 61 | top: parent.top |
177 | 58 | left: parent.left | 62 | } |
178 | 59 | leftMargin: units.gu(2) | 63 | } |
179 | 60 | } | 64 | |
180 | 65 | Icon { | ||
181 | 66 | id: icon | ||
182 | 67 | |||
183 | 68 | anchors { | ||
184 | 69 | right: parent.right | ||
185 | 70 | rightMargin: units.gu(3) | ||
186 | 71 | verticalCenter: parent.verticalCenter | ||
187 | 72 | } | ||
188 | 73 | width: root.action && (root.action.iconName !== "") ? units.gu(2.5) : 0 | ||
189 | 74 | height: width | ||
190 | 75 | name: root.action ? root.action.iconName : "" | ||
191 | 61 | } | 76 | } |
192 | 62 | } | 77 | } |
193 | 63 | 78 | ||
194 | === modified file 'src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml' | |||
195 | --- src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml 2015-05-15 20:13:54 +0000 | |||
196 | +++ src/imports/Ubuntu/AddressBook/ContactView/ContactViewPage.qml 2015-05-15 20:13:54 +0000 | |||
197 | @@ -123,7 +123,7 @@ | |||
198 | 123 | right: parent.right | 123 | right: parent.right |
199 | 124 | } | 124 | } |
200 | 125 | height: implicitHeight | 125 | height: implicitHeight |
202 | 126 | onActionTrigerred: root.actionTrigerred(action, root.contact, detail) | 126 | onActionTrigerred: root.actionTrigerred(actionName, root.contact, detail) |
203 | 127 | } | 127 | } |
204 | 128 | 128 | ||
205 | 129 | ContactDetailEmailsView { | 129 | ContactDetailEmailsView { |
206 | @@ -135,6 +135,7 @@ | |||
207 | 135 | right: parent.right | 135 | right: parent.right |
208 | 136 | } | 136 | } |
209 | 137 | height: implicitHeight | 137 | height: implicitHeight |
210 | 138 | onActionTrigerred: root.actionTrigerred(actionName, root.contact, detail) | ||
211 | 138 | } | 139 | } |
212 | 139 | 140 | ||
213 | 140 | ContactDetailOnlineAccountsView { | 141 | ContactDetailOnlineAccountsView { |
214 | @@ -144,6 +145,7 @@ | |||
215 | 144 | right: parent.right | 145 | right: parent.right |
216 | 145 | } | 146 | } |
217 | 146 | height: implicitHeight | 147 | height: implicitHeight |
218 | 148 | onActionTrigerred: root.actionTrigerred(actionName, root.contact, detail) | ||
219 | 147 | } | 149 | } |
220 | 148 | 150 | ||
221 | 149 | ContactDetailAddressesView { | 151 | ContactDetailAddressesView { |
222 | @@ -155,6 +157,7 @@ | |||
223 | 155 | right: parent.right | 157 | right: parent.right |
224 | 156 | } | 158 | } |
225 | 157 | height: implicitHeight | 159 | height: implicitHeight |
226 | 160 | onActionTrigerred: root.actionTrigerred(actionName, root.contact, detail) | ||
227 | 158 | } | 161 | } |
228 | 159 | 162 | ||
229 | 160 | ContactDetailOrganizationsView { | 163 | ContactDetailOrganizationsView { |
230 | @@ -166,6 +169,7 @@ | |||
231 | 166 | right: parent.right | 169 | right: parent.right |
232 | 167 | } | 170 | } |
233 | 168 | height: implicitHeight | 171 | height: implicitHeight |
234 | 172 | onActionTrigerred: root.actionTrigerred(actionName, root.contact, detail) | ||
235 | 169 | } | 173 | } |
236 | 170 | 174 | ||
237 | 171 | Item { | 175 | Item { |
238 | 172 | 176 | ||
239 | === modified file 'tests/data/vcard_single.vcf' | |||
240 | --- tests/data/vcard_single.vcf 2014-08-13 20:52:57 +0000 | |||
241 | +++ tests/data/vcard_single.vcf 2015-05-15 20:13:54 +0000 | |||
242 | @@ -12,5 +12,6 @@ | |||
243 | 12 | ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America | 12 | ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America |
244 | 13 | LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America | 13 | LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America |
245 | 14 | EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com | 14 | EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com |
246 | 15 | EMAIL;TYPE=INTERNET:bubbagump@example.com | ||
247 | 15 | REV:2008-04-24T19:52:43Z | 16 | REV:2008-04-24T19:52:43Z |
248 | 16 | END:VCARD | 17 | END:VCARD |
249 | 17 | 18 | ||
250 | === modified file 'tests/qml/tst_ContactPreviewPage.qml' | |||
251 | --- tests/qml/tst_ContactPreviewPage.qml 2015-05-15 20:13:54 +0000 | |||
252 | +++ tests/qml/tst_ContactPreviewPage.qml 2015-05-15 20:13:54 +0000 | |||
253 | @@ -43,6 +43,13 @@ | |||
254 | 43 | return ContactUtilJS.createContact(details, root) | 43 | return ContactUtilJS.createContact(details, root) |
255 | 44 | } | 44 | } |
256 | 45 | 45 | ||
257 | 46 | function createSignalSpy(target, signalName) { | ||
258 | 47 | var spy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', root, "") | ||
259 | 48 | spy.target = target | ||
260 | 49 | spy.signalName = signalName | ||
261 | 50 | return spy | ||
262 | 51 | } | ||
263 | 52 | |||
264 | 46 | VCardParser { | 53 | VCardParser { |
265 | 47 | id: vcardParser | 54 | id: vcardParser |
266 | 48 | 55 | ||
267 | @@ -113,7 +120,6 @@ | |||
268 | 113 | { | 120 | { |
269 | 114 | compare(vcardParser.contacts.length, 1) | 121 | compare(vcardParser.contacts.length, 1) |
270 | 115 | var contact = vcardParser.contacts[0] | 122 | var contact = vcardParser.contacts[0] |
271 | 116 | console.debug("Contact: " + contact.phoneNumber.number) | ||
272 | 117 | contactPreviewPage.contact = contact | 123 | contactPreviewPage.contact = contact |
273 | 118 | tryCompare(contactPreviewPage, "title", "Forrest Gump") | 124 | tryCompare(contactPreviewPage, "title", "Forrest Gump") |
274 | 119 | // PhoneNumbers | 125 | // PhoneNumbers |
275 | @@ -143,7 +149,7 @@ | |||
276 | 143 | // number of e-mails | 149 | // number of e-mails |
277 | 144 | var emailGroup = findChild(root, "emails") | 150 | var emailGroup = findChild(root, "emails") |
278 | 145 | var emails = findChildOfType(emailGroup, "BasicFieldView") | 151 | var emails = findChildOfType(emailGroup, "BasicFieldView") |
280 | 146 | compare(emails.length, 1) | 152 | compare(emails.length, 2) |
281 | 147 | 153 | ||
282 | 148 | // e-mail address | 154 | // e-mail address |
283 | 149 | var email = findChild(emailGroup, "label_emailAddress_0.0") | 155 | var email = findChild(emailGroup, "label_emailAddress_0.0") |
284 | @@ -151,6 +157,13 @@ | |||
285 | 151 | compare(email.text, "forrestgump@example.com") | 157 | compare(email.text, "forrestgump@example.com") |
286 | 152 | compare(emailType.text, "Home") | 158 | compare(emailType.text, "Home") |
287 | 153 | 159 | ||
288 | 160 | // e-mail address | ||
289 | 161 | var email1 = findChild(emailGroup, "label_emailAddress_1.0") | ||
290 | 162 | var emailType1 = findChild(emailGroup, "type_email_1") | ||
291 | 163 | compare(email1.text, "bubbagump@example.com") | ||
292 | 164 | compare(emailType1.text, "Home") | ||
293 | 165 | |||
294 | 166 | |||
295 | 154 | // Address | 167 | // Address |
296 | 155 | // ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America | 168 | // ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America |
297 | 156 | // ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America | 169 | // ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America |
298 | @@ -205,6 +218,45 @@ | |||
299 | 205 | compare(org_role.text, "") | 218 | compare(org_role.text, "") |
300 | 206 | compare(org_title.text, "Shrimp Man") | 219 | compare(org_title.text, "Shrimp Man") |
301 | 207 | } | 220 | } |
302 | 221 | |||
303 | 222 | function test_click_on_email() | ||
304 | 223 | { | ||
305 | 224 | // load contact from vcard | ||
306 | 225 | compare(vcardParser.contacts.length, 1) | ||
307 | 226 | var contact = vcardParser.contacts[0] | ||
308 | 227 | contactPreviewPage.contact = contact | ||
309 | 228 | // wait contact be loaded | ||
310 | 229 | waitForRendering(contactPreviewPage); | ||
311 | 230 | |||
312 | 231 | // find object 0 | ||
313 | 232 | var emailGroup = findChild(root, "emails") | ||
314 | 233 | var email = findChild(emailGroup, "label_emailAddress_0.0") | ||
315 | 234 | tryCompare(email, "text", "forrestgump@example.com") | ||
316 | 235 | tryCompare(email, "visible", true) | ||
317 | 236 | |||
318 | 237 | // click on e-mail field | ||
319 | 238 | var spy = root.createSignalSpy(contactPreviewPage, "actionTrigerred"); | ||
320 | 239 | mouseClick(email, email.width / 2, email.height / 2) | ||
321 | 240 | |||
322 | 241 | tryCompare(spy, "count", 1) | ||
323 | 242 | compare(spy.signalArguments[0][0], "mailto") | ||
324 | 243 | compare(spy.signalArguments[0][2].value(0), "forrestgump@example.com") | ||
325 | 244 | |||
326 | 245 | spy.clear() | ||
327 | 246 | |||
328 | 247 | // find object 1 | ||
329 | 248 | var email1 = findChild(emailGroup, "label_emailAddress_1.0") | ||
330 | 249 | tryCompare(email1, "text", "bubbagump@example.com") | ||
331 | 250 | tryCompare(email1, "visible", true) | ||
332 | 251 | |||
333 | 252 | // click on e-mail field | ||
334 | 253 | mouseClick(email1, email1.width / 2, email1.height / 2) | ||
335 | 254 | |||
336 | 255 | // check new values | ||
337 | 256 | tryCompare(spy, "count", 1) | ||
338 | 257 | compare(spy.signalArguments[0][0], "mailto") | ||
339 | 258 | compare(spy.signalArguments[0][2].value(0), "bubbagump@example.com") | ||
340 | 259 | } | ||
341 | 208 | } | 260 | } |
342 | 209 | } | 261 | } |
343 | 210 | 262 |
PASSED: Continuous integration, rev:449 jenkins. qa.ubuntu. com/job/ address- book-app- ci/821/ jenkins. qa.ubuntu. com/job/ address- book-app- vivid-i386- ci/124 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 2824 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 2422 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 2822 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 2822/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 20504
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/821/ rebuild
http://