1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of QtUiTest.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 //TESTED_COMPONENT=qtdeclarative
43 var adv = "Press the Advance button";
49 testApplication = "Elements: Rectangle";
50 testBinary = "tests/testapplications/elements/elements";
51 testGoal = "Verify the rectangle element is shown correctly";
52 testPreconditions = "";
56 prompt(twiki('---+++ ' + testApplication + '<br><br>
57 *Goal:* ' + testGoal + '<br>
58 *Pre-Requisites:* ' + testPreconditions + '<br>
59 *Tested Binary:* ' + testBinary + '<br>
60 | Select the Rectangle list item | Verify that the Rectangle displayed in the center is small, blue, with a thin red angular border |
61 | '+adv+' | The rectangle should now be twice the size as the previous step |
62 | '+adv+' | The rectangle should now have rounded corners |
63 | '+adv+' | The rectangle color should have shifted to green |
64 | '+adv+' | The rectangle border should have increased significantly |
65 | '+adv+' | The rectangle border should have now be small, blue, with a thin red angular border |'));
71 testApplication = "Elements: Image";
72 testBinary = "tests/testapplications/elements/elements";
73 testGoal = "Verify the Image element is shown correctly";
74 testPreconditions = "";
78 prompt(twiki('---+++ ' + testApplication + '<br><br>
79 *Goal:* ' + testGoal + '<br>
80 *Pre-Requisites:* ' + testPreconditions + '<br>
81 *Tested Binary:* ' + testBinary + '<br>
82 | Select the Image list item | Verify it shows the Nokia logo, large and still slightly stretched |
83 | '+adv+' | Verify it shows the Nokia logo normally, longer horizontally |
84 | '+adv+' | Verify it shows the Nokia logo with the sides cut |
85 | '+adv+' | Verify it shows the Nokia logo repeated both horizontally and vertically |
86 | '+adv+' | Verify it shows the Nokia logo repeated vertically only |
87 | '+adv+' | Verify it shows the Nokia logo repeated horizontally only |'));
90 animatedimage: function()
93 testApplication = "Elements: AnimatedImage";
94 testBinary = "tests/testapplications/elements/elements";
95 testGoal = "Verify the AnimatedImage element is shown correctly";
96 testPreconditions = "";
100 prompt(twiki('---+++ ' + testApplication + '<br><br>
101 *Goal:* ' + testGoal + '<br>
102 *Pre-Requisites:* ' + testPreconditions + '<br>
103 *Tested Binary:* ' + testBinary + '<br>
104 | Select the AnimatedImage list item | Verify it shows a small animated icon, but slightly stretched. |
105 | '+adv+' | Verify it shows the animated icon, large and still slightly stretched |
106 | '+adv+' | Verify it shows the animated icon normally, square |
107 | '+adv+' | Verify it shows the animated icon with the sides cut |
108 | '+adv+' | Verify it shows the animated icon repeated both horizontally and vertically |
109 | '+adv+' | Verify it shows the animated icon repeated vertically only |
110 | '+adv+' | Verify it shows the animated icon repeated horizontally only |'));
113 borderimage: function()
116 testApplication = "Elements: BorderImage";
117 testBinary = "tests/testapplications/elements/elements";
118 testGoal = "Verify the BorderImage element is shown correctly";
119 testPreconditions = "";
123 prompt(twiki('---+++ ' + testApplication + '<br><br>
124 *Goal:* ' + testGoal + '<br>
125 *Pre-Requisites:* ' + testPreconditions + '<br>
126 *Tested Binary:* ' + testBinary + '<br>
127 | Select the BorderImage list item | Verify it shows a small framed image |
128 | '+adv+' | Verify it shows the frame, large and each side stretched |
129 | '+adv+' | Verify it shows the frame with slightly off centere sides |
130 | '+adv+' | Verify it shows the frame with uniformly repeated sides |'));
133 systempalette: function()
136 testApplication = "Elements: SystemPalette";
137 testBinary = "tests/testapplications/elements/elements";
138 testGoal = "Verify the SystemPalette element is shown correctly";
139 testPreconditions = "";
143 prompt(twiki('---+++ ' + testApplication + '<br><br>
144 *Goal:* ' + testGoal + '<br>
145 *Pre-Requisites:* ' + testPreconditions + '<br>
146 *Tested Binary:* ' + testBinary + '<br>
147 | Select the SystemPalette list item | Verify it shows a mockup of an application |
148 | '+adv+' | Verify it shows the colors similar to the system it is running on |
149 | '+adv+' | Verify it shows the new coloring |'));
155 testApplication = "Elements: Text";
156 testBinary = "tests/testapplications/elements/elements";
157 testGoal = "Verify the Text element is shown correctly";
158 testPreconditions = "";
162 prompt(twiki('---+++ ' + testApplication + '<br><br>
163 *Goal:* ' + testGoal + '<br>
164 *Pre-Requisites:* ' + testPreconditions + '<br>
165 *Tested Binary:* ' + testBinary + '<br>
166 | Select the Text list item | Verify it shows a Hello message |
167 | '+adv+' | Verify it shows the text increased to twice the previous size, and wrapped to two lines |
168 | '+adv+' | Verify it shows the text smoothly changed color to blue over a second |
169 | '+adv+' | Verify it shows the text as blue, bolded and in italic |
170 | '+adv+' | Verify it shows the text as alternating between green and black |'));
173 textinput: function()
176 testApplication = "Elements: TextInput";
177 testBinary = "tests/testapplications/elements/elements";
178 testGoal = "Verify the TextInput element is shown correctly";
179 testPreconditions = "";
183 prompt(twiki('---+++ ' + testApplication + '<br><br>
184 *Goal:* ' + testGoal + '<br>
185 *Pre-Requisites:* ' + testPreconditions + '<br>
186 *Tested Binary:* ' + testBinary + '<br>
187 | Select the TextInput list item | Verify it shows two fields, the green one displaying a Hello message |
188 | '+adv+' | Verify it selects the last word - TextInput - of the green field |
189 | '+adv+' | Verify it animates a copy of the selected text to the gray field |
190 | '+adv+' | Verify it shows the text as asterisks |'));
196 testApplication = "Elements: TextEdit";
197 testBinary = "tests/testapplications/elements/elements";
198 testGoal = "Verify the TextEdit element is shown correctly";
199 testPreconditions = "";
203 prompt(twiki('---+++ ' + testApplication + '<br><br>
204 *Goal:* ' + testGoal + '<br>
205 *Pre-Requisites:* ' + testPreconditions + '<br>
206 *Tested Binary:* ' + testBinary + '<br>
207 | Select the TextEdit list item | Verify it shows two large fields |
208 | '+adv+' | Verify it selects the last word - TextEdit - of the green field |
209 | '+adv+' | Verify it animates a copy of the selected text to the gray field |
210 | '+adv+' | Verify it shows more text, with the end disappearing past the right side of the green field |
211 | '+adv+' | Verify it shows the full text, properly wrapped within the green field |'));
214 fontloader: function()
217 testApplication = "Elements: FontLoader";
218 testBinary = "tests/testapplications/elements/elements";
219 testGoal = "Verify the FontLoader element is shown correctly";
220 testPreconditions = "";
224 prompt(twiki('---+++ ' + testApplication + '<br><br>
225 *Goal:* ' + testGoal + '<br>
226 *Pre-Requisites:* ' + testPreconditions + '<br>
227 *Tested Binary:* ' + testBinary + '<br>
228 | Select the FontLoader list item | Verify it shows a box with a named font in the center |
229 | '+adv+' | Verify the font has changed along with the named font text |
230 | '+adv+' | Verify the font is changing every half second, for at least a few different fonts, without error |
231 | '+adv+' | Verify the font has changed to a Neon Lights font |
232 | '+adv+' | Verify the font has reverted to a named system font |'));
235 flipable: function() {
237 testApplication = "Elements: Flipable";
238 testBinary = "tests/testapplications/elements/elements";
239 testGoal = "Verify the Flipable element is shown correctly";
240 testPreconditions = "";
244 prompt(twiki('---+++ ' + testApplication + '<br><br>
245 *Goal:* ' + testGoal + '<br>
246 *Pre-Requisites:* ' + testPreconditions + '<br>
247 *Tested Binary:* ' + testBinary + '<br>
248 | Select the Flipable list item | Verify it shows a large green rectangle |
249 | '+adv+' | Verify it slowly spins horizontally to show a red rectangle on the back |
250 | '+adv+' | Verify it again slowly spins horizontally to show a green rectangle on the front |
251 | '+adv+' | Verify it again slowly spins vertically to show a red rectangle on the back |
252 | '+adv+' | Verify it again slowly spins horizontally to show a green rectangle on the front |'));
255 intvalidator: function()
258 testApplication = "Elements: IntValidator";
259 testBinary = "tests/testapplications/elements/elements";
260 testGoal = "Verify the IntValidator element is shown correctly";
261 testPreconditions = "";
265 prompt(twiki('---+++ ' + testApplication + '<br><br>
266 *Goal:* ' + testGoal + '<br>
267 *Pre-Requisites:* ' + testPreconditions + '<br>
268 *Tested Binary:* ' + testBinary + '<br>
269 | Select the IntValidator list item | Verify it shows a green field with the number 0. The upper and lower bounds are 30 and -50 |
270 | '+adv+' | Verify the number is now -80, and the field is now red |
271 | '+adv+' | Verify the number is now -50, and the field is now green |
272 | '+adv+' | Verify the number is now 35, and the field is now red |
273 | '+adv+' | Verify the top value has changed to 35, and the field is now green |
274 | '+adv+' | Verify the bottom has changed to 36, and the field is now red |'));
277 doublevalidator: function()
280 testApplication = "Elements: DoubleValidator";
281 testBinary = "tests/testapplications/elements/elements";
282 testGoal = "Verify the DoubleValidator element is shown correctly";
283 testPreconditions = "";
287 prompt(twiki('---+++ ' + testApplication + '<br><br>
288 *Goal:* ' + testGoal + '<br>
289 *Pre-Requisites:* ' + testPreconditions + '<br>
290 *Tested Binary:* ' + testBinary + '<br>
291 | Select the DoubleValidator list item | Verify it shows a green field with the number 0. The upper and lower bounds are 30.06 and 30.02 |
292 | '+adv+' | Verify the number is now 30.01, and the field is now red |
293 | '+adv+' | Verify the number is now 30.02, and the field is now green |
294 | '+adv+' | Verify the number is now 30.08, and the field is now red |
295 | '+adv+' | Verify the top value has changed to 30.09, and the field is now green |
296 | '+adv+' | Verify the bottom has changed to 40.05, and the field is now red |'));
299 regexpvalidator: function()
302 testApplication = "Elements: RegExpValidator";
303 testBinary = "tests/testapplications/elements/elements";
304 testGoal = "Verify the RegExpValidator element is shown correctly";
305 testPreconditions = "";
309 prompt(twiki('---+++ ' + testApplication + '<br><br>
310 *Goal:* ' + testGoal + '<br>
311 *Pre-Requisites:* ' + testPreconditions + '<br>
312 *Tested Binary:* ' + testBinary + '<br>
313 | Select the RegExpValidator list item | Verify it shows a green field with the text abc |
314 | '+adv+' | Verify the text is now 123, and the field is now red |
315 | '+adv+' | Verify the number is now aa, and the field is still red |
316 | '+adv+' | Verify the number is now abcd, and the field is still red |
317 | '+adv+' | Verify the regex value has changed to allow four characters, and the field is now green |'));
323 testApplication = "Elements: Column";
324 testBinary = "tests/testapplications/elements/elements";
325 testGoal = "Verify the Column element is shown correctly";
326 testPreconditions = "";
330 prompt(twiki('---+++ ' + testApplication + '<br><br>
331 *Goal:* ' + testGoal + '<br>
332 *Pre-Requisites:* ' + testPreconditions + '<br>
333 *Tested Binary:* ' + testBinary + '<br>
334 | Select the Column list item | Verify it shows three rectangles - green, red and black |
335 | '+adv+' | Verify the blue rectangle slid in to place between the red and black rectangles |'));
341 testApplication = "Elements: Row";
342 testBinary = "tests/testapplications/elements/elements";
343 testGoal = "Verify the Row element is shown correctly";
344 testPreconditions = "";
348 prompt(twiki('---+++ ' + testApplication + '<br><br>
349 *Goal:* ' + testGoal + '<br>
350 *Pre-Requisites:* ' + testPreconditions + '<br>
351 *Tested Binary:* ' + testBinary + '<br>
352 | Select the Row list item | Verify it shows three rectangles - green, red and black |
353 | '+adv+' | Verify the blue rectangle slid in to place between the red and black rectangles |'));
359 testApplication = "Elements: Flow";
360 testBinary = "tests/testapplications/elements/elements";
361 testGoal = "Verify the Flow element is shown correctly";
362 testPreconditions = "";
366 prompt(twiki('---+++ ' + testApplication + '<br><br>
367 *Goal:* ' + testGoal + '<br>
368 *Pre-Requisites:* ' + testPreconditions + '<br>
369 *Tested Binary:* ' + testBinary + '<br>
370 | Select the Flow list item | Verify it shows three rectangles - green (1), red (2, to the right of 1) and black (4, below 1) |
371 | '+adv+' | Verify the blue rectangle appears where the black was, the black sliding to the right |
372 | '+adv+' | Verify the direction of the numbers is now in two columns |
373 | '+adv+' | Verify the direction of the numbers has now reversed, still in columns, but progressing from the right to left |'));
379 testApplication = "Elements: Grid";
380 testBinary = "tests/testapplications/elements/elements";
381 testGoal = "Verify the Grid element is shown correctly";
382 testPreconditions = "";
386 prompt(twiki('---+++ ' + testApplication + '<br><br>
387 *Goal:* ' + testGoal + '<br>
388 *Pre-Requisites:* ' + testPreconditions + '<br>
389 *Tested Binary:* ' + testBinary + '<br>
390 | Select the Grid list item | Verify it shows four rectangles - green, a red to the right and a black below |
391 | '+adv+' | Verify the blue rectangle slid in to place previously held by the black rectangle |'));
397 testApplication = "Elements: Repeater";
398 testBinary = "tests/testapplications/elements/elements";
399 testGoal = "Verify the Repeater element is shown correctly";
400 testPreconditions = "";
404 prompt(twiki('---+++ ' + testApplication + '<br><br>
405 *Goal:* ' + testGoal + '<br>
406 *Pre-Requisites:* ' + testPreconditions + '<br>
407 *Tested Binary:* ' + testBinary + '<br>
408 | Select the Repeater list item | Verify it shows five blue rectangles with text and a green rectangle at the bottom |
409 | '+adv+' | Verify the third blue rectangle is now gone and the others bounced up to fill the gap |'));