Merge lp:~canonical-platform-qa/camera-app/use_app_for_pointing_device into lp:camera-app

Proposed by Leo Arias
Status: Merged
Approved by: Florian Boucault
Approved revision: 515
Merged at revision: 570
Proposed branch: lp:~canonical-platform-qa/camera-app/use_app_for_pointing_device
Merge into: lp:camera-app
Prerequisite: lp:~canonical-platform-qa/camera-app/fix1444170-flake8
Diff against target: 21 lines (+2/-2)
1 file modified
tests/autopilot/camera_app/emulators/main_window.py (+2/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/camera-app/use_app_for_pointing_device
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Vincent Ladeuil (community) Approve
Ubuntu Phablet Team Pending
Leo Arias Pending
Review via email: mp+259204@code.launchpad.net

This proposal supersedes a proposal from 2015-02-18.

Commit message

Use pointing_device from self.app instead of the testCase passed in

Description of the change

A couple of the functions in the MainWindow class oddly assume that the AutopilotTestCase has a pointing_device member. This is not necessarily the case but the app proxy is sure to have one, and the MainWindow class already stores the app proxy in self.app so we should really use that instead of the testCase to provide the pointing device

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

lgtm.
A future improvement is to make the MainWindow a custom proxy object, then there will be no need to save the app proxy as an instance var.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote : Posted in a previous version of this proposal

The mako job failed due to a device having failed. The -ci job as been restarted.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Vincent Ladeuil (vila) wrote :

Clear enough as long as the CI tests pass, approving.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/camera_app/emulators/main_window.py'
2--- tests/autopilot/camera_app/emulators/main_window.py 2015-05-15 07:40:59 +0000
3+++ tests/autopilot/camera_app/emulators/main_window.py 2015-05-15 07:40:59 +0000
4@@ -142,7 +142,7 @@
5 tx = x + (w // 2)
6 ty = y + (h // 2)
7
8- testCase.pointing_device.drag(tx, ty, x, ty, rate=1)
9+ self.app.pointing_device.drag(tx, ty, x, ty, rate=1)
10 viewfinder = self.get_viewfinder()
11 testCase.assertThat(viewfinder.inView, Eventually(Equals(False)))
12
13@@ -153,7 +153,7 @@
14 tx = x + (w // 2)
15 ty = y + (h // 2)
16
17- testCase.pointing_device.drag(
18+ self.app.pointing_device.drag(
19 tx, ty, (tx + main_view.width // 2), ty, rate=1)
20 viewfinder = self.get_viewfinder()
21 testCase.assertThat(viewfinder.inView, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches