Merge lp:~aacid/unity8/test_stubborn_flick into lp:unity8

Proposed by Albert Astals Cid on 2015-03-10
Status: Merged
Approved by: Michał Sawicz on 2015-03-18
Approved revision: 1660
Merged at revision: 1685
Proposed branch: lp:~aacid/unity8/test_stubborn_flick
Merge into: lp:unity8
Diff against target: 53 lines (+15/-6)
3 files modified
tests/qmltests/Dash/Previews/tst_Preview.qml (+1/-3)
tests/qmltests/Dash/tst_Dash.qml (+1/-3)
tests/utils/modules/Unity/Test/UnityTestCase.qml (+13/-0)
To merge this branch: bzr merge lp:~aacid/unity8/test_stubborn_flick
Reviewer Review Type Date Requested Status
Michał Sawicz 2015-03-10 Approve on 2015-03-18
PS Jenkins bot continuous-integration Needs Fixing on 2015-03-12
Review via email: mp+252407@code.launchpad.net

Commit Message

Test: More stubborn flick to the end

Description of the Change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
No, test fix only

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Test passes.
 * Did CI run pass? If not, please explain why.
AP unstable, 7 qml tests to be fixed after UITK landing
 * Did you make sure that the branch does not contain spurious tags?
Y

review: Approve
Michał Sawicz (saviq) :
review: Approve
Michał Sawicz (saviq) :
review: Needs Fixing
lp:~aacid/unity8/test_stubborn_flick updated on 2015-03-12
1660. By Albert Astals Cid on 2015-03-12

A bit of refactoring

Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
It improved
 * Did you make sure that the branch does not contain spurious tags?
Y

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/qmltests/Dash/Previews/tst_Preview.qml'
2--- tests/qmltests/Dash/Previews/tst_Preview.qml 2015-02-10 16:00:47 +0000
3+++ tests/qmltests/Dash/Previews/tst_Preview.qml 2015-03-12 16:08:43 +0000
4@@ -113,9 +113,7 @@
5
6 // Scroll down
7 var previewListRow0 = findChild(preview, "previewListRow0");
8- touchFlick(preview, preview.width / 2, units.gu(20), preview.width / 2, units.gu(1));
9- tryCompare(previewListRow0, "atYEnd", true);
10- tryCompare(previewListRow0, "moving", false);
11+ flickToYEnd(previewListRow0);
12
13 // Click on the combo
14 var widget = findChild(preview, "widget-21");
15
16=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
17--- tests/qmltests/Dash/tst_Dash.qml 2015-02-17 08:26:20 +0000
18+++ tests/qmltests/Dash/tst_Dash.qml 2015-03-12 16:08:43 +0000
19@@ -497,9 +497,7 @@
20 tryCompare(subPageLoader, "x", 0);
21 tryCompare(findChild(dashTempScopeItem, "categoryListView"), "visible", false);
22 var previewListRow0 = findChild(subPageLoader, "previewListRow0");
23- touchFlick(previewListRow0, previewListRow0.width / 2, units.gu(20), previewListRow0.width / 2, units.gu(1));
24- tryCompare(previewListRow0, "atYEnd", true);
25- tryCompare(previewListRow0, "moving", false);
26+ flickToYEnd(previewListRow0);
27 var widget = findChild(subPageLoader, "widget-21");
28 var initialWidgetHeight = widget.height;
29 var openButton = findChild(widget, "buttonopen_click");
30
31=== modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
32--- tests/utils/modules/Unity/Test/UnityTestCase.qml 2015-02-17 15:06:33 +0000
33+++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2015-03-12 16:08:43 +0000
34@@ -221,6 +221,19 @@
35 }
36 }
37
38+ function flickToYEnd(item) {
39+ var i = 0;
40+ var x = item.width / 2;
41+ var y = item.height - units.gu(1);
42+ var toY = units.gu(1);
43+ while (i < 5 && !item.atYEnd) {
44+ touchFlick(item, x, y, x, toY);
45+ tryCompare(item, "moving", false);
46+ ++i;
47+ }
48+ tryCompare(item, "atYEnd", true);
49+ }
50+
51 function touchEvent(item) {
52 return UT.Util.touchEvent(item)
53 }

Subscribers

People subscribed via source and target branches