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

Proposed by Gustavo Pichorim Boiko on 2015-02-11
Status: Merged
Approved by: Bill Filler on 2015-02-13
Approved revision: 265
Merged at revision: 265
Proposed branch: lp:~boiko/dialer-app/rtm-fix_autopilot_multi_pagestack
Merge into: lp:dialer-app/rtm-14.09
Diff against target: 110 lines (+14/-9)
5 files modified
src/qml/LiveCallPage/LiveCall.qml (+1/-2)
tests/autopilot/dialer_app/ListItemWithActions.py (+0/-2)
tests/autopilot/dialer_app/__init__.py (+1/-1)
tests/autopilot/dialer_app/tests/test_calls.py (+4/-3)
tests/autopilot/dialer_app/tests/test_logs.py (+8/-1)
To merge this branch: bzr merge lp:~boiko/dialer-app/rtm-fix_autopilot_multi_pagestack
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team 2015-02-11 Pending
Review via email: mp+249373@code.launchpad.net

Commit message

Select the correct dialpad page on autopilot tests.

Description of the change

Select the correct dialpad page on autopilot tests.

To post a comment you must log in.
266. By Gustavo Pichorim Boiko on 2015-02-13

Run history-daemon using a database on /tmp to be able to update the schema
when necessary.

267. By Gustavo Pichorim Boiko on 2015-02-16

Fix a race condition.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
2--- src/qml/LiveCallPage/LiveCall.qml 2015-02-10 18:10:43 +0000
3+++ src/qml/LiveCallPage/LiveCall.qml 2015-02-16 20:51:40 +0000
4@@ -17,7 +17,6 @@
5 */
6
7 import QtQuick 2.0
8-import QtGraphicalEffects 1.0
9 import Ubuntu.Components 1.1
10 import Ubuntu.Components.ListItems 0.1 as ListItems
11 import Ubuntu.Components.Popups 0.1
12@@ -129,7 +128,7 @@
13 callObject["held"] = call.held;
14 callObject["muted"] = call.muted;
15 callObject["activeAudioOutput"] = call.activeAudioOutput;
16- callObject["audioOutputs"] = call.audioOutputs;
17+ callObject["audioOutputs"] = [];
18 callObject["isConference"] = call.isConference;
19
20 reportStatus(callObject, i18n.tr("Call ended"));
21
22=== modified file 'tests/autopilot/dialer_app/ListItemWithActions.py'
23--- tests/autopilot/dialer_app/ListItemWithActions.py 2014-09-02 23:04:30 +0000
24+++ tests/autopilot/dialer_app/ListItemWithActions.py 2015-02-16 20:51:40 +0000
25@@ -23,7 +23,6 @@
26 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
27
28
29-
30 class HistoryDelegate(ListItemWithActions):
31
32 """Autopilot helper for the History delegate."""
33@@ -45,4 +44,3 @@
34 self._show_actions()
35 icon = self.select_single('Icon11', name='contact-new')
36 self.pointing_device.click_object(icon)
37-
38
39=== modified file 'tests/autopilot/dialer_app/__init__.py'
40--- tests/autopilot/dialer_app/__init__.py 2014-08-14 17:19:48 +0000
41+++ tests/autopilot/dialer_app/__init__.py 2015-02-16 20:51:40 +0000
42@@ -22,7 +22,7 @@
43
44 @property
45 def dialer_page(self):
46- return self.wait_select_single(DialerPage)
47+ return self.wait_select_single(DialerPage, greeterMode=False)
48
49 @property
50 def live_call_page(self):
51
52=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
53--- tests/autopilot/dialer_app/tests/test_calls.py 2015-02-10 17:27:52 +0000
54+++ tests/autopilot/dialer_app/tests/test_calls.py 2015-02-16 20:51:40 +0000
55@@ -179,12 +179,12 @@
56 formattedNumber2 = "1 231-234-567"
57
58 self.main_view.dialer_page.call_number(number, formattedNumber)
59- time.sleep(1)
60+ time.sleep(3)
61 self.main_view.live_call_page.click_hangup_button()
62 self.main_view.dialer_page.active.wait_for(True)
63
64 self.main_view.dialer_page.call_number(number2, formattedNumber2)
65- time.sleep(1)
66+ time.sleep(3)
67 self.main_view.live_call_page.click_hangup_button()
68 self.main_view.dialer_page.active.wait_for(True)
69
70@@ -194,4 +194,5 @@
71 historyEntry = self.get_history_for_number(number)
72 self.main_view._click_button(historyEntry)
73 self.assertThat(
74- self.main_view.dialer_page.dialNumber, Eventually(Equals(formattedNumber2)))
75+ self.main_view.dialer_page.dialNumber,
76+ Eventually(Equals(formattedNumber2)))
77
78=== modified file 'tests/autopilot/dialer_app/tests/test_logs.py'
79--- tests/autopilot/dialer_app/tests/test_logs.py 2014-09-02 22:55:43 +0000
80+++ tests/autopilot/dialer_app/tests/test_logs.py 2015-02-16 20:51:40 +0000
81@@ -11,6 +11,7 @@
82 """Tests for the Dialer App"""
83
84 import os
85+import shutil
86 import subprocess
87
88 from autopilot.platform import model
89@@ -35,6 +36,7 @@
90 db_file = 'history.sqlite'
91 local_db_dir = 'dialer_app/data/'
92 system_db_dir = '/usr/lib/python3/dist-packages/dialer_app/data/'
93+ temp_db_file = '/tmp/' + db_file
94
95 def setUp(self):
96 if os.path.exists('../../src/dialer-app'):
97@@ -42,8 +44,13 @@
98 else:
99 database = self.system_db_dir + self.db_file
100
101+ if os.path.exists(self.temp_db_file):
102+ os.remove(self.temp_db_file)
103+
104+ shutil.copyfile(database, self.temp_db_file)
105+
106 subprocess.call(['pkill', 'history-daemon'])
107- os.environ['HISTORY_SQLITE_DBPATH'] = database
108+ os.environ['HISTORY_SQLITE_DBPATH'] = self.temp_db_file
109 with open(os.devnull, 'w') as devnull:
110 subprocess.Popen(['history-daemon'], stderr=devnull)
111

Subscribers

People subscribed via source and target branches