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
=== modified file 'debian/control'
--- debian/control 2013-09-30 13:49:44 +0000
+++ debian/control 2013-11-06 02:35:40 +0000
@@ -39,7 +39,7 @@
39Priority: extra39Priority: extra
40Depends: ${misc:Depends},40Depends: ${misc:Depends},
41 ${python:Depends},41 ${python:Depends},
42 autopilot-qt5,42 autopilot-qt5 (>= 1.4),
43 friends-app (>= ${binary:Version}),43 friends-app (>= ${binary:Version}),
44 libqt5test5,44 libqt5test5,
45 libqt5widgets5,45 libqt5widgets5,
4646
=== modified file 'tests/autopilot/friends_app/emulators/friends_app_utils.py'
--- tests/autopilot/friends_app/emulators/friends_app_utils.py 2013-07-03 23:27:42 +0000
+++ tests/autopilot/friends_app/emulators/friends_app_utils.py 2013-11-06 02:35:40 +0000
@@ -16,21 +16,22 @@
1616
17 def get_main_view(self):17 def get_main_view(self):
18 """Get the main QML view"""18 """Get the main QML view"""
19 return self.app.select_single("MainView", objectName="main")19 return self.app.wait_select_single("MainView", objectName="main")
2020
21 def get_post_view(self):21 def get_post_view(self):
22 """Get the post QML view"""22 """Get the post QML view"""
23 return self.app.select_single("Post", objectName="post")23 return self.app.wait_select_single("Post", objectName="post")
2424
25 def get_stream_model(self):25 def get_stream_model(self):
26 """Get the StreamModel"""26 """Get the StreamModel"""
27 return self.app.select_single("StreamModel", objectName="streamModel")27 return self.app.wait_select_single(
28 "StreamModel", objectName="streamModel")
2829
29 def get_toolbar(self):30 def get_toolbar(self):
30 """Returns the toolbar in the main events view."""31 """Returns the toolbar in the main events view."""
31 main_view = self.get_main_view()32 main_view = self.get_main_view()
32 return main_view.select_single("Toolbar")33 return main_view.wait_select_single("Toolbar")
3334
34 def get_qml_view(self):35 def get_qml_view(self):
35 """Get the main QML view"""36 """Get the main QML view"""
36 return self.app.select_single("QQuickView")37 return self.app.wait_select_single("QQuickView")
3738
=== modified file 'tests/autopilot/friends_app/tests/__init__.py'
--- tests/autopilot/friends_app/tests/__init__.py 2013-09-04 18:11:55 +0000
+++ tests/autopilot/friends_app/tests/__init__.py 2013-11-06 02:35:40 +0000
@@ -13,7 +13,7 @@
13from autopilot.input import Mouse, Touch, Pointer13from autopilot.input import Mouse, Touch, Pointer
14from autopilot.display import Display14from autopilot.display import Display
15from autopilot.platform import model15from autopilot.platform import model
16from testtools.matchers import Equals, NotEquals16from testtools.matchers import Equals
17from autopilot.matchers import Eventually17from autopilot.matchers import Eventually
1818
19from friends_app.emulators.timeline_view import TimelineView19from friends_app.emulators.timeline_view import TimelineView
@@ -22,14 +22,15 @@
2222
2323
24class FriendsAppTestCase(AutopilotTestCase):24class FriendsAppTestCase(AutopilotTestCase):
25 """A common test case class that provides several useful methods for friends-app tests."""25 """A common test case class that provides several useful methods for
26 friends-app tests."""
26 if model() == 'Desktop':27 if model() == 'Desktop':
27 scenarios = [28 scenarios = [
28 ('with mouse', dict(input_device_class=Mouse)),29 ('with mouse', dict(input_device_class=Mouse)),
29 ]30 ]
30 else:31 else:
31 scenarios = [32 scenarios = [
32 ('with touch', dict(input_device_class=Touch)),33 ('with touch', dict(input_device_class=Touch)),
33 ]34 ]
3435
35 local_location = "../../src/friends-app"36 local_location = "../../src/friends-app"
@@ -64,9 +65,8 @@
64 "friends-app")65 "friends-app")
65 else:66 else:
66 self.app = self.launch_test_application(67 self.app = self.launch_test_application(
67 "friends-app",68 "friends-app", "--desktop_file_hint=/usr/share/applications/"
68 "--desktop_file_hint=/usr/share/applications/friends-app.desktop",69 "friends-app.desktop", app_type='qt')
69 app_type='qt')
7070
71 @property71 @property
72 def friends_app_utils(self):72 def friends_app_utils(self):
@@ -88,11 +88,11 @@
88 # Toolbar already open88 # Toolbar already open
89 return89 return
9090
91 main_view = self.friends_app_utils.get_qml_view()91 qml_view = self.friends_app_utils.get_qml_view()
92 x, y, w, h = toolbar.globalRect92 x, y, w, h = toolbar.globalRect
93 x_line = main_view.x + main_view.width * 0.593 x_line = qml_view.x + qml_view.width * 0.5
94 start_y = main_view.y + main_view.height - 194 start_y = qml_view.y + qml_view.height - 1
95 stop_y = start_y - 2 * h95 stop_y = start_y - 2 * h
9696 self.pointing_device.move_to_object(toolbar)
97 self.pointing_device.drag(x_line, start_y, x_line, stop_y)97 self.pointing_device.drag(x_line, start_y, x_line, stop_y)
98 self.assertThat(toolbar.state, Eventually(Equals('spread')))98 self.assertThat(toolbar.state, Eventually(Equals('spread')))
9999
=== modified file 'tests/autopilot/friends_app/tests/test_timeline_view.py'
--- tests/autopilot/friends_app/tests/test_timeline_view.py 2013-07-03 23:27:42 +0000
+++ tests/autopilot/friends_app/tests/test_timeline_view.py 2013-11-06 02:35:40 +0000
@@ -10,7 +10,7 @@
1010
11from __future__ import absolute_import11from __future__ import absolute_import
1212
13from testtools.matchers import Equals, NotEquals13from testtools.matchers import Equals
14from autopilot.matchers import Eventually14from autopilot.matchers import Eventually
1515
16from friends_app.tests import FriendsAppTestCase16from friends_app.tests import FriendsAppTestCase
@@ -30,16 +30,3 @@
3030
31 def test_mainView_visible(self):31 def test_mainView_visible(self):
32 self.assertThat(self.timeline_view.get_main_view().visible, Eventually(Equals(True)))32 self.assertThat(self.timeline_view.get_main_view().visible, Eventually(Equals(True)))
33
34 """
35 def test_stream_model_count(self):
36 streammodel = self.timeline_view.get_stream_model()
37 self.assertThat(streammodel.count, Eventually(NotEquals(0)))
38 """
39
40 def test_toolbar(self):
41 """Make sure the ToolBar functions."""
42 toolbar = self.timeline_view.get_toolbar()
43 self.assertThat(toolbar.state, Equals(''))
44 self.reveal_toolbar()
45 self.assertThat(toolbar.state, Equals('spread'))

Subscribers

People subscribed via source and target branches

to all changes: