Merge lp:~nskaggs/ubuntu-weather-app/add-click-testing-support into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Martin Borho
Approved revision: 126
Merged at revision: 126
Proposed branch: lp:~nskaggs/ubuntu-weather-app/add-click-testing-support
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 39 lines (+8/-2)
1 file modified
tests/autopilot/ubuntu_weather_app/tests/__init__.py (+8/-2)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-weather-app/add-click-testing-support
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+188085@code.launchpad.net

Commit message

Add support for testing via click packages

Description of the change

Add support for testing via click packages

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Looks good to me...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
2--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-09-24 17:26:04 +0000
3+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-09-27 15:51:02 +0000
4@@ -32,6 +32,7 @@
5 scenarios = [('with touch', dict(input_device_class=Touch))]
6
7 local_location = "../../ubuntu-weather-app.qml"
8+ installed_location = "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml"
9
10 def setUp(self):
11 self.pointing_device = Pointer(self.input_device_class.create())
12@@ -47,8 +48,10 @@
13 def launch_app(self):
14 if os.path.exists(self.local_location):
15 self.launch_test_local()
16+ elif os.path.exists(self.installed_location):
17+ self.launch_test_installed()
18 else:
19- self.launch_test_installed()
20+ self.launch_test_click()
21
22 def launch_test_local(self):
23 self.app = self.launch_test_application(
24@@ -60,11 +63,14 @@
25 def launch_test_installed(self):
26 self.app = self.launch_test_application(
27 self.qmlscene(),
28- "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml",
29+ self.installed_location,
30 "--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop",
31 app_type='qt',
32 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
33
34+ def launch_test_click(self):
35+ self.app = self.launch_click_package("com.ubuntu.ubuntu-weather-app", emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
36+
37 def launch_and_quit_app(self):
38 self.launch_app()
39 self.get_qml_view().visible.wait_for(True)

Subscribers

People subscribed via source and target branches