aboutsummaryrefslogtreecommitdiffstats
path: root/tests/system/sys_elements.qtt
blob: c8c8b19672f35b65f5f81d176c7f436e872fc5d1 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

//TESTED_COMPONENT=qtdeclarative
var adv = "Press the Advance button";
testcase = {

    rectangle: function()
    {
        // Test Meta-data
        testApplication = "Elements: Rectangle";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the rectangle element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
    | Select the Rectangle list item | Verify that the Rectangle displayed in the center is small, blue, with a thin red angular border |
    | '+adv+' | The rectangle should now be twice the size as the previous step |
    | '+adv+' | The rectangle should now have rounded corners |
    | '+adv+' | The rectangle color should have shifted to green |
    | '+adv+' | The rectangle border should have increased significantly |
    | '+adv+' | The rectangle border should have now be small, blue, with a thin red angular border |'));
    },

    image: function()
    {
        // Test Meta-data
        testApplication = "Elements: Image";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Image element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Image list item | Verify it shows the Nokia logo, large and still slightly stretched |
     | '+adv+' | Verify it shows the Nokia logo normally, longer horizontally |
     | '+adv+' | Verify it shows the Nokia logo with the sides cut |
     | '+adv+' | Verify it shows the Nokia logo repeated both horizontally and vertically |
     | '+adv+' | Verify it shows the Nokia logo repeated vertically only |
     | '+adv+' | Verify it shows the Nokia logo repeated horizontally only |'));
    },

    animatedimage: function()
    {
        // Test Meta-data
        testApplication = "Elements: AnimatedImage";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the AnimatedImage element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the AnimatedImage list item | Verify it shows a small animated icon, but slightly stretched. |
     | '+adv+' | Verify it shows the animated icon, large and still slightly stretched |
     | '+adv+' | Verify it shows the animated icon normally, square |
     | '+adv+' | Verify it shows the animated icon with the sides cut |
     | '+adv+' | Verify it shows the animated icon repeated both horizontally and vertically |
     | '+adv+' | Verify it shows the animated icon repeated vertically only |
     | '+adv+' | Verify it shows the animated icon repeated horizontally only |'));
    },

    borderimage: function()
    {
        // Test Meta-data
        testApplication = "Elements: BorderImage";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the BorderImage element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the BorderImage list item | Verify it shows a small framed image |
     | '+adv+' | Verify it shows the frame, large and each side stretched |
     | '+adv+' | Verify it shows the frame with slightly off centere sides |
     | '+adv+' | Verify it shows the frame with uniformly repeated sides |'));
    },

    systempalette: function()
    {
        // Test Meta-data
        testApplication = "Elements: SystemPalette";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the SystemPalette element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the SystemPalette list item | Verify it shows a mockup of an application |
     | '+adv+' | Verify it shows the colors similar to the system it is running on |
     | '+adv+' | Verify it shows the new coloring |'));
    },

    text: function()
    {
        // Test Meta-data
        testApplication = "Elements: Text";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Text element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Text list item | Verify it shows a Hello message |
     | '+adv+' | Verify it shows the text increased to twice the previous size, and wrapped to two lines |
     | '+adv+' | Verify it shows the text smoothly changed color to blue over a second |
     | '+adv+' | Verify it shows the text as blue, bolded and in italic |
     | '+adv+' | Verify it shows the text as alternating between green and black |'));
    },

    textinput: function()
    {
        // Test Meta-data
        testApplication = "Elements: TextInput";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the TextInput element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the TextInput list item | Verify it shows two fields, the green one displaying a Hello message |
     | '+adv+' | Verify it selects the last word - TextInput - of the green field |
     | '+adv+' | Verify it animates a copy of the selected text to the gray field |
     | '+adv+' | Verify it shows the text as asterisks |'));
    },

    textedit: function()
    {
        // Test Meta-data
        testApplication = "Elements: TextEdit";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the TextEdit element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the TextEdit list item | Verify it shows two large fields |
     | '+adv+' | Verify it selects the last word - TextEdit - of the green field |
     | '+adv+' | Verify it animates a copy of the selected text to the gray field |
     | '+adv+' | Verify it shows more text, with the end disappearing past the right side of the green field |
     | '+adv+' | Verify it shows the full text, properly wrapped within the green field |'));
    },

    fontloader: function()
    {
        // Test Meta-data
        testApplication = "Elements: FontLoader";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the FontLoader element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the FontLoader list item | Verify it shows a box with a named font in the center |
     | '+adv+' | Verify the font has changed along with the named font text |
     | '+adv+' | Verify the font is changing every half second, for at least a few different fonts, without error |
     | '+adv+' | Verify the font has changed to a Neon Lights font |
     | '+adv+' | Verify the font has reverted to a named system font |'));
    },

    flipable: function() {
        // Test Meta-data
        testApplication = "Elements: Flipable";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Flipable element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Flipable list item | Verify it shows a large green rectangle |
     | '+adv+' | Verify it slowly spins horizontally to show a red rectangle on the back |
     | '+adv+' | Verify it again slowly spins horizontally to show a green rectangle on the front |
     | '+adv+' | Verify it again slowly spins vertically to show a red rectangle on the back |
     | '+adv+' | Verify it again slowly spins horizontally to show a green rectangle on the front |'));
    },

    intvalidator: function()
    {
        // Test Meta-data
        testApplication = "Elements: IntValidator";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the IntValidator element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the IntValidator list item | Verify it shows a green field with the number 0. The upper and lower bounds are 30 and -50 |
     | '+adv+' | Verify the number is now -80, and the field is now red |
     | '+adv+' | Verify the number is now -50, and the field is now green |
     | '+adv+' | Verify the number is now 35, and the field is now red |
     | '+adv+' | Verify the top value has changed to 35, and the field is now green |
     | '+adv+' | Verify the bottom has changed to 36, and the field is now red |'));
    },

    doublevalidator: function()
    {
        // Test Meta-data
        testApplication = "Elements: DoubleValidator";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the DoubleValidator element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | 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 |
     | '+adv+' | Verify the number is now 30.01, and the field is now red |
     | '+adv+' | Verify the number is now 30.02, and the field is now green |
     | '+adv+' | Verify the number is now 30.08, and the field is now red |
     | '+adv+' | Verify the top value has changed to 30.09, and the field is now green |
     | '+adv+' | Verify the bottom has changed to 40.05, and the field is now red |'));
    },

    regexpvalidator: function()
    {
        // Test Meta-data
        testApplication = "Elements: RegExpValidator";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the RegExpValidator element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the RegExpValidator list item | Verify it shows a green field with the text abc |
     | '+adv+' | Verify the text is now 123, and the field is now red |
     | '+adv+' | Verify the number is now aa, and the field is still red |
     | '+adv+' | Verify the number is now abcd, and the field is still red |
     | '+adv+' | Verify the regex value has changed to allow four characters, and the field is now green |'));
    },

    column: function()
    {
        // Test Meta-data
        testApplication = "Elements: Column";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Column element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Column list item | Verify it shows three rectangles - green, red and black |
     | '+adv+' | Verify the blue rectangle slid in to place between the red and black rectangles |'));
    },

    row: function()
    {
        // Test Meta-data
        testApplication = "Elements: Row";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Row element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Row list item | Verify it shows three rectangles - green, red and black |
     | '+adv+' | Verify the blue rectangle slid in to place between the red and black rectangles |'));
    },

    flow: function()
    {
        // Test Meta-data
        testApplication = "Elements: Flow";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Flow element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Flow list item | Verify it shows three rectangles - green (1), red (2, to the right of 1) and black (4, below 1) |
     | '+adv+' | Verify the blue rectangle appears where the black was, the black sliding to the right |
     | '+adv+' | Verify the direction of the numbers is now in two columns |
     | '+adv+' | Verify the direction of the numbers has now reversed, still in columns, but progressing from the right to left |'));
    },

    grid: function()
    {
        // Test Meta-data
        testApplication = "Elements: Grid";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Grid element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Grid list item | Verify it shows four rectangles - green, a red to the right and a black below |
     | '+adv+' | Verify the blue rectangle slid in to place previously held by the black rectangle |'));
    },

    repeater: function()
    {
        // Test Meta-data
        testApplication = "Elements: Repeater";
        testBinary = "tests/testapplications/elements/elements";
        testGoal = "Verify the Repeater element is shown correctly";
        testPreconditions = "";
        testGroups = "BAT";

        // Test Steps
        prompt(twiki('---+++ ' + testApplication + '<br><br>
        *Goal:* ' + testGoal + '<br>
        *Pre-Requisites:* ' + testPreconditions + '<br>
        *Tested Binary:* ' + testBinary + '<br>
     | Select the Repeater list item | Verify it shows five blue rectangles with text and a green rectangle at the bottom |
     | '+adv+' | Verify the third blue rectangle is now gone and the others bounced up to fill the gap |'));
    }
}