Merge lp:~osomon/webbrowser-app/ap-tests-bottom-edge-handle into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 1386
Merged at revision: 1405
Proposed branch: lp:~osomon/webbrowser-app/ap-tests-bottom-edge-handle
Merge into: lp:webbrowser-app
Diff against target: 50 lines (+6/-6)
3 files modified
src/app/webbrowser/Browser.qml (+1/-1)
tests/autopilot/webbrowser_app/emulators/browser.py (+2/-2)
tests/autopilot/webbrowser_app/tests/__init__.py (+3/-3)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/ap-tests-bottom-edge-handle
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+289665@code.launchpad.net

Commit message

Make the autopilot tests more reliable when dragging the bottom edge.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) 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 'src/app/webbrowser/Browser.qml'
2--- src/app/webbrowser/Browser.qml 2016-03-07 18:44:34 +0000
3+++ src/app/webbrowser/Browser.qml 2016-03-21 16:14:51 +0000
4@@ -689,6 +689,7 @@
5
6 BottomEdgeHandle {
7 id: bottomEdgeHandle
8+ objectName: "bottomEdgeHandle"
9
10 anchors {
11 left: parent.left
12@@ -727,7 +728,6 @@
13
14 Image {
15 id: bottomEdgeHint
16- objectName: "bottomEdgeHint"
17 source: "assets/bottom_edge_hint.png"
18 property bool forceShow: false
19 anchors {
20
21=== modified file 'tests/autopilot/webbrowser_app/emulators/browser.py'
22--- tests/autopilot/webbrowser_app/emulators/browser.py 2016-02-25 21:09:56 +0000
23+++ tests/autopilot/webbrowser_app/emulators/browser.py 2016-03-21 16:14:51 +0000
24@@ -183,8 +183,8 @@
25 objectName="downloadFileButton")
26 self.pointing_device.click_object(button)
27
28- def get_bottom_edge_hint(self):
29- return self.select_single("QQuickImage", objectName="bottomEdgeHint")
30+ def get_bottom_edge_handle(self):
31+ return self.select_single(objectName="bottomEdgeHandle")
32
33 def get_bottom_edge_bar(self):
34 return self.select_single(objectName="bottomEdgeBar", visible=True)
35
36=== modified file 'tests/autopilot/webbrowser_app/tests/__init__.py'
37--- tests/autopilot/webbrowser_app/tests/__init__.py 2016-02-23 11:24:26 +0000
38+++ tests/autopilot/webbrowser_app/tests/__init__.py 2016-03-21 16:14:51 +0000
39@@ -122,9 +122,9 @@
40
41 def drag_bottom_edge_upwards(self, fraction):
42 self.assertThat(model(), NotEquals('Desktop'))
43- hint = self.main_window.get_bottom_edge_hint()
44- x = hint.globalRect.x + hint.globalRect.width // 2
45- y0 = hint.globalRect.y + hint.globalRect.height // 2
46+ handleRect = self.main_window.get_bottom_edge_handle().globalRect
47+ x = handleRect.x + handleRect.width // 2
48+ y0 = handleRect.y + handleRect.height // 2
49 y1 = y0 - int(self.main_window.height * fraction)
50 self.pointing_device.drag(x, y0, x, y1)
51

Subscribers

People subscribed via source and target branches

to status/vote changes: