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

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Bill Filler
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 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

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

267. By Gustavo Pichorim Boiko

Fix a race condition.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2015-02-10 18:10:43 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2015-02-16 20:51:40 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import QtGraphicalEffects 1.0
21import Ubuntu.Components 1.120import Ubuntu.Components 1.1
22import Ubuntu.Components.ListItems 0.1 as ListItems21import Ubuntu.Components.ListItems 0.1 as ListItems
23import Ubuntu.Components.Popups 0.122import Ubuntu.Components.Popups 0.1
@@ -129,7 +128,7 @@
129 callObject["held"] = call.held;128 callObject["held"] = call.held;
130 callObject["muted"] = call.muted;129 callObject["muted"] = call.muted;
131 callObject["activeAudioOutput"] = call.activeAudioOutput;130 callObject["activeAudioOutput"] = call.activeAudioOutput;
132 callObject["audioOutputs"] = call.audioOutputs;131 callObject["audioOutputs"] = [];
133 callObject["isConference"] = call.isConference;132 callObject["isConference"] = call.isConference;
134133
135 reportStatus(callObject, i18n.tr("Call ended"));134 reportStatus(callObject, i18n.tr("Call ended"));
136135
=== modified file 'tests/autopilot/dialer_app/ListItemWithActions.py'
--- tests/autopilot/dialer_app/ListItemWithActions.py 2014-09-02 23:04:30 +0000
+++ tests/autopilot/dialer_app/ListItemWithActions.py 2015-02-16 20:51:40 +0000
@@ -23,7 +23,6 @@
23 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)23 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
2424
2525
26
27class HistoryDelegate(ListItemWithActions):26class HistoryDelegate(ListItemWithActions):
2827
29 """Autopilot helper for the History delegate."""28 """Autopilot helper for the History delegate."""
@@ -45,4 +44,3 @@
45 self._show_actions()44 self._show_actions()
46 icon = self.select_single('Icon11', name='contact-new')45 icon = self.select_single('Icon11', name='contact-new')
47 self.pointing_device.click_object(icon)46 self.pointing_device.click_object(icon)
48
4947
=== modified file 'tests/autopilot/dialer_app/__init__.py'
--- tests/autopilot/dialer_app/__init__.py 2014-08-14 17:19:48 +0000
+++ tests/autopilot/dialer_app/__init__.py 2015-02-16 20:51:40 +0000
@@ -22,7 +22,7 @@
2222
23 @property23 @property
24 def dialer_page(self):24 def dialer_page(self):
25 return self.wait_select_single(DialerPage)25 return self.wait_select_single(DialerPage, greeterMode=False)
2626
27 @property27 @property
28 def live_call_page(self):28 def live_call_page(self):
2929
=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
--- tests/autopilot/dialer_app/tests/test_calls.py 2015-02-10 17:27:52 +0000
+++ tests/autopilot/dialer_app/tests/test_calls.py 2015-02-16 20:51:40 +0000
@@ -179,12 +179,12 @@
179 formattedNumber2 = "1 231-234-567"179 formattedNumber2 = "1 231-234-567"
180180
181 self.main_view.dialer_page.call_number(number, formattedNumber)181 self.main_view.dialer_page.call_number(number, formattedNumber)
182 time.sleep(1)182 time.sleep(3)
183 self.main_view.live_call_page.click_hangup_button()183 self.main_view.live_call_page.click_hangup_button()
184 self.main_view.dialer_page.active.wait_for(True)184 self.main_view.dialer_page.active.wait_for(True)
185185
186 self.main_view.dialer_page.call_number(number2, formattedNumber2)186 self.main_view.dialer_page.call_number(number2, formattedNumber2)
187 time.sleep(1)187 time.sleep(3)
188 self.main_view.live_call_page.click_hangup_button()188 self.main_view.live_call_page.click_hangup_button()
189 self.main_view.dialer_page.active.wait_for(True)189 self.main_view.dialer_page.active.wait_for(True)
190190
@@ -194,4 +194,5 @@
194 historyEntry = self.get_history_for_number(number)194 historyEntry = self.get_history_for_number(number)
195 self.main_view._click_button(historyEntry)195 self.main_view._click_button(historyEntry)
196 self.assertThat(196 self.assertThat(
197 self.main_view.dialer_page.dialNumber, Eventually(Equals(formattedNumber2)))197 self.main_view.dialer_page.dialNumber,
198 Eventually(Equals(formattedNumber2)))
198199
=== modified file 'tests/autopilot/dialer_app/tests/test_logs.py'
--- tests/autopilot/dialer_app/tests/test_logs.py 2014-09-02 22:55:43 +0000
+++ tests/autopilot/dialer_app/tests/test_logs.py 2015-02-16 20:51:40 +0000
@@ -11,6 +11,7 @@
11"""Tests for the Dialer App"""11"""Tests for the Dialer App"""
1212
13import os13import os
14import shutil
14import subprocess15import subprocess
1516
16from autopilot.platform import model17from autopilot.platform import model
@@ -35,6 +36,7 @@
35 db_file = 'history.sqlite'36 db_file = 'history.sqlite'
36 local_db_dir = 'dialer_app/data/'37 local_db_dir = 'dialer_app/data/'
37 system_db_dir = '/usr/lib/python3/dist-packages/dialer_app/data/'38 system_db_dir = '/usr/lib/python3/dist-packages/dialer_app/data/'
39 temp_db_file = '/tmp/' + db_file
3840
39 def setUp(self):41 def setUp(self):
40 if os.path.exists('../../src/dialer-app'):42 if os.path.exists('../../src/dialer-app'):
@@ -42,8 +44,13 @@
42 else:44 else:
43 database = self.system_db_dir + self.db_file45 database = self.system_db_dir + self.db_file
4446
47 if os.path.exists(self.temp_db_file):
48 os.remove(self.temp_db_file)
49
50 shutil.copyfile(database, self.temp_db_file)
51
45 subprocess.call(['pkill', 'history-daemon'])52 subprocess.call(['pkill', 'history-daemon'])
46 os.environ['HISTORY_SQLITE_DBPATH'] = database53 os.environ['HISTORY_SQLITE_DBPATH'] = self.temp_db_file
47 with open(os.devnull, 'w') as devnull:54 with open(os.devnull, 'w') as devnull:
48 subprocess.Popen(['history-daemon'], stderr=devnull)55 subprocess.Popen(['history-daemon'], stderr=devnull)
4956

Subscribers

People subscribed via source and target branches