Add packaging files for Tizen
[profile/ivi/qtdeclarative.git] / tests / system / sys_listview.qtt
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the test suite of the Qt Toolkit.
7 **
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.
16 **
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.
20 **
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.
28 **
29 ** Other Usage
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.
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 //TESTED_COMPONENT=qtdeclarative
43
44 testcase = {
45
46     using_section_delegates: function()
47     {
48         // Test Meta-data
49         testTitle = "Using and changing section delegate properties";
50         testBinary = "sections.qml";
51         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
52         testGoal = "Verify that a Component can be set as a section header, using various properties for different collections.";
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 ListView |
63     | | The view shows a single character section header for each element |
64     | Press the Criteria button | The section headers now show the full name of each item |
65     | Press Property | The section headers now show the id value for the items |
66     | Press Criteria | The section headers now only show i - the first character of id |
67     | Press Property | The section headers show the first character of the item names |'));
68     },
69
70     updating_sections: function()
71     {
72         // Test Meta-data
73         testTitle = "Updating Collected Sections";
74         testBinary = "sections.qml";
75         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
76         testGoal = "Verify that a section is updated when items are added.";
77         testPreconditions = "None";
78         testGroups = "BAT,QtQuick 2.0";
79
80         // Test Steps
81         prompt(twiki('---+++ ' + testTitle + '<br><br>
82         *Goal:* ' + testGoal + '<br>
83         *Pre-Requisites:* ' + testPreconditions + '<br>
84         *Tested Binary:* ' + testBinary + '<br>
85     | *Step* | *Verification* |
86     | Run '+testBinary+' | Application has started, showing a ListView |
87     | | The view shows a single character section header for each element |
88     | Press the + button | A duplicate of every name is added |
89     |  | Each duplicate is place in the same section as the original |'));
90     },
91
92     changing_section_delegates: function()
93     {
94         // Test Meta-data
95         testTitle = "Changing Section Delegates";
96         testBinary = "sections.qml";
97         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
98         testGoal = "Verify that a section delegate can be changed.";
99         testPreconditions = "None";
100         testGroups = "BAT,QtQuick 2.0";
101
102         // Test Steps
103         prompt(twiki('---+++ ' + testTitle + '<br><br>
104         *Goal:* ' + testGoal + '<br>
105         *Pre-Requisites:* ' + testPreconditions + '<br>
106         *Tested Binary:* ' + testBinary + '<br>
107     | *Step* | *Verification* |
108     | Run '+testBinary+' | Application has started, showing a ListView |
109     | | The view shows a single character section header for each element |
110     | Press the Delegate button | The section headers now show as light blue rectangles |
111     | Press the Criteria button | The headers show as full names, still within light blue rectangles |'));
112     },
113
114     altering_listview_primary_properties: function()
115     {
116         // Test Meta-data
117         testTitle = "Altering ListView primary properties";
118         testBinary = "alteredViews.qml";
119         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
120         testGoal = "Verify that the model and delegate for a ListView can be changed";
121         testPreconditions = "None";
122         testGroups = "BAT,QtQuick 2.0";
123
124         // Test Steps
125         prompt(twiki('---+++ ' + testTitle + '<br><br>
126         *Goal:* ' + testGoal + '<br>
127         *Pre-Requisites:* ' + testPreconditions + '<br>
128         *Tested Binary:* ' + testBinary + '<br>
129     | *Step* | *Verification* |
130     | Run '+testBinary+' | Application has started, showing a ListView |
131     | | The view shows items named Model1_1 - 5, and the delegates are white with a black border |
132     | Press the Mod button | The view now shows items named Model2_1 - 5 |
133     | Press Del | The delegates are now golden with a black border |
134     | Press Mod, then Del | The view again shows items named Model1_1 - 5, and are white |'));
135     },
136
137     altering_listview_orientation: function()
138     {
139         // Test Meta-data
140         testTitle = "Altering ListView orientation";
141         testBinary = "alteredViews.qml";
142         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
143         testGoal = "Verify that the orientation of a listview can be changed at runtime";
144         testPreconditions = "None";
145         testGroups = "BAT,QtQuick 2.0";
146
147         // Test Steps
148         prompt(twiki('---+++ ' + testTitle + '<br><br>
149         *Goal:* ' + testGoal + '<br>
150         *Pre-Requisites:* ' + testPreconditions + '<br>
151         *Tested Binary:* ' + testBinary + '<br>
152     | *Step* | *Verification* |
153     | Run '+testBinary+' | Application has started, showing a ListView |
154     | | The view shows items named Model1_1 - 5, and the delegates are white with a black border |
155     | Press the Ori button | The view is now displayed in a horizontal orientation |
156     |  | The delegates should have resized quickly and smoothly, and the text rotated anticlockwise (both animated) |
157     | Press Del | The delegates are now golden with a black border, still in horizontal orientation |
158     | Press Ori | The view again shows in a vertical orientation, with the golden delegates |'));
159     },
160
161     basic_view_transition: function()
162     {
163         // Test Meta-data
164         testTitle = "Basic View Transitions";
165         testBinary = "viewTransitions.qml";
166         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
167         testGoal = "Verify a basic transition can be applied to a ListView action";
168         testPreconditions = "None";
169         testGroups = "BAT,QtQuick 2.0";
170         testRequirements = "QTBUG-21504: Enable transitions for add/move/remove operations on views";
171
172         // Test Steps
173         prompt(twiki('---+++ ' + testTitle + '<br><br>
174         *Goal:* ' + testGoal + '<br>
175         *Pre-Requisites:* ' + testPreconditions + '<br>
176         *Tested Binary:* ' + testBinary + '<br>
177     | *Step* | *Verification* |
178     | Run '+testBinary+' | Application has started, showing a ListView |
179     | Press the Set A button | The Set A button shows green |
180     | Press Add | A new yellow item fades in after the currently selected item |
181     |  | The other items slide down, with a slight delay for each item, giving it a flowing effect |
182     | Select the new item | |
183     | Press To Top | The item changes to light blue and moves to the top, curving out to the right of the ListView |
184     | Select an item near the top and press Remove | The selected item fades out |
185     |  | The other items slide up, with a slight delay for each item, giving it a flowing effect |'));
186     },
187
188     switching_view_transition: function() {
189         // Test Meta-data
190         testTitle = "Switching View Transitions";
191         testBinary = "viewTransitions.qml";
192         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
193         testGoal = "Verify a basic ListView transition can be changed to another";
194         testPreconditions = "None";
195         testGroups = "BAT,QtQuick 2.0";
196         testRequirements = "QTBUG-21504: Enable transitions for add/move/remove operations on views";
197
198         // Test Steps
199         prompt(twiki('---+++ ' + testTitle + '<br><br>
200         *Goal:* ' + testGoal + '<br>
201         *Pre-Requisites:* ' + testPreconditions + '<br>
202         *Tested Binary:* ' + testBinary + '<br>
203     | *Step* | *Verification* |
204     | Run '+testBinary+' | Application has started, showing a ListView |
205     | Press the Set A button | The Set A button shows green |
206     | Press Add | A new yellow item fades in after the currently selected item |
207     |  | The other items slide down, with a slight delay for each item, giving it a flowing effect |
208     | Select the new item | |
209     | Press To Top | The item changes to light blue and moves to the top, curving out to the right of the ListView |
210     | Select an item near the top and press Remove | The selected item fades out |
211     |  | The other items slide up, with a slight delay for each item, giving it a flowing effect |
212     | Press the Set B button | The Set B button shows green |
213         | Press Add | A new yellow item pops in after the currently selected item |
214     |  | The other items tumble down in a disorderly manner |
215     | Select the new item | |
216     | Press To Top | The item changes from red to light blue and curves out to the right of the ListView, bouncing in at the top |
217     | Select an item near the top and press Remove | The selected item pops out |
218     |  | The other items slide up, with a slight delay for each item, giving it a flowing effect |'));
219     },
220
221     different_transitions_for_every_operation: function() {
222         // Test Meta-data
223         testTitle = "Different Transitions for all Operations";
224         testBinary = "viewTransitions.qml";
225         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
226         testGoal = "Verify a different Transition can be applied to displacement from adding, moving and removing.";
227         testPreconditions = "None";
228         testGroups = "BAT,QtQuick 2.0";
229         testRequirements = "QTBUG-21504: Enable transitions for add/move/remove operations on views";
230
231         // Test Steps
232         prompt(twiki('---+++ ' + testTitle + '<br><br>
233         *Goal:* ' + testGoal + '<br>
234         *Pre-Requisites:* ' + testPreconditions + '<br>
235         *Tested Binary:* ' + testBinary + '<br>
236     | *Step* | *Verification* |
237     | Run '+testBinary+' | Application has started, showing a ListView |
238     | Press the Set C button | The Set C button shows green |
239     | Press Add | A new yellow item swoops in from the side |
240     |  | The other items jitter down, with a slight delay for each item |
241     | Select the new item | |
242     | Press To Top | The item changes from red to light blue and moves to the top, curving out to the right of the ListView |
243     | | The other items bounce down in a solid block |
244     | Select an item near the top and press Remove | The selected item fades out in a flashing manner |
245     |  | The other items snap up, with a slight delay for each item |
246     | Press the Append button a few times | Each added item swoops in from alternating sides | '));
247     },
248
249     delegates_and_effects: function() {
250         testTitle = "Delegates and effects";
251         testBinary = "viewTransitions.qml";
252         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
253         testGoal = "Verify a delegate in transition can show effects.";
254         testPreconditions = "None";
255         testGroups = "BAT,QtQuick 2.0";
256         testRequirements = "QTBUG-21504: Enable transitions for add/move/remove operations on views";
257
258         // Test Steps
259         prompt(twiki('---+++ ' + testTitle + '<br><br>
260         *Goal:* ' + testGoal + '<br>
261         *Pre-Requisites:* ' + testPreconditions + '<br>
262         *Tested Binary:* ' + testBinary + '<br>
263     | *Step* | *Verification* |
264     | Run '+testBinary+' | Application has started, showing a ListView |
265     | Press the Set D button | The Set D button shows green |
266     | Select a lower item | The item is highlighted |
267     | Press To Top | The item fades to red particles, shifts to the top, and fades back to a normal delegate |
268     | | The other items shuffle down |'));
269     },
270
271     attached_onremove_property: function() {
272         testTitle = "Using the attached onRemove property";
273         testBinary = "onRemove.qml";
274         testSource: "$QTDIR/qtdeclarative/tests/system/listview";
275         testGoal = "Verify the onRemove attached property can be assigned.";
276         testPreconditions = "None";
277         testGroups = "BAT,QtQuick 2.0";
278         testRequirements = "QTBUG-21504: Enable transitions for add/move/remove operations on views";
279
280         // Test Steps
281         prompt(twiki('---+++ ' + testTitle + '<br><br>
282         *Goal:* ' + testGoal + '<br>
283         *Pre-Requisites:* ' + testPreconditions + '<br>
284         *Tested Binary:* ' + testBinary + '<br>
285     | *Step* | *Verification* |
286     | Run '+testBinary+' | Application has started, showing a ListView |
287     | Press the <b>-</b> button | The selected item disappears in a shower of sparks |'));
288     }
289 }