Ubuntu Pastebin

Paste from Tim Peeters at Wed, 2 Mar 2016 16:00:23 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
        SignalSpy {
            id: animationStartedSpy
            signalName: "started"
        }
        function test_press_release_on_different_icons() {
            var leftIcon = findChild(scrollingSections, "left_scroll_icon");
            var rightIcon = findChild(scrollingSections, "right_scroll_icon");
            var animation = findChild(scrollingSections, "sections_scroll_animation");
            animationStartedSpy.target = animation;
            compare(leftIcon.width, rightIcon.width, "Scroll icons are not the same width.");
            compare(leftIcon.height, rightIcon.height, "Scroll icons are not the same height.");
            var w = leftIcon.width / 2;
            var h = leftIcon.height / 2;
            mouseMove(leftIcon, w, h);
            mousePress(leftIcon, w, h);
            mouseMove(rightIcon, w, h);
            mouseRelease(rightIcon, w, h);
            wait(200);
            compare(animationStartedSpy.count, 0,
                    "Clicked signal came after pressing left icon and releasing on right icon.");
            mousePress(rightIcon, w, h);
            mouseMove(leftIcon, w, h);
            mouseRelease(leftIcon, w, h);
            wait(200);
            compare(animationStartedSpy.count, 0,
                    "Clicked signal came after pressing right icon and releasing on left icon.");
            animationStartedSpy.target = null;
        }
Download as text