Merge lp:~nskaggs/ubuntu-calculator-app/add-click-test-support into lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Riccardo Padovani
Approved revision: 157
Merged at revision: 164
Proposed branch: lp:~nskaggs/ubuntu-calculator-app/add-click-test-support
Merge into: lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk
Diff against target: 43 lines (+11/-2)
1 file modified
tests/autopilot/ubuntu_calculator_app/tests/__init__.py (+11/-2)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-calculator-app/add-click-test-support
Reviewer Review Type Date Requested Status
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+188074@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: Needs Fixing (continuous-integration)
156. By Nicholas Skaggs

fix pep8 errors

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)
157. By Nicholas Skaggs

I <3 pep8

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
Riccardo Padovani (rpadovani) wrote :

Thanks for the implementation Nicholas :)
Works good for 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_calculator_app/tests/__init__.py'
2--- tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-09-17 14:24:28 +0000
3+++ tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-09-27 16:31:24 +0000
4@@ -32,6 +32,8 @@
5 scenarios = [('with touch', dict(input_device_class=Touch))]
6
7 local_location = "../../ubuntu-calculator-app.qml"
8+ installed_location = "/usr/share/ubuntu-calculator-app/" \
9+ "ubuntu-calculator-app.qml"
10
11 sqlite_dir = os.path.expanduser(
12 "~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases")
13@@ -52,8 +54,10 @@
14
15 if os.path.exists(self.local_location):
16 self.launch_test_local()
17- else:
18+ elif os.path.exists(self.installed_location):
19 self.launch_test_installed()
20+ else:
21+ self.launch_test_click()
22
23 def launch_test_local(self):
24 self.app = self.launch_test_application(
25@@ -65,12 +69,17 @@
26 def launch_test_installed(self):
27 self.app = self.launch_test_application(
28 "qmlscene",
29- "/usr/share/ubuntu-calculator-app/ubuntu-calculator-app.qml",
30+ self.installed_location,
31 "--desktop_file_hint="
32 "/usr/share/applications/ubuntu-calculator-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(
38+ "com.ubuntu.ubuntu-calculator-app",
39+ emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
40+
41 def temp_move_sqlite_db(self):
42 if os.path.exists(self.sqlite_dir):
43 shutil.move(self.sqlite_dir, self.backup_dir)

Subscribers

People subscribed via source and target branches