Merge lp:~elopio/ubuntu-clock-app/qmlscene_launch into lp:ubuntu-clock-app/saucy

Proposed by Leo Arias
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 259
Merged at revision: 257
Proposed branch: lp:~elopio/ubuntu-clock-app/qmlscene_launch
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 64 lines (+10/-12)
1 file modified
tests/autopilot/ubuntu_clock_app/tests/__init__.py (+10/-12)
To merge this branch: bzr merge lp:~elopio/ubuntu-clock-app/qmlscene_launch
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nicholas Skaggs (community) Approve
Christopher Lee (community) Approve
Review via email: mp+193842@code.launchpad.net

Commit message

Use the test case class and methods from ubuntuuitoolkit autopilot base module.

To post a comment you must log in.
259. By Leo Arias

Fixed the import order.

Revision history for this message
Christopher Lee (veebers) wrote :

LGTM

review: Approve
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

veebers beat me :-)

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/__init__.py'
--- tests/autopilot/ubuntu_clock_app/tests/__init__.py 2013-10-09 08:20:41 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/__init__.py 2013-11-04 20:40:36 +0000
@@ -24,26 +24,24 @@
24import shutil24import shutil
25import logging25import logging
2626
27from autopilot.input import Mouse, Touch, Pointer27from autopilot import input
28from autopilot.platform import model28from autopilot.platform import model
29from autopilot.testcase import AutopilotTestCase29from ubuntuuitoolkit import (
30from ubuntuuitoolkit import emulators as toolkit_emulators30 base,
31 emulators as toolkit_emulators
32)
33
31from ubuntu_clock_app import emulators34from ubuntu_clock_app import emulators
3235
33logger = logging.getLogger(__name__)36logger = logging.getLogger(__name__)
3437
3538
36class ClockAppTestCase(AutopilotTestCase):39class ClockAppTestCase(base.UbuntuUIToolkitAppTestCase):
3740
38 """A common test case class that provides several useful methods for41 """A common test case class that provides several useful methods for
39 calendar-app tests.42 calendar-app tests.
4043
41 """44 """
42 if model() == 'Desktop':
43 scenarios = [('with mouse', dict(input_device_class=Mouse))]
44 else:
45 scenarios = [('with touch', dict(input_device_class=Touch))]
46
47 local_location = "../../ubuntu-clock-app.qml"45 local_location = "../../ubuntu-clock-app.qml"
48 installed_location = "/usr/share/ubuntu-clock-app/ubuntu-clock-app.qml"46 installed_location = "/usr/share/ubuntu-clock-app/ubuntu-clock-app.qml"
49 sqlite_dir = os.path.expanduser(47 sqlite_dir = os.path.expanduser(
@@ -51,8 +49,8 @@
51 backup_dir = sqlite_dir + ".backup"49 backup_dir = sqlite_dir + ".backup"
5250
53 def setUp(self):51 def setUp(self):
54 self.pointing_device = Pointer(self.input_device_class.create())
55 super(ClockAppTestCase, self).setUp()52 super(ClockAppTestCase, self).setUp()
53 self.pointing_device = input.Pointer(self.input_device_class.create())
5654
57 #backup and wipe db's before testing55 #backup and wipe db's before testing
58 self.temp_move_sqlite_db()56 self.temp_move_sqlite_db()
@@ -74,14 +72,14 @@
7472
75 def launch_test_local(self):73 def launch_test_local(self):
76 self.app = self.launch_test_application(74 self.app = self.launch_test_application(
77 "qmlscene",75 base.get_qmlscene_launch_command(),
78 self.local_location,76 self.local_location,
79 app_type='qt',77 app_type='qt',
80 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)78 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
8179
82 def launch_test_installed(self):80 def launch_test_installed(self):
83 self.app = self.launch_test_application(81 self.app = self.launch_test_application(
84 "qmlscene",82 base.get_qmlscene_launch_command(),
85 self.installed_location,83 self.installed_location,
86 "--desktop_file_hint=/usr/share/applications/"84 "--desktop_file_hint=/usr/share/applications/"
87 "ubuntu-clock-app.desktop",85 "ubuntu-clock-app.desktop",

Subscribers

People subscribed via source and target branches