Merge lp:~chris.gagnon/dropping-letters/autopilot-1.4 into lp:dropping-letters

Proposed by Chris Gagnon
Status: Merged
Approved by: Thomi Richards
Approved revision: 45
Merged at revision: 43
Proposed branch: lp:~chris.gagnon/dropping-letters/autopilot-1.4
Merge into: lp:dropping-letters
Diff against target: 114 lines (+24/-14)
4 files modified
debian/control (+1/-1)
tests/autopilot/dropping_letters_app/emulators.py (+13/-5)
tests/autopilot/dropping_letters_app/tests/__init__.py (+7/-3)
tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py (+3/-5)
To merge this branch: bzr merge lp:~chris.gagnon/dropping-letters/autopilot-1.4
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Christopher Lee (community) Approve
Thomi Richards (community) Approve
Dropping Letters developers Pending
Review via email: mp+192870@code.launchpad.net

Commit message

update autopilot test to work in 1.4, do not merge until autopilot 1.4 is ready on builders/ci

Description of the change

update autopilot test to work in 1.4

To post a comment you must log in.
44. By Chris Gagnon

update debian control for libautopilot-14 >= 1.4 dependancy

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

LGTM

review: Approve
45. By Chris Gagnon

use base.get_launch_commmand from ubuntu-ui-toolkit to get qmlscene

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

The addition of " base.get_launch_commmand " looks good to 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
1=== modified file 'debian/control'
2--- debian/control 2013-09-26 17:30:10 +0000
3+++ debian/control 2013-11-04 22:52:03 +0000
4@@ -20,7 +20,7 @@
5 Section: debug
6 Priority: extra
7 Depends: ${misc:Depends},
8- libautopilot-qt,
9+ libautopilot-qt (>= 1.4),
10 dropping-letters (>= ${binary:Version}),
11 python-autopilot,
12 ubuntu-ui-toolkit-autopilot,
13
14=== modified file 'tests/autopilot/dropping_letters_app/emulators.py'
15--- tests/autopilot/dropping_letters_app/emulators.py 2013-08-01 18:53:46 +0000
16+++ tests/autopilot/dropping_letters_app/emulators.py 2013-11-04 22:52:03 +0000
17@@ -32,16 +32,24 @@
18 return item
19
20 def get_help_button(self):
21- item = self.select_single('QQuickRectangle', objectName='introhelpbutton')
22+ item = self.select_single('QQuickRectangle',
23+ objectName='introhelpbutton')
24 return item
25
26 def get_help_popover(self):
27- #checking the popup seems to fail -- https://bugs.launchpad.net/autopilot/+bug/1195141?
28+ #checking the popup seems to fail
29+ # -- https://bugs.launchpad.net/autopilot/+bug/1195141?
30 #we can't get the popup by objectname for ??
31- #this works OK because at the moment, there is only one popup -- needs fixed
32+ #this works OK because at the moment, there is only one popup
33+ # -- needs fixed
34 #item = self.select_single('Label', objectname='helpsheetpopoverlabel')
35- #item = self.select_single('QQuickRectangle', objectname='helpsheetpopoverbox')
36+ #item = self.select_single('QQuickRectangle',
37+ # objectname='helpsheetpopoverbox')
38 #item = self.select_single('Popover', objectname='helpsheetpopover')
39
40- item = self.select_single('Popover')
41+ item = self.wait_select_single('Popover')
42 return item
43+
44+ def get_many_popover(self):
45+ """get a list of open popovers"""
46+ return self.select_many('Popover')
47
48=== modified file 'tests/autopilot/dropping_letters_app/tests/__init__.py'
49--- tests/autopilot/dropping_letters_app/tests/__init__.py 2013-09-27 16:56:29 +0000
50+++ tests/autopilot/dropping_letters_app/tests/__init__.py 2013-11-04 22:52:03 +0000
51@@ -22,9 +22,13 @@
52 from autopilot.platform import model
53 from autopilot.testcase import AutopilotTestCase
54
55-from ubuntuuitoolkit import emulators as toolkit_emulators
56 from dropping_letters_app import emulators
57
58+from ubuntuuitoolkit import (
59+ base,
60+ emulators as toolkit_emulators
61+)
62+
63
64 class DroppingLettersTestCase(AutopilotTestCase):
65
66@@ -52,14 +56,14 @@
67
68 def launch_test_local(self):
69 self.app = self.launch_test_application(
70- "qmlscene",
71+ base.get_qmlscene_launch_command(),
72 self.local_location,
73 app_type='qt',
74 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
75
76 def launch_test_installed(self):
77 self.app = self.launch_test_application(
78- "qmlscene",
79+ base.get_qmlscene_launch_command(),
80 self.installed_location,
81 "--desktop_file_hint=/usr/share/applications/"
82 "dropping-letters.desktop",
83
84=== modified file 'tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py'
85--- tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py 2013-09-27 16:56:29 +0000
86+++ tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py 2013-11-04 22:52:03 +0000
87@@ -19,7 +19,7 @@
88 from __future__ import absolute_import
89
90 from autopilot.matchers import Eventually
91-from testtools.matchers import Equals, NotEquals, LessThan
92+from testtools.matchers import Equals, LessThan
93
94 from dropping_letters_app.tests import DroppingLettersTestCase
95 from time import sleep
96@@ -45,16 +45,14 @@
97 self.pointing_device.click_object(helpbutton)
98
99 #check and ensure help popover appears
100- self.assertThat(self.main_view.get_help_popover,
101- Eventually(NotEquals(None)))
102 helpPopover = self.main_view.get_help_popover()
103 properties = helpPopover.get_properties()
104 self.assertTrue(properties["visible"])
105
106 #check and ensure help popover disappears
107 self.pointing_device.click_object(helpbutton)
108- self.assertThat(self.main_view.get_help_popover,
109- Eventually(Equals(None)))
110+ self.assertThat(self.main_view.get_many_popover,
111+ Eventually(Equals([])))
112
113 def test_start_new_game(self):
114 toolbar = self.main_view.open_toolbar()

Subscribers

People subscribed via source and target branches