Doc: Enabling Qt QML linking to Qt Quick.
[profile/ivi/qtdeclarative.git] / tests / system / sys_animatedsprite.qtt
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the test suite of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.  For licensing terms and
14 ** conditions see http://qt.digia.com/licensing.  For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights.  These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file.  Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 //TESTED_COMPONENT=qtdeclarative
43
44 testcase = {
45
46     basic_animated_sprite_usage: function()
47     {
48         // Test Meta-data
49         testTitle = "Using AnimatedSprite elements";
50         testBinary = "animatedsprite.qml";
51         testSource: "$QTDIR/qtdeclarative/tests/system/animatedsprite";
52         testGoal = "Verify an AnimatedSprite can be used to display an animating character.";
53         testPreconditions = "None";
54         testGroups = "BAT,QtQuick 2.0";
55
56         // Test Steps
57         prompt(twiki('---+++ ' + testTitle + '<br><br>
58         *Goal:* ' + testGoal + '<br>
59         *Pre-Requisites:* ' + testPreconditions + '<br>
60         *Tested Binary:* ' + testBinary + '<br>
61     | *Step* | *Verification* |
62     | Run '+testBinary+' | Application has started, showing a teddy bear blinking and moving its head and arms |
63     | | Watching closely, note that after the bear points its paw, it will look right, then look left, then blink |
64     | Press the Reverse button | After the bear points its paw, it should blink, then look left, then look right |
65     | Press the FPS "+" button 10 times | The FPS label shows 15 |
66     | | The bear is animating quickly |
67     | Press the FPS "-" button 10 times | The FPS label shows 5 |
68     | | The bear is animating slowly |'));
69     },
70
71     changing_a_sprite_source: function()
72     {
73         // Test Meta-data
74         testTitle = "Changing a sprite source";
75         testBinary = "animatedsprite.qml";
76         testSource: "$QTDIR/qtdeclarative/tests/system/animatedspriteadvance";
77         testGoal = "Verify an AnimatedSprite source property can be changed, redrawing the new sprite.";
78         testPreconditions = "None";
79         testGroups = "BAT,QtQuick 2.0";
80
81         // Test Steps
82         prompt(twiki('---+++ ' + testTitle + '<br><br>
83         *Goal:* ' + testGoal + '<br>
84         *Pre-Requisites:* ' + testPreconditions + '<br>
85         *Tested Binary:* ' + testBinary + '<br>
86     | *Step* | *Verification* |
87     | Run '+testBinary+' | Application has started, showing a teddy bear blinking and moving its head and arms |
88     | | The bear\'s eyes are brown |
89     | Press the blue button under the Eyes control | The bear\'s eyes are blue |
90     | Press the white button under the Body control | The bear is now a polar bear with blue eyes |
91     | Press the gray button under the Body control | The blue eyed polar bear\'s face and abdomen are now gray |
92     |  | All of the items are still animating in sync |'));
93     },
94
95     changing_the_animation_timing_method: function()
96     {
97         // Test Meta-data
98         testTitle = "Changing the method used to animate a sprite";
99         testBinary = "animatedsprite.qml";
100         testSource: "$QTDIR/qtdeclarative/tests/system/animatedsprite";
101         testGoal = "Verify an AnimatedSprite can be timed using application frame sync or a specified frame rate.";
102         testPreconditions = "None";
103         testGroups = "BAT,QtQuick 2.0";
104
105         // Test Steps
106         prompt(twiki('---+++ ' + testTitle + '<br><br>
107         *Goal:* ' + testGoal + '<br>
108         *Pre-Requisites:* ' + testPreconditions + '<br>
109         *Tested Binary:* ' + testBinary + '<br>
110     | *Step* | *Verification* |
111     | Run '+testBinary+' | Application has started, showing a teddy bear blinking and moving its head and arms |
112     | Press FrameSync | Rate should show FrameSync |
113     | | The bear should be animating very fast and the FPS counter should still be 5 |
114     | Press FrameSync | The bear should be again animating slowly, Rate should show FrameRate |
115     | Press the FPS "-" button 5 times | FPS should show 0 |
116     | | The bear should be not moving |
117     | Press the FPS "-" button | The FPS label should show -1 |
118     | | The bear should be not moving |
119     | Press the FPS "+" button twice | FPS should show 1 |
120     | | The bear should be animating slowly |'));
121     }
122 }