summaryrefslogtreecommitdiffstats
path: root/tests/system
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
commit12a5ddf456ba8549645a8cb28a8b4ed6197a14da (patch)
tree63ee2c88af936e0609a3a194f5bcc304c4c0b707 /tests/system
Import relevant source from Qt 4.8
Diffstat (limited to 'tests/system')
-rw-r--r--tests/system/declarative/sys_calculator/sys_calculator.pro2
-rw-r--r--tests/system/declarative/sys_calculator/sys_calculator.qtt136
-rw-r--r--tests/system/declarative/sys_dial/sys_dial.pro2
-rw-r--r--tests/system/declarative/sys_dial/sys_dial.qtt53
-rw-r--r--tests/system/declarative/sys_flickr/sys_flickr.pro2
-rw-r--r--tests/system/declarative/sys_flickr/sys_flickr.qtt69
-rw-r--r--tests/system/declarative/sys_parallax/sys_parallax.pro2
-rw-r--r--tests/system/declarative/sys_parallax/sys_parallax.qtt59
-rw-r--r--tests/system/declarative/sys_pincharea/sys_pincharea.pro2
-rw-r--r--tests/system/declarative/sys_pincharea/sys_pincharea.qtt78
-rw-r--r--tests/system/declarative/sys_rtl/sys_rtl.pro2
-rw-r--r--tests/system/declarative/sys_rtl/sys_rtl.qtt100
-rw-r--r--tests/system/declarative/sys_samegame/sys_samegame.pro2
-rw-r--r--tests/system/declarative/sys_samegame/sys_samegame.qtt60
-rw-r--r--tests/system/declarative/sys_textedit/sys_textedit.pro2
-rw-r--r--tests/system/declarative/sys_textedit/sys_textedit.qtt116
-rw-r--r--tests/system/declarative/sys_textinput/sys_textinput.pro2
-rw-r--r--tests/system/declarative/sys_textinput/sys_textinput.qtt137
-rw-r--r--tests/system/declarative/sys_twitter/sys_twitter.pro2
-rw-r--r--tests/system/declarative/sys_twitter/sys_twitter.qtt59
-rw-r--r--tests/system/declarative/sys_webbrowser/sys_webbrowser.pro2
-rw-r--r--tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt60
22 files changed, 949 insertions, 0 deletions
diff --git a/tests/system/declarative/sys_calculator/sys_calculator.pro b/tests/system/declarative/sys_calculator/sys_calculator.pro
new file mode 100644
index 00000000..0ce29735
--- /dev/null
+++ b/tests/system/declarative/sys_calculator/sys_calculator.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_calculator.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_calculator/sys_calculator.qtt b/tests/system/declarative/sys_calculator/sys_calculator.qtt
new file mode 100644
index 00000000..45d6163b
--- /dev/null
+++ b/tests/system/declarative/sys_calculator/sys_calculator.qtt
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+var add = "+";
+var sub = "-";
+var mul = "x";
+var div = "/";
+var xsquared = "x²";
+var plusminus = "±";
+
+testcase = {
+ initTestCase: function()
+ {
+ print("Please ensure that $PATH contains $QTDIR/bin, and $QT_SRC_DIR is set to the Qt source directory");
+ },
+
+ init: function() {
+ testcase.keyCache = {};
+ },
+
+ binary_operations_data: {
+ operation1: ["0", add, "0", "0"],
+ operation2: ["0", sub, "0", "0"],
+ operation3: ["0", mul, "0", "0"],
+ operation4: ["0", div, "0", "NaN"],
+ operation5: ["0", add, "1", "1"],
+ operation6: ["0", sub, "1", "-1"],
+ operation7: ["0", mul, "1", "0"],
+ operation8: ["0", div, "1", "0"],
+ operation9: ["0.56789", add, "7453.0145", "7453.58239"],
+ operation10: ["0.56789", sub, "7453.0145", "-7452.44661"],
+ operation11: ["0.56789", mul, "7453.0145", "4232.492404405"],
+ operation12: ["0.56789", div, "7453.0145", "0.00007619601437780645"]
+ },
+
+ binary_operations: function(FirstOperand, Operator, SecondOperand, ExpectedResult)
+ {
+ startDemo("calculator");
+
+ var display = findByProperty("qmlType", "Text")[1];
+
+ enterNumber( FirstOperand );
+ select( Operator );
+ enterNumber( SecondOperand );
+ select( "=" );
+
+ compare(getValue(display), ExpectedResult);
+ },
+
+ advanced_mode_data: {
+ operation1: ["-123", "Abs", "123"],
+ operation2: ["3.14159", "Int", "3"],
+ operation3: ["65536", "Sqrt", "256"],
+ operation4: ["123", "^2", "15129"],
+ operation5: ["500", "1/x", "0.002"],
+ operation6: ["999", "+/-", "-999"]
+ },
+
+ advanced_mode: function(Operand, Operator, ExpectedResult)
+ {
+ startDemo("calculator");
+ select("Advanced Mode");
+ wait(1000);
+
+ var display = findWidget("qmlType", "Text")[1];
+
+ enterNumber( Operand );
+ select( Operator );
+
+ compare(getValue(display), ExpectedResult);
+ }
+}
+
+// Enter num as a series of CalcButton activations
+function enterNumber(num) {
+ var numString = num.toString();
+ for (var i=0; i<numString.length; i++) {
+ var digit = numString[i];
+ if (testcase.keyCache[digit] == undefined) {
+ // It is necessary to do this instead of select(digit) because
+ // the display may have the same text as the required button...
+ var button = findWidget( { qmlType: "CalcButton", label: digit } );
+ testcase.keyCache[digit] = button;
+ select(button);
+ } else {
+ select(testcase.keyCache[digit]);
+ }
+ }
+}
+
+// Starts a demo QML file
+function startDemo(demo, demoQml) {
+ if (demoQml == undefined) {
+ demoQml = demo;
+ }
+ startApplication("qml", ["$QT_SRC_DIR/demos/declarative/" + demo + "/" + demoQml + ".qml"]);
+}
diff --git a/tests/system/declarative/sys_dial/sys_dial.pro b/tests/system/declarative/sys_dial/sys_dial.pro
new file mode 100644
index 00000000..6840b598
--- /dev/null
+++ b/tests/system/declarative/sys_dial/sys_dial.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_dial.qtt
diff --git a/tests/system/declarative/sys_dial/sys_dial.qtt b/tests/system/declarative/sys_dial/sys_dial.qtt
new file mode 100644
index 00000000..644468d4
--- /dev/null
+++ b/tests/system/declarative/sys_dial/sys_dial.qtt
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ qtqmlbat9202: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9202 - Dial example
+
+| *Step* | *Verification* |
+| Execute examples/declarative/ui-components/dialcontrol/dialcontrol.qml | |
+| Press and drag the slider across and back | Verify that the dial responds appropriately with the position of the slider |'));
+ }
+}
diff --git a/tests/system/declarative/sys_flickr/sys_flickr.pro b/tests/system/declarative/sys_flickr/sys_flickr.pro
new file mode 100644
index 00000000..df7bd6fa
--- /dev/null
+++ b/tests/system/declarative/sys_flickr/sys_flickr.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_flickr.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_flickr/sys_flickr.qtt b/tests/system/declarative/sys_flickr/sys_flickr.qtt
new file mode 100644
index 00000000..54197845
--- /dev/null
+++ b/tests/system/declarative/sys_flickr/sys_flickr.qtt
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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=src/declarative
+
+testcase = {
+
+ qtqmlbat9201: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9201 - Flickr demo
+ | *Step* | *Verification* |
+ | Execute demos/declarative/flickr/flickr.qml | Verify that a dialog with progress wheel is displayed |
+ | Wait for a few moments for the network to connect and download images | Verify that a proper grid is displayed showing flickrs latest images |
+ | On mobile: Select the *View Mode* button | Verify that the view changes to a list in a smooth Wipe transition |
+ | On desktop: Select the *View Mode* button | Verify that the view changes to scrollable dial |
+ | Select the *View Mode* button | Verify that the view reverts to the grid |
+ | Click on the ellipses icon or tags command (if applicable) | Verify that you can enter a tag |
+ | Click OK | Verify that images referring to given tag are displayed |
+ | Select an image | Verify that picture icon moves in to the information panel smoothly and that a new copy of the image is displayed |
+ | Click on the Star Rating (if applicable) | Verify that you can change your rating for the image |
+ | Click on [View]/[More] | Verify that the Flip transition is displayed smoothly and that a full size image is shown |
+ | Move slider to right | Verify that the image zooms in smoothly corresponding with the slider position |
+ | Zoom in completely | Verify that the image zooms in smoothly |
+ | Drag image| Verify that you are able to pan the image up/down left/right (if applicable) |
+ | Leave image in maximum zoom view | |
+ | Click on [Back]/[More] | Verify that the Flip transition is displayed smoothly and that you are returned to the information panel for the image |
+ | Click on [View]/[More] again | Verify that the Flip transition is displayed smoothly and that the image is shown in its original size (not zoomed) |
+ | Revert back to the starting Grid display | Verify that a proper grid is displayed showing flickrs |
+ | Click [Update] | Verify that the grid has updated with fresh images |'));
+ }
+}
diff --git a/tests/system/declarative/sys_parallax/sys_parallax.pro b/tests/system/declarative/sys_parallax/sys_parallax.pro
new file mode 100644
index 00000000..f37fc7fe
--- /dev/null
+++ b/tests/system/declarative/sys_parallax/sys_parallax.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_parallax.qtt
diff --git a/tests/system/declarative/sys_parallax/sys_parallax.qtt b/tests/system/declarative/sys_parallax/sys_parallax.qtt
new file mode 100644
index 00000000..90bd5114
--- /dev/null
+++ b/tests/system/declarative/sys_parallax/sys_parallax.qtt
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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=examples/parallax
+
+testcase = {
+
+ qtqmlbat9203: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9203 - Parallax example
+
+| *Step* | *Verification* |
+| Execute examples/declarative/modelviews/parallax/parallax.qml | Verify that a ticking clock is displayed |
+| Press and drag the right side of the display across to the left | Verify that the display shifts to the second screen |
+| - | Verify that a "smiley" is visible, repeatedly bouncing with an approx. 1 second delay |
+| Press and drag the right side of the display across to the left | Verify that the display shifts to the third screen |
+| Press the leftmost side of the scrollbar entity at the bottom of the display | Verify that the display shifts gently to the first screen |'));
+ }
+
+}
+
diff --git a/tests/system/declarative/sys_pincharea/sys_pincharea.pro b/tests/system/declarative/sys_pincharea/sys_pincharea.pro
new file mode 100644
index 00000000..0aed02e9
--- /dev/null
+++ b/tests/system/declarative/sys_pincharea/sys_pincharea.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_pincharea.qtt
diff --git a/tests/system/declarative/sys_pincharea/sys_pincharea.qtt b/tests/system/declarative/sys_pincharea/sys_pincharea.qtt
new file mode 100644
index 00000000..230ca5ac
--- /dev/null
+++ b/tests/system/declarative/sys_pincharea/sys_pincharea.qtt
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+testcase = {
+
+ pincharea_resize: function()
+ {
+ prompt(twiki('---+++ Scaling
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers apart on any place in the display, and bring them together | Verify that the qt logo is scaled down (becomes smaller), no less than 50% |
+| Place two fingers close together on any place in the display, and push them apart | Verify that the qt logo is scaled up (becomes larger), no more than 200% |
+| Place two fingers apart on any place in the display, and bring them together, then push them apart | Verify that the qt logo is scaled down, then up |
+| Evaluate | All scaling of the logo should be done in sync with the movement of the fingers |'));
+ },
+
+ pincharea_rotate: function()
+ {
+ prompt(twiki('---+++ Rotation
+If the target device is an N8, expect odd behavior when executing this test. The device does not have a multiple touch screen.
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers apart on any place in the display, and turn them in a clockwise circle | The logo rotates with the movement of the fingers |
+| Rotate the logo beyond 180 degrees | The logo stops at 150 degrees and does not invert to -150 degrees |'));
+ },
+
+ pincharea_drag: function()
+ {
+ prompt(twiki('---+++ Dragging
+If the target device is an N8, expect odd behavior when executing this test. The device does not have a multiple touch screen.
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers on the display, and drag around the screen | |
+| | The logo moves in sync with the gesture. The logo does not move its center beyond the bounds of the rectangle |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_rtl/sys_rtl.pro b/tests/system/declarative/sys_rtl/sys_rtl.pro
new file mode 100644
index 00000000..1837d72d
--- /dev/null
+++ b/tests/system/declarative/sys_rtl/sys_rtl.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_rtl.qtt
diff --git a/tests/system/declarative/sys_rtl/sys_rtl.qtt b/tests/system/declarative/sys_rtl/sys_rtl.qtt
new file mode 100644
index 00000000..ba18237c
--- /dev/null
+++ b/tests/system/declarative/sys_rtl/sys_rtl.qtt
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ implicit_text_alignment: function()
+ {
+ prompt(twiki('---++ Implicit Text alignment
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Observe the three different element types - Text, TextInput, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the right |
+ },
+
+ left_center_and_right_text_alignment_data:
+ {
+ left: ["Left", "left"],
+ center: ["Center", "center"],
+ right: ["Right", "right"]
+ },
+
+ left_center_and_right_text_alignment: function(name,alignment)
+ {
+ prompt(twiki('---++ '+name+' Text alignment
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Press the indicator until '+name+' alignment shows | Verify that the indicator at the bottom shows '+name+' alignment |
+| Observe the three different element types - Text, TextInput, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the '+alignment+' |
+ },
+
+ justified_text_alignment: function()
+ {
+ prompt(twiki('---++ Justified Text alignment
+Note that this only applies to Text and TextEdit. AlignJustify is not available for TextInput
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Press the indicator until Justify alignment shows | Verify that the indicator at the bottom shows Justify alignment |
+| Observe two of the three different element types - Text, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the right |
+ },
+
+ left_center_and_right_text_alignment_data:
+ {
+ left: ["Left", "left"],
+ center: ["Center", "center"],
+ right: ["Right", "right"]
+ },
+
+ select_copy_paste: function(name,alignment)
+ {
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltexteditselection.qml | Verify that the indicator at the bottom button shows Implicit alignment |
+| (Skip this on devices with no Home/End key) In the right-to-left TextInput, press Home, then End | Verify the cursor moves fully to the right of the text only, and then fully to the left side respectively |
+| Press the lower button until it shows '+name+' Alignment | |
+| In the TextEdit field, select some of the text some of the Arabic text | The selected text is shown in the Paste: <text> button - it is now copied |
+| At the leftmost position of the text, press Enter on the keypad or soft keyboard | A new line is created below the existing text |
+| Press the Paste: <text> button | The text is pasted into the box, also '+alignment+' aligned |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_samegame/sys_samegame.pro b/tests/system/declarative/sys_samegame/sys_samegame.pro
new file mode 100644
index 00000000..495a843f
--- /dev/null
+++ b/tests/system/declarative/sys_samegame/sys_samegame.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_samegame.qtt
diff --git a/tests/system/declarative/sys_samegame/sys_samegame.qtt b/tests/system/declarative/sys_samegame/sys_samegame.qtt
new file mode 100644
index 00000000..566aa814
--- /dev/null
+++ b/tests/system/declarative/sys_samegame/sys_samegame.qtt
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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=demos/samegame
+
+testcase = {
+
+ qtqmlbat9204: function(){
+ prompt(twiki('---+++ QTQMLBAT9204 - Samegame demo
+
+ | *Step* | *Verification* |
+ | Execute demos/declarative/samegame/samegame.qml | Verify that the Samegame application starts smoothly |
+ | Click on [New Game] | Verify that the balls drop down from top in a smooth fashion |
+ | Click on a grouping of same colored balls | Verify that the balls disappear smoothly and that visual effects (sparkles) are properly shown |
+ | Keep on playing until you clear a whole column of balls | Verify that the body of balls to the right of the column move smoothly to fill the void |
+ | Click on a single colored ball | Verify that this has no effect on the game |
+ | Play the game till the end | Verify that you are prompted to enter your name |
+ | | Verify that you are displayed your score and time taken to achieve that |
+ | Click on [New Game] again | Verify that the transition from score screen to new playing field is smooth |'));
+ }
+}
+
diff --git a/tests/system/declarative/sys_textedit/sys_textedit.pro b/tests/system/declarative/sys_textedit/sys_textedit.pro
new file mode 100644
index 00000000..30d6d5b1
--- /dev/null
+++ b/tests/system/declarative/sys_textedit/sys_textedit.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_textedit.qtt
diff --git a/tests/system/declarative/sys_textedit/sys_textedit.qtt b/tests/system/declarative/sys_textedit/sys_textedit.qtt
new file mode 100644
index 00000000..91ea1f33
--- /dev/null
+++ b/tests/system/declarative/sys_textedit/sys_textedit.qtt
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ select_text: function()
+ {
+ prompt(twiki('---++ Text Selection
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Select Word button, ensuring the previously entered text in no longer in pre-commit mode | World is selected |
+| Press the Select All button | Hello World is selected |
+| Press the Select None button | No text is selected |
+| Press the Mouse Select button | The button turns green and indicates Mouse On |
+| Click and drag over some text | Only that text is selected. On sans-keyboard Symbian, the soft keyboard may show with selected text highlighted |
+| If the soft keyboard is shown, close it | |
+| Press the Mouse Select button | The button turns gray and indicates Mouse Off |
+| Click and drag over some text | No text is selected. On sans-keyboard Symbian, the soft keyboard may show |
+'));
+ },
+
+ cut_copy_and_paste: function()
+ {
+ prompt(twiki('---++ Cut, copy and paste
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Select All button | Hello World is selected |
+| Press the Copy Button | |
+| Press the Paste Button | Hello World is copied to the light-blue textedit |
+| Press the Select Word button | World is highlighted |
+| Press the Cut button | World is removed from the green textedit |
+| Press the Paste button | World is added to the light-blue textedit |
+'));
+ },
+
+ styling: function()
+ {
+ prompt(twiki('---++ Text Styling
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Bold button | Hello World is now in bold |
+| Press the Italics button | Hello World is now in italics |
+| Press the Strikeout button | Hello World now has a line passing through it |
+| Press the Underline button | Hello World is now underlined | '));
+ },
+
+ cursor_behavior: function()
+ {
+ prompt(twiki('---++ Cursor Behavior
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | The Cursor button shows enabled (green) |
+| Enter enough text into the field such that it passes beyond the far right | The text wraps to line 2 |
+| Press the Cursor button as to disable it | The cursor disappears |
+| Press the Cursor button as to enable it | The cursor appears | '));
+ },
+
+ capitalization: function()
+ {
+ prompt(twiki('---++ Capitalization
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello to this World into the green textedit field | Hello to this World is shown |
+| Press the All Upper button | The text is converted to all upper case |
+| Press the All Lower button | The text is converted to all lower case |
+| Press the Small Caps button | The text is converted to all small sized upper case characters |
+| Press the Capitalize button | The text is shown with each first character of every word capitalized | '));
+ }
+
+}
diff --git a/tests/system/declarative/sys_textinput/sys_textinput.pro b/tests/system/declarative/sys_textinput/sys_textinput.pro
new file mode 100644
index 00000000..a11f8217
--- /dev/null
+++ b/tests/system/declarative/sys_textinput/sys_textinput.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_textinput.qtt
diff --git a/tests/system/declarative/sys_textinput/sys_textinput.qtt b/tests/system/declarative/sys_textinput/sys_textinput.qtt
new file mode 100644
index 00000000..fc31519a
--- /dev/null
+++ b/tests/system/declarative/sys_textinput/sys_textinput.qtt
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ select_text: function()
+ {
+ prompt(twiki('---++ Text Selection
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Select Word button | World is selected |
+| Press the Select All button | Hello World is selected |
+| Press the Select None button | No text is selected |
+| Press the Mouse Select button | The button turns green and indicates Mouse On |
+| Click and drag over some text | Only that text is selected. On sans-keyboard Symbian, the soft keyboard will show with selected text highlighted |
+| Press the Mouse Select button | The button turns gray and indicates Mouse Off |
+| Click and drag over some text | No text is selected. On sans-keyboard Symbian, the soft keyboard will show |
+'));
+ },
+
+ cut_copy_and_paste: function()
+ {
+ prompt(twiki('---++ Cut, copy and paste
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Select All button | Hello World is selected |
+| Press the Copy Button | |
+| Press the Paste Button | Hello World is copied to the light-blue textinput |
+| Press the Select Word button | World is highlighted |
+| Press the Cut button | World is removed from the green textinput |
+| Press the Paste button | World is added to the light-blue textinput |
+'));
+ },
+
+ password_echo_mode: function()
+ {
+ prompt(twiki('---++ Password Echo
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Password button | Hello World is now a string of asterisks |
+| Enter an exclamation mark | An asterisk is added to the string |
+| Press the No Echo button | No text is visible |
+| Enter an exclamation mark | No text is shown |
+| Press the Password Edit button | A string of asterisks is shown |
+| Enter an exclamation mark | An exclamation mark appears at the end of the asterisks, but shortly becomes an asterisk |
+| Press the Normal button | Hello World!!! is now displayed |
+'));
+ },
+
+ styling: function()
+ {
+ prompt(twiki('---++ Text Styling
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Bold button | Hello World is now in bold |
+| Press the Italics button | Hello World is now in italics |
+| Press the Strikeout button | Hello World now has a line passing through it |
+| Press the Underline button | Hello World is now underlined | '));
+ },
+
+ cursor_behavior: function()
+ {
+ prompt(twiki('---++ Cursor Behavior
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter enough text into the field such that it passes beyond the far right | The first half of the text is shown |
+| Press the Autoscroll button | The far right edge shows the last character of the text |
+| Enter some more text | The TextInput scrolls the text so that the last character is always visible |
+| Move the cursor to the left of the input field | |
+| Move a couple of characters further to the left | Scrolling follows the cursor |
+| Press the Autoscroll button | The text is shown from the start |
+| Press the Cursor button as to disable it | The cursor disappears |
+| Press the Cursor button as to enable it | The cursor appears | '));
+ },
+
+ capitalization: function()
+ {
+ prompt(twiki('---++ Capitalization
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello to this World into the green textinput field | Hello to this World is shown |
+| Press the All Upper button | The text is converted to all upper case |
+| Press the All Lower button | The text is converted to all lower case |
+| Press the Small Caps button | The text is converted to all small sized upper case characters |
+| Press the Capitalize button | The text is shown with each first character of every word capitalized | '));
+ }
+
+}
diff --git a/tests/system/declarative/sys_twitter/sys_twitter.pro b/tests/system/declarative/sys_twitter/sys_twitter.pro
new file mode 100644
index 00000000..96f61f08
--- /dev/null
+++ b/tests/system/declarative/sys_twitter/sys_twitter.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_twitter.qtt
diff --git a/tests/system/declarative/sys_twitter/sys_twitter.qtt b/tests/system/declarative/sys_twitter/sys_twitter.qtt
new file mode 100644
index 00000000..0b079912
--- /dev/null
+++ b/tests/system/declarative/sys_twitter/sys_twitter.qtt
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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=demos/twitter
+
+testcase = {
+
+ qtxmlbat9205: function() {
+ prompt(twiki('---+++ QTQMLBAT9205 - Twitter demo
+
+ | *Step* | *Verification* |
+ | Execute the demos/declarative/twitter/twitter.qml | Verify that the Twitter application starts smoothly |
+ | Either enter you Twitter credentials or click [Guest] | Verify that Twitter opens up as expected |
+ | Scroll down the list of tweets | Verify that the list scrolls smoothly as expected |
+ | Click the [Ellipsis] icon and enter a search term | Verify that the latest tweets from the searched twitter are displayed |
+ | Click [Return Home] | Verify that you are taken to the main twitter display screen |
+ | Click [Update] | Verify that the list of twitts has updated|
+ | Click on a Twitters handle | Verify that twitts from that twitter are displayed |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro b/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro
new file mode 100644
index 00000000..958bd0c6
--- /dev/null
+++ b/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_webbrowser.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt b/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt
new file mode 100644
index 00000000..8f24de6e
--- /dev/null
+++ b/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module 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$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ web1: function()
+ {
+ startApplication("qmlviewer", ["$QT_SRC_DIR/demos/declarative/webbrowser/webbrowser.qml"]);
+ print(getenv("QT_SRC_DIR"));
+ if(getenv("QT_SRC_DIR") == "") {
+ skip("Please set environment variable QT_SRC_DIR to source root", SkipAll);
+ }
+ var url = findWidget( { qmlType: "TextInput" } );
+ var title = findWidget( { qmlType: "Text" } )[0];
+ var web = findWidget( { qmlType: "WebView" } );
+ expect(function(){ return getProperty(web, "progress") == 1 }, 5000, 1, "Page not loaded in time");
+ enter("http://www.google.com", url);
+ expect(function(){ return getProperty(web, "progress") == 1 }, 5000, 1, "Page not loaded in time");
+ }
+}
+