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
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-09-24 17:26:04 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-09-27 15:51:02 +0000
@@ -32,6 +32,7 @@
32 scenarios = [('with touch', dict(input_device_class=Touch))]32 scenarios = [('with touch', dict(input_device_class=Touch))]
3333
34 local_location = "../../ubuntu-weather-app.qml"34 local_location = "../../ubuntu-weather-app.qml"
35 installed_location = "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml"
3536
36 def setUp(self):37 def setUp(self):
37 self.pointing_device = Pointer(self.input_device_class.create())38 self.pointing_device = Pointer(self.input_device_class.create())
@@ -47,8 +48,10 @@
47 def launch_app(self):48 def launch_app(self):
48 if os.path.exists(self.local_location):49 if os.path.exists(self.local_location):
49 self.launch_test_local()50 self.launch_test_local()
51 elif os.path.exists(self.installed_location):
52 self.launch_test_installed()
50 else:53 else:
51 self.launch_test_installed()54 self.launch_test_click()
5255
53 def launch_test_local(self):56 def launch_test_local(self):
54 self.app = self.launch_test_application(57 self.app = self.launch_test_application(
@@ -60,11 +63,14 @@
60 def launch_test_installed(self):63 def launch_test_installed(self):
61 self.app = self.launch_test_application(64 self.app = self.launch_test_application(
62 self.qmlscene(),65 self.qmlscene(),
63 "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml",66 self.installed_location,
64 "--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop",67 "--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop",
65 app_type='qt',68 app_type='qt',
66 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)69 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
6770
71 def launch_test_click(self):
72 self.app = self.launch_click_package("com.ubuntu.ubuntu-weather-app", emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
73
68 def launch_and_quit_app(self):74 def launch_and_quit_app(self):
69 self.launch_app()75 self.launch_app()
70 self.get_qml_view().visible.wait_for(True)76 self.get_qml_view().visible.wait_for(True)

Subscribers

People subscribed via source and target branches