1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the test suite of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 //TESTED_COMPONENT=qtdeclarative
46 basic_animated_sprite_usage: function()
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";
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 |'));
71 changing_a_sprite_source: function()
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";
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 |'));
95 changing_the_animation_timing_method: function()
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";
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 |'));