Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / tests / system / sys_textinput.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   select_text: function()
47   {
48        // Test meta data
49        testTitle = "Text Selection";
50        testBinary = "qmlscene tests/testapplications/text/text.qml";
51        testGoal = "Verify text can be selected via various methods";
52        testPreconditions = "None";
53        testGroups = "BAT";
54
55        // Test Steps
56        prompt(twiki('---+++ ' + testTitle + '<br><br>
57            *Goal:* ' + testGoal + '<br>
58            *Pre-Requisites:* ' + testPreconditions + '<br>
59            *Tested Binary:* ' + testBinary + '<br>
60
61     | *Step* | *Verification* |
62     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
63     | Select the Text: Short option | "Hello World" is shown |
64     | Press the Select Word button | World is selected |
65     | Press the Select All button | Hello World is selected |
66     | Press the Select None button | No text is selected |
67     | Select the Mouse: On option | |
68     | Drag over some text | Only that text is selected. On a touchscreen only device the virtual keyboard may show |
69     | Select the Mouse: Off option | |
70     | Press the Select None button | No text is selected |
71     | Drag over some text | No text is selected. On a touchscreen only device the virtual keyboard may show |'));
72   },
73
74   cut_copy_and_paste: function()
75   {
76       // Test meta data
77       testTitle = "Cut, copy and paste";
78       testBinary = "qmlscene tests/testapplications/text/text.qml";
79       testGoal = "Verify selected text can be copied/cut to the clipboard, and returned";
80       testPreconditions = "None";
81       testGroups = "BAT";
82
83       // Test Steps
84       prompt(twiki('---+++ ' + testTitle + '<br><br>
85           *Goal:* ' + testGoal + '<br>
86           *Pre-Requisites:* ' + testPreconditions + '<br>
87           *Tested Binary:* ' + testBinary + '<br>
88
89     | *Step* | *Verification* |
90     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
91     | Select the Text: Short option | "Hello World" is shown |
92     | Press the Select All button | Hello World is selected |
93     | Press the Copy Button | |
94     | Press the Position End Button | Text is no longer selected, cursor is at the text end |
95     | Press the Paste Button | "Hello WorldHello World" is shown  |
96     | Press the Select Word button | World is highlighted |
97     | Press the Cut button | World is removed from the text |
98     | Press the Paste button | "Hello WorldHello World" is shown |'));
99   },
100
101   password_echo_mode: function()
102   {
103       // Test meta data
104       testTitle = "Password Echo";
105       testBinary = "qmlscene tests/testapplications/text/text.qml";
106       testGoal = "Verify password echo modes display text correctly";
107       testPreconditions = "None";
108       testGroups = "BAT";
109
110       // Test Steps
111       prompt(twiki('---+++ ' + testTitle + '<br><br>
112           *Goal:* ' + testGoal + '<br>
113           *Pre-Requisites:* ' + testPreconditions + '<br>
114           *Tested Binary:* ' + testBinary + '<br>
115
116     | *Step* | *Verification* |
117     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
118     | Select the Text: Short option | "Hello World" is shown |
119     | Select the Echo: Password option | Hello World is now a string of asterisks |
120     | Enter an exclamation mark | An asterisk is added to the string |
121     | Select the Echo: None option  | No text is visible |
122     | Enter an exclamation mark | No text is shown |
123     | Select the Echo: OnEdit option | A string of asterisks is shown |
124     | Enter an exclamation mark | An exclamation mark appears at the end of the asterisks, but shortly becomes an asterisk |
125     | Select the Echo: Normal option | Hello World!!! is now displayed |'));
126   },
127
128   styling: function()
129   {
130        // Test meta data
131        testTitle = "Text Styling";
132        testBinary = "qmlscene tests/testapplications/text/text.qml";
133        testGoal = "Verify text can be displayed using generic styling";
134        testPreconditions = "None";
135        testGroups = "BAT";
136
137        // Test Steps
138        prompt(twiki('---+++ ' + testTitle + '<br><br>
139            *Goal:* ' + testGoal + '<br>
140            *Pre-Requisites:* ' + testPreconditions + '<br>
141            *Tested Binary:* ' + testBinary + '<br>
142
143     | *Step* | *Verification* |
144     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
145     | Select the Text: Short option | "Hello World" is shown |
146     | Select the Bold: On option | Hello World is now in bold |
147     | Press the Italics: On option | Hello World is now in italics |
148     | Press the Strikeout: On option | Hello World now has a line passing through it |
149     | Press the Underline: On option | Hello World is now underlined | '));
150   },
151
152   cursor_behavior: function()
153   {
154        // Test meta data
155        testTitle = "Cursor Behavior";
156        testBinary = "qmlscene tests/testapplications/text/text.qml";
157        testGoal = "Verify the text cursor displays correctly";
158        testPreconditions = "None";
159        testGroups = "BAT";
160
161        // Test Steps
162        prompt(twiki('---+++ ' + testTitle + '<br><br>
163            *Goal:* ' + testGoal + '<br>
164            *Pre-Requisites:* ' + testPreconditions + '<br>
165            *Tested Binary:* ' + testBinary + '<br>
166
167     | *Step* | *Verification* |
168     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
169     | Enter enough text into the field such that it passes beyond the far right | The text scrolls to the left when the edge is reached |
170     | Select the Autoscroll: Off button | The far left edge shows the first character of the text |
171     | Select the Cursor: Off option | The cursor disappears |
172     | Select the Cursor: On option | The cursor appears | '));
173   },
174
175   capitalization: function()
176   {
177       // Test meta data
178       testTitle = "Capitalization";
179       testBinary = "qmlscene tests/testapplications/text/text.qml";
180       testGoal = "Verify character capitalization behaves correctly";
181       testPreconditions = "None";
182       testGroups = "BAT";
183
184       // Test Steps
185       prompt(twiki('---+++ ' + testTitle + '<br><br>
186           *Goal:* ' + testGoal + '<br>
187           *Pre-Requisites:* ' + testPreconditions + '<br>
188           *Tested Binary:* ' + testBinary + '<br>
189
190     | *Step* | *Verification* |
191     | Execute '+testBinary+' | "The TextInput item displays an editable line of text." is displayed |
192     | Select the Cap10n: Upper option | The text is converted to all upper case |
193     | Select the Cap10n: Lower option | The text is converted to all lower case |
194     | Select the Cap10n: SmallCaps option | The text is converted to all small sized upper case characters |
195     | Select the Cap10n: Capitals option | The text is shown with each first character of every word capitalized | '));
196   }
197 }