Merge lp:~boiko/dialer-app/rtm-fix_1410500 into lp:dialer-app/rtm-14.09

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Bill Filler
Approved revision: 261
Merged at revision: 263
Proposed branch: lp:~boiko/dialer-app/rtm-fix_1410500
Merge into: lp:dialer-app/rtm-14.09
Diff against target: 81 lines (+43/-2)
3 files modified
src/qml/HistoryPage/HistoryDelegate.qml (+1/-1)
src/qml/HistoryPage/HistoryDetailsPage.qml (+17/-1)
tests/autopilot/dialer_app/tests/test_calls.py (+25/-0)
To merge this branch: bzr merge lp:~boiko/dialer-app/rtm-fix_1410500
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+249228@code.launchpad.net

Commit message

Change HistoryDetailsPage to display the exact phone number that was used on each call and populate the Dialpad accordingly.

Description of the change

Change HistoryDetailsPage to display the exact phone number that was used on each call and populate the Dialpad accordingly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
--- src/qml/HistoryPage/HistoryDelegate.qml 2014-12-16 01:39:49 +0000
+++ src/qml/HistoryPage/HistoryDelegate.qml 2015-02-10 17:35:31 +0000
@@ -51,7 +51,7 @@
51 }51 }
5252
53 // clicking an item only populates the dialpad view, it doesn't call directly53 // clicking an item only populates the dialpad view, it doesn't call directly
54 mainView.populateDialpad(participant.phoneNumber, mainView.account ? mainView.account.accountId : "");54 mainView.populateDialpad(model.remoteParticipant, mainView.account ? mainView.account.accountId : "");
55 }55 }
5656
57 function selectCallType() {57 function selectCallType() {
5858
=== modified file 'src/qml/HistoryPage/HistoryDetailsPage.qml'
--- src/qml/HistoryPage/HistoryDetailsPage.qml 2015-01-13 12:08:06 +0000
+++ src/qml/HistoryPage/HistoryDetailsPage.qml 2015-02-10 17:35:31 +0000
@@ -261,14 +261,30 @@
261 left: parent.left261 left: parent.left
262 verticalCenter: parent.verticalCenter262 verticalCenter: parent.verticalCenter
263 }263 }
264 verticalAlignment: Qt.AlignVCenter
265 }
266
267 Label {
268 id: remoteParticipantId
269 // FIXME: we need to check if the id is actually a phone number
270 text: PhoneUtils.PhoneUtils.format(modelData.remoteParticipant)
271 anchors {
272 left: timeLabel.right
273 leftMargin: units.gu(1)
274 verticalCenter: parent.verticalCenter
275 }
264 color: UbuntuColors.lightAubergine276 color: UbuntuColors.lightAubergine
265 verticalAlignment: Qt.AlignVCenter277 verticalAlignment: Qt.AlignVCenter
278 MouseArea {
279 anchors.fill:parent
280 onClicked: mainView.populateDialpad(modelData.remoteParticipant, mainView.account ? mainView.account.accountId : "");
281 }
266 }282 }
267283
268 Label {284 Label {
269 id: simLabel285 id: simLabel
270 anchors {286 anchors {
271 left: timeLabel.right287 left: remoteParticipantId.right
272 leftMargin: units.gu(1)288 leftMargin: units.gu(1)
273 verticalCenter: timeLabel.verticalCenter289 verticalCenter: timeLabel.verticalCenter
274 }290 }
275291
=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
--- tests/autopilot/dialer_app/tests/test_calls.py 2014-09-30 00:49:13 +0000
+++ tests/autopilot/dialer_app/tests/test_calls.py 2015-02-10 17:35:31 +0000
@@ -170,3 +170,28 @@
170 except MismatchError as e:170 except MismatchError as e:
171 print('Expected failure due to known Mir crash '171 print('Expected failure due to known Mir crash '
172 '(https://launchpad.net/bugs/1240400): %s' % e)172 '(https://launchpad.net/bugs/1240400): %s' % e)
173
174 def test_last_called_number(self):
175 number = "1234567"
176 formattedNumber = "1 234-567"
177
178 number2 = "1231234567"
179 formattedNumber2 = "1 231-234-567"
180
181 self.main_view.dialer_page.call_number(number, formattedNumber)
182 time.sleep(1)
183 self.main_view.live_call_page.click_hangup_button()
184 self.main_view.dialer_page.active.wait_for(True)
185
186 self.main_view.dialer_page.call_number(number2, formattedNumber2)
187 time.sleep(1)
188 self.main_view.live_call_page.click_hangup_button()
189 self.main_view.dialer_page.active.wait_for(True)
190
191 self.main_view.dialer_page.reveal_bottom_edge_page()
192 self.assertThat(self.history_list.visible, Eventually(Equals(True)))
193 self.assertThat(self.history_list.count, Eventually(Equals(1)))
194 historyEntry = self.get_history_for_number(number)
195 self.main_view._click_button(historyEntry)
196 self.assertThat(
197 self.main_view.dialer_page.dialNumber, Eventually(Equals(formattedNumber2)))

Subscribers

People subscribed via source and target branches