Merge lp:~cimi/unity8/fix-genericscopeview-flakytest into lp:unity8

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2598
Merged at revision: 2613
Proposed branch: lp:~cimi/unity8/fix-genericscopeview-flakytest
Merge into: lp:unity8
Diff against target: 91 lines (+34/-47)
1 file modified
tests/qmltests/Dash/tst_GenericScopeView.qml (+34/-47)
To merge this branch: bzr merge lp:~cimi/unity8/fix-genericscopeview-flakytest
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+303397@code.launchpad.net

Commit message

rework GenericScopeView PullToRefresh test

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
n
 * Did you perform an exploratory manual test run of your code change and any related functionality?
y
 * 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.
2598. By Andrea Cimitan

cosmetics

Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok, let's see if that helps

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass? If not, please explain why.
Waiting before top approval

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2597
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1986/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2605
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1420
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1420
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1420
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2633
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2512
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2512
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2512
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2506/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2506
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2506/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1986/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2598
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1990/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2609
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1424
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1424
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1424/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2637
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2516
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2516
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2516
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2510/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2510
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2510/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1990/rebuild

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/qmltests/Dash/tst_GenericScopeView.qml'
2--- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-06-29 14:45:18 +0000
3+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-08-19 11:40:39 +0000
4@@ -570,53 +570,40 @@
5 genericScopeView.scope = !genericScopeView.scope;
6 }
7
8- function test_pullToRefresh() {
9- waitForRendering(genericScopeView)
10-
11- mouseFlick(genericScopeView,
12- genericScopeView.width/2, units.gu(10),
13- genericScopeView.width/2, units.gu(80),
14- true, false)
15-
16- var pullToRefresh = findChild(genericScopeView, "pullToRefresh")
17- tryCompare(pullToRefresh, "releaseToRefresh", true)
18-
19- spy.target = genericScopeView.scope
20- spy.signalName = "refreshed"
21-
22- mouseRelease(genericScopeView)
23- tryCompare(pullToRefresh, "releaseToRefresh", false)
24-
25- spy.wait()
26- compare(spy.count, 1)
27-
28- // test short swipe doesn't refresh on tall window
29- mouseFlick(genericScopeView,
30- genericScopeView.width/2, units.gu(10),
31- genericScopeView.width/2, units.gu(20),
32- true, false)
33- mouseRelease(genericScopeView)
34- compare(spy.count, 1)
35-
36- // resize window, repeat the test
37- var initialHeight = shell.height
38- shell.height = units.gu(30)
39- waitForRendering(shell)
40- mouseFlick(genericScopeView,
41- genericScopeView.width/2, units.gu(10),
42- genericScopeView.width/2, units.gu(20),
43- true, false)
44-
45- tryCompare(pullToRefresh, "releaseToRefresh", true)
46-
47- mouseRelease(genericScopeView)
48- tryCompare(pullToRefresh, "releaseToRefresh", false)
49-
50- spy.wait()
51- compare(spy.count, 2)
52-
53- shell.height = initialHeight
54- waitForRendering(shell)
55+ function test_pullToRefresh_data() {
56+ return [
57+ { tag: "Tall window long flick", shellHeight: units.gu(100), flickLength: units.gu(70), refresh: true },
58+ { tag: "Tall window short flick", shellHeight: units.gu(100), flickLength: units.gu(25), refresh: false },
59+ { tag: "Short window", shellHeight: units.gu(30), flickLength: units.gu(25), refresh: true }
60+ ];
61+ }
62+
63+ function test_pullToRefresh(data) {
64+ var initialHeight = shell.height;
65+ shell.height = data.shellHeight;
66+ waitForRendering(shell);
67+
68+ mouseFlick(genericScopeView,
69+ genericScopeView.width/2, units.gu(6),
70+ genericScopeView.width/2, units.gu(6) + data.flickLength,
71+ true, false);
72+
73+ var pullToRefresh = findChild(genericScopeView, "pullToRefresh");
74+ tryCompare(pullToRefresh, "releaseToRefresh", data.refresh);
75+
76+ spy.target = genericScopeView.scope;
77+ spy.signalName = "refreshed";
78+
79+ mouseRelease(genericScopeView);
80+ tryCompare(pullToRefresh, "releaseToRefresh", false);
81+
82+ if (data.refresh) {
83+ spy.wait();
84+ compare(spy.count, 1);
85+ }
86+
87+ shell.height = initialHeight;
88+ waitForRendering(shell);
89 }
90
91 function test_item_noninteractive() {

Subscribers

People subscribed via source and target branches