Merge lp:~chris.gagnon/friends-app/autopilot-1.4 into lp:friends-app

Proposed by Chris Gagnon
Status: Superseded
Proposed branch: lp:~chris.gagnon/friends-app/autopilot-1.4
Merge into: lp:friends-app
Diff against target: 134 lines (+19/-31)
4 files modified
debian/control (+1/-1)
tests/autopilot/friends_app/emulators/friends_app_utils.py (+6/-5)
tests/autopilot/friends_app/tests/__init__.py (+11/-11)
tests/autopilot/friends_app/tests/test_timeline_view.py (+1/-14)
To merge this branch: bzr merge lp:~chris.gagnon/friends-app/autopilot-1.4
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Thomi Richards (community) Approve
Robert Bruce Park Approve
Review via email: mp+193293@code.launchpad.net

This proposal has been superseded by a proposal from 2013-11-06.

Commit message

autopilot test updates for autopilot 1.4

Description of the change

autopilot test updates for autopilot 1.4

To post a comment you must log in.
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

No not approve until builders are ready for autopilot 1.4

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

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

Curious, I assume the lack of wait_select_single indicates autopilot 1.3 is still in play here...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

Please disable TestTimelineView.test_toolbar, as it's obsolete and causing failures with the new ubuntu-ui-toolkit.

review: Needs Fixing
Revision history for this message
Robert Bruce Park (robru) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

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-30 13:49:44 +0000
3+++ debian/control 2013-11-06 02:35:40 +0000
4@@ -39,7 +39,7 @@
5 Priority: extra
6 Depends: ${misc:Depends},
7 ${python:Depends},
8- autopilot-qt5,
9+ autopilot-qt5 (>= 1.4),
10 friends-app (>= ${binary:Version}),
11 libqt5test5,
12 libqt5widgets5,
13
14=== modified file 'tests/autopilot/friends_app/emulators/friends_app_utils.py'
15--- tests/autopilot/friends_app/emulators/friends_app_utils.py 2013-07-03 23:27:42 +0000
16+++ tests/autopilot/friends_app/emulators/friends_app_utils.py 2013-11-06 02:35:40 +0000
17@@ -16,21 +16,22 @@
18
19 def get_main_view(self):
20 """Get the main QML view"""
21- return self.app.select_single("MainView", objectName="main")
22+ return self.app.wait_select_single("MainView", objectName="main")
23
24 def get_post_view(self):
25 """Get the post QML view"""
26- return self.app.select_single("Post", objectName="post")
27+ return self.app.wait_select_single("Post", objectName="post")
28
29 def get_stream_model(self):
30 """Get the StreamModel"""
31- return self.app.select_single("StreamModel", objectName="streamModel")
32+ return self.app.wait_select_single(
33+ "StreamModel", objectName="streamModel")
34
35 def get_toolbar(self):
36 """Returns the toolbar in the main events view."""
37 main_view = self.get_main_view()
38- return main_view.select_single("Toolbar")
39+ return main_view.wait_select_single("Toolbar")
40
41 def get_qml_view(self):
42 """Get the main QML view"""
43- return self.app.select_single("QQuickView")
44+ return self.app.wait_select_single("QQuickView")
45
46=== modified file 'tests/autopilot/friends_app/tests/__init__.py'
47--- tests/autopilot/friends_app/tests/__init__.py 2013-09-04 18:11:55 +0000
48+++ tests/autopilot/friends_app/tests/__init__.py 2013-11-06 02:35:40 +0000
49@@ -13,7 +13,7 @@
50 from autopilot.input import Mouse, Touch, Pointer
51 from autopilot.display import Display
52 from autopilot.platform import model
53-from testtools.matchers import Equals, NotEquals
54+from testtools.matchers import Equals
55 from autopilot.matchers import Eventually
56
57 from friends_app.emulators.timeline_view import TimelineView
58@@ -22,14 +22,15 @@
59
60
61 class FriendsAppTestCase(AutopilotTestCase):
62- """A common test case class that provides several useful methods for friends-app tests."""
63+ """A common test case class that provides several useful methods for
64+ friends-app tests."""
65 if model() == 'Desktop':
66 scenarios = [
67- ('with mouse', dict(input_device_class=Mouse)),
68+ ('with mouse', dict(input_device_class=Mouse)),
69 ]
70 else:
71 scenarios = [
72- ('with touch', dict(input_device_class=Touch)),
73+ ('with touch', dict(input_device_class=Touch)),
74 ]
75
76 local_location = "../../src/friends-app"
77@@ -64,9 +65,8 @@
78 "friends-app")
79 else:
80 self.app = self.launch_test_application(
81- "friends-app",
82- "--desktop_file_hint=/usr/share/applications/friends-app.desktop",
83- app_type='qt')
84+ "friends-app", "--desktop_file_hint=/usr/share/applications/"
85+ "friends-app.desktop", app_type='qt')
86
87 @property
88 def friends_app_utils(self):
89@@ -88,11 +88,11 @@
90 # Toolbar already open
91 return
92
93- main_view = self.friends_app_utils.get_qml_view()
94+ qml_view = self.friends_app_utils.get_qml_view()
95 x, y, w, h = toolbar.globalRect
96- x_line = main_view.x + main_view.width * 0.5
97- start_y = main_view.y + main_view.height - 1
98+ x_line = qml_view.x + qml_view.width * 0.5
99+ start_y = qml_view.y + qml_view.height - 1
100 stop_y = start_y - 2 * h
101-
102+ self.pointing_device.move_to_object(toolbar)
103 self.pointing_device.drag(x_line, start_y, x_line, stop_y)
104 self.assertThat(toolbar.state, Eventually(Equals('spread')))
105
106=== modified file 'tests/autopilot/friends_app/tests/test_timeline_view.py'
107--- tests/autopilot/friends_app/tests/test_timeline_view.py 2013-07-03 23:27:42 +0000
108+++ tests/autopilot/friends_app/tests/test_timeline_view.py 2013-11-06 02:35:40 +0000
109@@ -10,7 +10,7 @@
110
111 from __future__ import absolute_import
112
113-from testtools.matchers import Equals, NotEquals
114+from testtools.matchers import Equals
115 from autopilot.matchers import Eventually
116
117 from friends_app.tests import FriendsAppTestCase
118@@ -30,16 +30,3 @@
119
120 def test_mainView_visible(self):
121 self.assertThat(self.timeline_view.get_main_view().visible, Eventually(Equals(True)))
122-
123- """
124- def test_stream_model_count(self):
125- streammodel = self.timeline_view.get_stream_model()
126- self.assertThat(streammodel.count, Eventually(NotEquals(0)))
127- """
128-
129- def test_toolbar(self):
130- """Make sure the ToolBar functions."""
131- toolbar = self.timeline_view.get_toolbar()
132- self.assertThat(toolbar.state, Equals(''))
133- self.reveal_toolbar()
134- self.assertThat(toolbar.state, Equals('spread'))

Subscribers

People subscribed via source and target branches

to all changes: