Merge lp:~elopio/ubuntu-calculator-app/autopilot-1.4 into lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk

Proposed by Leo Arias
Status: Merged
Approved by: Francis Ginther
Approved revision: 187
Merged at revision: 188
Proposed branch: lp:~elopio/ubuntu-calculator-app/autopilot-1.4
Merge into: lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk
Diff against target: 81 lines (+19/-10)
3 files modified
debian/control (+1/-1)
tests/autopilot/ubuntu_calculator_app/emulators.py (+12/-6)
tests/autopilot/ubuntu_calculator_app/tests/__init__.py (+6/-3)
To merge this branch: bzr merge lp:~elopio/ubuntu-calculator-app/autopilot-1.4
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Riccardo Padovani Approve
Review via email: mp+192643@code.launchpad.net

Commit message

Update the tests to work with autopilot 1.4.

To post a comment you must log in.
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Thanks :)

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

This branch can't be merged until autopilot 1.4 is released to the trusty jenkins runners. Sorry for not mentioning this.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Added daily-build ppa to job configuration.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Trying a different approach to add the PPA. Re-approving.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-10-23 22:39:12 +0000
3+++ debian/control 2013-11-05 00:41:21 +0000
4@@ -25,7 +25,7 @@
5 ${misc:Depends},
6 ubuntu-calculator-app (= ${binary:Version}),
7 ubuntu-ui-toolkit-autopilot,
8- libautopilot-qt (<< 1.4),
9+ libautopilot-qt (>= 1.4),
10 python-support (>= 0.90)
11 Description: Autopilot tests for the calculator app for Ubuntu
12 ubuntu-calculator-app is a calculator app for the Ubuntu touch. This package contains autopilot tests for it.
13
14=== modified file 'tests/autopilot/ubuntu_calculator_app/emulators.py'
15--- tests/autopilot/ubuntu_calculator_app/emulators.py 2013-09-24 16:51:18 +0000
16+++ tests/autopilot/ubuntu_calculator_app/emulators.py 2013-11-05 00:41:21 +0000
17@@ -16,6 +16,8 @@
18
19 """Calculator app autopilot emulators."""
20
21+from autopilot.introspection import dbus
22+
23 from ubuntuuitoolkit import emulators as toolkit_emulators
24
25
26@@ -193,12 +195,16 @@
27 return result_label.numbers
28
29 def get_result_label(self):
30- results = self.select_many('CalcLabel', objectName='result')
31- count = len(results)
32- if count > 0:
33- return results[count - 1]
34- else:
35- return None
36+ try:
37+ return self.select_single(
38+ 'CalcLabel', objectName='result', isLast=True)
39+ except dbus.StateNotFoundError:
40+ results = self.select_many('CalcLabel', objectName='result')
41+ count = len(results)
42+ if count > 0:
43+ return results[count - 1]
44+ else:
45+ return None
46
47 def click_result_label(self):
48 result = self.get_result_label()
49
50=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/__init__.py'
51--- tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-10-09 09:14:47 +0000
52+++ tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-11-05 00:41:21 +0000
53@@ -14,7 +14,10 @@
54 from autopilot.input import Mouse, Touch, Pointer
55 from autopilot.platform import model
56 from autopilot.testcase import AutopilotTestCase
57-from ubuntuuitoolkit import emulators as toolkit_emulators
58+from ubuntuuitoolkit import (
59+ base,
60+ emulators as toolkit_emulators
61+)
62
63 from ubuntu_calculator_app import emulators
64
65@@ -55,14 +58,14 @@
66
67 def launch_test_local(self):
68 self.app = self.launch_test_application(
69- "qmlscene",
70+ base.get_qmlscene_launch_command(),
71 self.local_location,
72 app_type='qt',
73 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
74
75 def launch_test_installed(self):
76 self.app = self.launch_test_application(
77- "qmlscene",
78+ base.get_qmlscene_launch_command(),
79 self.installed_location,
80 "--desktop_file_hint="
81 "/usr/share/applications/ubuntu-calculator-app.desktop",

Subscribers

People subscribed via source and target branches