Merge lp:~tiagosh/dialer-app/fix-1410500 into lp:dialer-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 339
Merged at revision: 347
Proposed branch: lp:~tiagosh/dialer-app/fix-1410500
Merge into: lp:dialer-app
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:~tiagosh/dialer-app/fix-1410500
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+247063@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.

--Checklist--
Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~boiko/history-service/store_remote_participant_id/+merge/246710

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
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 (https://wiki.ubuntu.com/Process/Merges/TestPlan/dialer-app) 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?
N/A

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~tiagosh/dialer-app/fix-1410500 updated
338. By Tiago Salem Herrmann

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~tiagosh/dialer-app/fix-1410500 updated
339. By Tiago Salem Herrmann

add autopilot test

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
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.
No, but not related to the changes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
2--- src/qml/HistoryPage/HistoryDelegate.qml 2014-10-21 14:19:11 +0000
3+++ src/qml/HistoryPage/HistoryDelegate.qml 2015-01-28 21:11:55 +0000
4@@ -51,7 +51,7 @@
5 }
6
7 // clicking an item only populates the dialpad view, it doesn't call directly
8- mainView.populateDialpad(participant.phoneNumber, mainView.account ? mainView.account.accountId : "");
9+ mainView.populateDialpad(model.remoteParticipant, mainView.account ? mainView.account.accountId : "");
10 }
11
12 function selectCallType() {
13
14=== modified file 'src/qml/HistoryPage/HistoryDetailsPage.qml'
15--- src/qml/HistoryPage/HistoryDetailsPage.qml 2015-01-08 21:23:40 +0000
16+++ src/qml/HistoryPage/HistoryDetailsPage.qml 2015-01-28 21:11:55 +0000
17@@ -256,14 +256,30 @@
18 left: parent.left
19 verticalCenter: parent.verticalCenter
20 }
21+ verticalAlignment: Qt.AlignVCenter
22+ }
23+
24+ Label {
25+ id: remoteParticipantId
26+ // FIXME: we need to check if the id is actually a phone number
27+ text: PhoneUtils.PhoneUtils.format(modelData.remoteParticipant)
28+ anchors {
29+ left: timeLabel.right
30+ leftMargin: units.gu(1)
31+ verticalCenter: parent.verticalCenter
32+ }
33 color: UbuntuColors.lightAubergine
34 verticalAlignment: Qt.AlignVCenter
35+ MouseArea {
36+ anchors.fill:parent
37+ onClicked: mainView.populateDialpad(modelData.remoteParticipant, mainView.account ? mainView.account.accountId : "");
38+ }
39 }
40
41 Label {
42 id: simLabel
43 anchors {
44- left: timeLabel.right
45+ left: remoteParticipantId.right
46 leftMargin: units.gu(1)
47 verticalCenter: timeLabel.verticalCenter
48 }
49
50=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
51--- tests/autopilot/dialer_app/tests/test_calls.py 2014-09-30 00:49:13 +0000
52+++ tests/autopilot/dialer_app/tests/test_calls.py 2015-01-28 21:11:55 +0000
53@@ -170,3 +170,28 @@
54 except MismatchError as e:
55 print('Expected failure due to known Mir crash '
56 '(https://launchpad.net/bugs/1240400): %s' % e)
57+
58+ def test_last_called_number(self):
59+ number = "1234567"
60+ formattedNumber = "1 234-567"
61+
62+ number2 = "1231234567"
63+ formattedNumber2 = "1 231-234-567"
64+
65+ self.main_view.dialer_page.call_number(number, formattedNumber)
66+ time.sleep(1)
67+ self.main_view.live_call_page.click_hangup_button()
68+ self.main_view.dialer_page.active.wait_for(True)
69+
70+ self.main_view.dialer_page.call_number(number2, formattedNumber2)
71+ time.sleep(1)
72+ self.main_view.live_call_page.click_hangup_button()
73+ self.main_view.dialer_page.active.wait_for(True)
74+
75+ self.main_view.dialer_page.reveal_bottom_edge_page()
76+ self.assertThat(self.history_list.visible, Eventually(Equals(True)))
77+ self.assertThat(self.history_list.count, Eventually(Equals(1)))
78+ historyEntry = self.get_history_for_number(number)
79+ self.main_view._click_button(historyEntry)
80+ self.assertThat(
81+ self.main_view.dialer_page.dialNumber, Eventually(Equals(formattedNumber2)))

Subscribers

People subscribed via source and target branches