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
=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/__init__.py'
--- tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-09-17 14:24:28 +0000
+++ tests/autopilot/ubuntu_calculator_app/tests/__init__.py 2013-09-27 16:31:24 +0000
@@ -32,6 +32,8 @@
32 scenarios = [('with touch', dict(input_device_class=Touch))]32 scenarios = [('with touch', dict(input_device_class=Touch))]
3333
34 local_location = "../../ubuntu-calculator-app.qml"34 local_location = "../../ubuntu-calculator-app.qml"
35 installed_location = "/usr/share/ubuntu-calculator-app/" \
36 "ubuntu-calculator-app.qml"
3537
36 sqlite_dir = os.path.expanduser(38 sqlite_dir = os.path.expanduser(
37 "~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases")39 "~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases")
@@ -52,8 +54,10 @@
5254
53 if os.path.exists(self.local_location):55 if os.path.exists(self.local_location):
54 self.launch_test_local()56 self.launch_test_local()
55 else:57 elif os.path.exists(self.installed_location):
56 self.launch_test_installed()58 self.launch_test_installed()
59 else:
60 self.launch_test_click()
5761
58 def launch_test_local(self):62 def launch_test_local(self):
59 self.app = self.launch_test_application(63 self.app = self.launch_test_application(
@@ -65,12 +69,17 @@
65 def launch_test_installed(self):69 def launch_test_installed(self):
66 self.app = self.launch_test_application(70 self.app = self.launch_test_application(
67 "qmlscene",71 "qmlscene",
68 "/usr/share/ubuntu-calculator-app/ubuntu-calculator-app.qml",72 self.installed_location,
69 "--desktop_file_hint="73 "--desktop_file_hint="
70 "/usr/share/applications/ubuntu-calculator-app.desktop",74 "/usr/share/applications/ubuntu-calculator-app.desktop",
71 app_type='qt',75 app_type='qt',
72 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)76 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
7377
78 def launch_test_click(self):
79 self.app = self.launch_click_package(
80 "com.ubuntu.ubuntu-calculator-app",
81 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
82
74 def temp_move_sqlite_db(self):83 def temp_move_sqlite_db(self):
75 if os.path.exists(self.sqlite_dir):84 if os.path.exists(self.sqlite_dir):
76 shutil.move(self.sqlite_dir, self.backup_dir)85 shutil.move(self.sqlite_dir, self.backup_dir)

Subscribers

People subscribed via source and target branches