Merge lp:~nskaggs/ubuntu-clock-app/add-click-testing-support into lp:ubuntu-clock-app/saucy

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 208
Merged at revision: 208
Proposed branch: lp:~nskaggs/ubuntu-clock-app/add-click-testing-support
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 41 lines (+9/-2)
1 file modified
tests/autopilot/ubuntu_clock_app/tests/__init__.py (+9/-2)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-clock-app/add-click-testing-support
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan code logic Approve
Review via email: mp+188081@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
Nekhelesh Ramananthan (nik90) wrote :

code logic looks good to me, however I cannot test the code since I cannot install a click package on the desktop.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntu_clock_app/tests/__init__.py'
2--- tests/autopilot/ubuntu_clock_app/tests/__init__.py 2013-09-06 01:43:49 +0000
3+++ tests/autopilot/ubuntu_clock_app/tests/__init__.py 2013-09-27 15:43:26 +0000
4@@ -44,6 +44,7 @@
5 scenarios = [('with touch', dict(input_device_class=Touch))]
6
7 local_location = "../../ubuntu-clock-app.qml"
8+ installed_location = "/usr/share/ubuntu-clock-app/ubuntu-clock-app.qml"
9 sqlite_dir = os.path.expanduser(
10 "~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases")
11 backup_dir = sqlite_dir + ".backup"
12@@ -64,8 +65,11 @@
13
14 if os.path.exists(self.local_location):
15 self.launch_test_local()
16- else:
17+ elif os.path.exists(self.installed_location):
18 self.launch_test_installed()
19+ else:
20+ self.launch_test_click()
21+
22
23 def launch_test_local(self):
24 self.app = self.launch_test_application(
25@@ -77,12 +81,15 @@
26 def launch_test_installed(self):
27 self.app = self.launch_test_application(
28 "qmlscene",
29- "/usr/share/ubuntu-clock-app/ubuntu-clock-app.qml",
30+ self.installed_location,
31 "--desktop_file_hint=/usr/share/applications/"
32 "ubuntu-clock-app.desktop",
33 app_type='qt',
34 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
35
36+ def launch_test_click(self):
37+ self.app = self.launch_click_package("com.ubuntu.ubuntu-clock-app", emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
38+
39 def temp_move_sqlite_db(self):
40 if os.path.exists(self.backup_dir):
41 shutil.rmtree(self.backup_dir)

Subscribers

People subscribed via source and target branches