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

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 26
Merged at revision: 24
Proposed branch: lp:~nskaggs/ubuntu-terminal-app/add-click-testing-support
Merge into: lp:ubuntu-terminal-app
Diff against target: 54 lines (+11/-2)
2 files modified
tests/autopilot/ubuntu_terminal_app/tests/__init__.py (+8/-2)
tests/autopilot/ubuntu_terminal_app/tests/test_terminal.py (+3/-0)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-terminal-app/add-click-testing-support
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Terminal Developers Pending
Review via email: mp+188084@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)
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)
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
1=== modified file 'tests/autopilot/ubuntu_terminal_app/tests/__init__.py'
2--- tests/autopilot/ubuntu_terminal_app/tests/__init__.py 2013-08-08 22:13:19 +0000
3+++ tests/autopilot/ubuntu_terminal_app/tests/__init__.py 2013-09-27 18:06:57 +0000
4@@ -30,6 +30,7 @@
5 scenarios = [('with touch', dict(input_device_class=Touch))]
6
7 local_location = "../../ubuntu-terminal-app.qml"
8+ installed_location = "/usr/share/ubuntu-terminal-app/ubuntu-terminal-app.qml"
9
10 def setUp(self):
11 self.pointing_device = Pointer(self.input_device_class.create())
12@@ -37,8 +38,10 @@
13
14 if os.path.exists(self.local_location):
15 self.launch_test_local()
16+ elif os.path.exists(self.installed_location):
17+ self.launch_test_installed()
18 else:
19- self.launch_test_installed()
20+ self.launch_test_click()
21
22 def launch_test_local(self):
23 self.app = self.launch_test_application(
24@@ -50,12 +53,15 @@
25 def launch_test_installed(self):
26 self.app = self.launch_test_application(
27 "qmlscene",
28- "/usr/share/ubuntu-terminal-app/ubuntu-terminal-app.qml",
29+ self.installed_location,
30 "--desktop_file_hint="
31 "/usr/share/applications/ubuntu-terminal-app.desktop",
32 app_type='qt',
33 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
34
35+ def launch_test_click(self):
36+ self.app = self.launch_click_package("com.ubuntu.ubuntu-terminal-app", emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
37+
38 @property
39 def main_view(self):
40 return self.app.select_single(emulators.MainView)
41
42=== modified file 'tests/autopilot/ubuntu_terminal_app/tests/test_terminal.py'
43--- tests/autopilot/ubuntu_terminal_app/tests/test_terminal.py 2013-08-14 22:42:05 +0000
44+++ tests/autopilot/ubuntu_terminal_app/tests/test_terminal.py 2013-09-27 18:06:57 +0000
45@@ -52,6 +52,9 @@
46 self.assertThat(lambda: self.main_view.select_single("ValueSelector", objectName=selector), Eventually(Not(Is(None))))
47 val_selector = self.main_view.select_single("ValueSelector", objectName=selector)
48 self.pointing_device.click_object(val_selector)
49+ #we need to regrab object as for some reason it can sometimes change and our ordering will be off down below
50+ self.assertThat(lambda: self.main_view.select_single("ValueSelector", objectName=selector), Eventually(Not(Is(None))))
51+ val_selector = self.main_view.select_single("ValueSelector", objectName=selector)
52 rows = val_selector.select_single("QQuickColumn")
53 rects = rows.select_many("QQuickRectangle")
54 for ritem in rects:

Subscribers

People subscribed via source and target branches