diff options
author | Toby Tomkins <toby.tomkins@nokia.com> | 2011-07-12 01:24:20 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2011-07-12 01:24:20 (GMT) |
commit | 4bccdd4861f8290ca79f98694afcbf38aad1aee0 (patch) | |
tree | f7b607cde90c3d4dd7f403320f1185a780e7e6d4 /tests/system | |
parent | 296f64a839a6af458a98d36da4836cab1d5cbb8e (diff) | |
download | Qt-4bccdd4861f8290ca79f98694afcbf38aad1aee0.zip Qt-4bccdd4861f8290ca79f98694afcbf38aad1aee0.tar.gz Qt-4bccdd4861f8290ca79f98694afcbf38aad1aee0.tar.bz2 |
Add system tests from research:systemtests repository.
Diffstat (limited to 'tests/system')
44 files changed, 1698 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 0000000..0ce2973 --- /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 0000000..17fb7e1 --- /dev/null +++ b/tests/system/declarative/sys_calculator/sys_calculator.qtt @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..6840b59 --- /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 0000000..0865e63 --- /dev/null +++ b/tests/system/declarative/sys_dial/sys_dial.qtt @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..df7bd6f --- /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 0000000..da02775 --- /dev/null +++ b/tests/system/declarative/sys_flickr/sys_flickr.qtt @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..f37fc7f --- /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 0000000..53a5426 --- /dev/null +++ b/tests/system/declarative/sys_parallax/sys_parallax.qtt @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..0aed02e --- /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 0000000..7f12c17 --- /dev/null +++ b/tests/system/declarative/sys_pincharea/sys_pincharea.qtt @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** 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 QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..1837d72 --- /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 0000000..43bb38f --- /dev/null +++ b/tests/system/declarative/sys_rtl/sys_rtl.qtt @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** 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 QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..495a843 --- /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 0000000..607b667 --- /dev/null +++ b/tests/system/declarative/sys_samegame/sys_samegame.qtt @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..30d6d5b --- /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 0000000..4ca41fe --- /dev/null +++ b/tests/system/declarative/sys_textedit/sys_textedit.qtt @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** 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 QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..a11f821 --- /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 0000000..8a6af73 --- /dev/null +++ b/tests/system/declarative/sys_textinput/sys_textinput.qtt @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** 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 QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..96f61f0 --- /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 0000000..e8fbec5 --- /dev/null +++ b/tests/system/declarative/sys_twitter/sys_twitter.qtt @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 0000000..958bd0c --- /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 0000000..21fc7d0 --- /dev/null +++ b/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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"); + } +} + diff --git a/tests/system/sys_addressbook/sys_addressbook.pro b/tests/system/sys_addressbook/sys_addressbook.pro new file mode 100644 index 0000000..ba86106 --- /dev/null +++ b/tests/system/sys_addressbook/sys_addressbook.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_addressbook.qtt diff --git a/tests/system/sys_addressbook/sys_addressbook.qtt b/tests/system/sys_addressbook/sys_addressbook.qtt new file mode 100644 index 0000000..24306d7 --- /dev/null +++ b/tests/system/sys_addressbook/sys_addressbook.qtt @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // addressbook + // if the contact name is not at between A~Z or (a~z),which Tab it will in? + test_addressbook:function(contact_name,contact_address,tabname) { + startApplication("$QTDIR/examples/itemviews/addressbook/addressbook"); + select("Add"); + + enter(contact_name, "Name"); + compare(getText("Name"), contact_name); + enter(contact_address, "Address"); + compare( getText("Address"), contact_address); + + select("OK"); + + select(tabname, tabBar()); + var table = findByProperty({inherits: "QAbstractTableModel"}); + selectIndex([0,0],table); + compare(getSelectedText(table), contact_name); + selectIndex([0,1],table); + compare(getSelectedText(table), contact_address); + }, + test_addressbook_data: { + contact1: ["AAA", "bbb", "ABC"], + contact2: ["EEE", "fff", "DEF"] + } +} diff --git a/tests/system/sys_analogclock/sys_analogclock.pro b/tests/system/sys_analogclock/sys_analogclock.pro new file mode 100644 index 0000000..a124cb7 --- /dev/null +++ b/tests/system/sys_analogclock/sys_analogclock.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_analogclock.qtt diff --git a/tests/system/sys_analogclock/sys_analogclock.qtt b/tests/system/sys_analogclock/sys_analogclock.qtt new file mode 100644 index 0000000..b9637a0 --- /dev/null +++ b/tests/system/sys_analogclock/sys_analogclock.qtt @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // analogclock + test_analogclock: function() { + startApplication("$QTDIR/examples/widgets/analogclock/analogclock"); + verifyImage("analogclock_1"); + // wait for the screensaver + wait(6000); + verifyImage("analogclock_2"); + } +} diff --git a/tests/system/sys_animatedtiles/sys_animatedtiles.pro b/tests/system/sys_animatedtiles/sys_animatedtiles.pro new file mode 100644 index 0000000..3efa4e0 --- /dev/null +++ b/tests/system/sys_animatedtiles/sys_animatedtiles.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_animatedtiles.qtt diff --git a/tests/system/sys_animatedtiles/sys_animatedtiles.qtt b/tests/system/sys_animatedtiles/sys_animatedtiles.qtt new file mode 100644 index 0000000..94b50d7 --- /dev/null +++ b/tests/system/sys_animatedtiles/sys_animatedtiles.qtt @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // verifyImage() *is* useful here, as the images should match on subsequent test runs + + test_animatedtiles: function() { + + startApplication("$QTDIR/examples/animation/animatedtiles/animatedtiles"); + var buttons = findWidget( { className: "Button" } ); + var ellipse = buttons[0]; + var figure8 = buttons[1]; + var random = buttons[2]; + var tiled = buttons[3]; + var center = buttons[4]; + + mouseClick(ellipse); + wait(3000); + verifyImage("animatedtiles_ellipse"); + mouseClick(figure8); + wait(3000); + verifyImage("animatedtiles_figure8"); + mouseClick(random); + wait(3000); + verifyImage("animatedtiles_random"); + mouseClick(tiled); + wait(3000); + verifyImage("animatedtiles_tiled"); + mouseClick(center); + wait(3000); + verifyImage("animatedtiles_centered"); + } +} diff --git a/tests/system/sys_anomaly/sys_anomaly.pro b/tests/system/sys_anomaly/sys_anomaly.pro new file mode 100644 index 0000000..99f9b9d --- /dev/null +++ b/tests/system/sys_anomaly/sys_anomaly.pro @@ -0,0 +1,2 @@ +SOURCES=sys_anomaly.qtt +CONFIG+=systemtest diff --git a/tests/system/sys_anomaly/sys_anomaly.qtt b/tests/system/sys_anomaly/sys_anomaly.qtt new file mode 100644 index 0000000..b1b34c4 --- /dev/null +++ b/tests/system/sys_anomaly/sys_anomaly.qtt @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // anomaly + test_anomaly: function() { + + startApplication("$QTDIR/demos/embedded/anomaly/anomaly"); + + var lineEdit = findWidget( {className: "QLineEdit"} ); + enter("qt.nokia.com", lineEdit); + select("Go"); + var browserView = findWidget( {className: "BrowserView"} ); + var web = findWidget( { inherits: "QWebView" } ); + waitFor(20000) { return getProperty(web, "progress") == 1; } + var back = backButton(); + + var zoomIn = zoomInButton(); + var zoomOut = zoomOutButton(); + + //zoom in + mouseClick(zoomIn); + wait(2000); + mouseClick(zoomIn); + wait(2000); + + //zoom out + mouseClick(zoomOut); + wait(2000); + + select("Introducing the Qt Board Verification Program",web); + waitFor(20000) { return getProperty(web, "progress") == 1; } + wait(1000); + mouseClick(back); + waitFor(20000) { return getProperty(web, "progress") == 1; } + select("Official News",web); + waitFor(20000) { return getProperty(web, "progress") == 1; } + verify(getProperty(web, "title").contains("News")); + wait(1000); + mouseClick(back); + waitFor(20000) { return getProperty(web, "progress") == 1; } + select("Downloads",web); + waitFor(20000) { return getProperty(web, "progress") == 1; } + verify(getProperty(web, "title").contains("Downloads")); + wait(1000); + mouseClick(back); + waitFor(20000) { return getProperty(web, "progress") == 1; } + } +} diff --git a/tests/system/sys_collidingmice/sys_collidingmice.pro b/tests/system/sys_collidingmice/sys_collidingmice.pro new file mode 100644 index 0000000..dff65ca --- /dev/null +++ b/tests/system/sys_collidingmice/sys_collidingmice.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_collidingmice.qtt diff --git a/tests/system/sys_collidingmice/sys_collidingmice.qtt b/tests/system/sys_collidingmice/sys_collidingmice.qtt new file mode 100644 index 0000000..0932d62 --- /dev/null +++ b/tests/system/sys_collidingmice/sys_collidingmice.qtt @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // collidingmice + test_collidingmice: function() { + + startApplication("$QTDIR/examples/graphicsview/collidingmice/collidingmice"); + verifyImage("collidingmice_1"); + wait(500); + verifyImage("collidingmice_2"); + wait(500); + verifyImage("collidingmice_3"); + wait(500); + verifyImage("collidingmice_4"); + + } +} diff --git a/tests/system/sys_imagegestures/sys_imagegestures.pro b/tests/system/sys_imagegestures/sys_imagegestures.pro new file mode 100644 index 0000000..640803d --- /dev/null +++ b/tests/system/sys_imagegestures/sys_imagegestures.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_imagegestures.qtt diff --git a/tests/system/sys_imagegestures/sys_imagegestures.qtt b/tests/system/sys_imagegestures/sys_imagegestures.qtt new file mode 100644 index 0000000..b063233 --- /dev/null +++ b/tests/system/sys_imagegestures/sys_imagegestures.qtt @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // imagegestures + // ?? QtUiTest should support these gestures: swipe, pan and pinch.?? + // ?? How to press the minimize button, maximize button and close button in QtUiTest? + + test_imagegestures: function() { + + startApplication("imagegestures"); + verifyImage("imagegestures_1"); + + select("Choose"); + wait(6000); + } +} diff --git a/tests/system/sys_masterdetail/sys_masterdetail.pro b/tests/system/sys_masterdetail/sys_masterdetail.pro new file mode 100644 index 0000000..792a3ce --- /dev/null +++ b/tests/system/sys_masterdetail/sys_masterdetail.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_masterdetail.qtt diff --git a/tests/system/sys_masterdetail/sys_masterdetail.qtt b/tests/system/sys_masterdetail/sys_masterdetail.qtt new file mode 100644 index 0000000..729fd60 --- /dev/null +++ b/tests/system/sys_masterdetail/sys_masterdetail.qtt @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // ?? How to select image?? + // ?? How to compare image?? + test_masterdetail: function() { + + startApplication("$QTDIR/examples/sql/masterdetail/masterdetail"); + // need to verifyImage + verifyImage("masterdetail_1"); + + //select an art form artilst + var artist = findWidget({className: "QComboBox"}); + select("Ane Brun",artist); + //print(getLabels()); + verify(getLabels().join().contains("Details/Artist : Ane Brun")); + verify(getLabels().join().contains("Number of Albums: 2")); + + verifyImage("masterdetail_2"); + + // choose the albums, please see the chages in the datails. + var album = findWidget({className: "QTableView"}); + select("Spending Time With Morgan",album); + //print(getLabels()); + verify(getLabels().join().contains("Details/Title: Spending Time With Morgan (2003)")); + verifyImage("masterdetail_3"); + + select("A Temporary Dive",album); + //print(getLabels()); + verify(getLabels().join().contains("Details/Title: A Temporary Dive (2005)")); + verifyImage("masterdetail_4"); + } +} diff --git a/tests/system/sys_previewer/sys_previewer.pro b/tests/system/sys_previewer/sys_previewer.pro new file mode 100644 index 0000000..39850e7 --- /dev/null +++ b/tests/system/sys_previewer/sys_previewer.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_previewer.qtt diff --git a/tests/system/sys_previewer/sys_previewer.qtt b/tests/system/sys_previewer/sys_previewer.qtt new file mode 100644 index 0000000..66c401e --- /dev/null +++ b/tests/system/sys_previewer/sys_previewer.qtt @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // previewer + test_previewer: function() { + startApplication("$QTDIR/examples/webkit/previewer/previewer"); + verifyImage("previewer_1"); + + //get editor + var editor = findWidget({className: "QPlainTextEdit"}); + + //get previewer + var previewer = findWidget({className: "QWebView"}); + + prompt(getText(editor)); + prompt(getText(previewer)); + + select("Clear"); + select("Preview"); + verifyImage("previewer_2"); + } +} diff --git a/tests/system/sys_qftp/sys_qftp.pro b/tests/system/sys_qftp/sys_qftp.pro new file mode 100644 index 0000000..00d6cc7 --- /dev/null +++ b/tests/system/sys_qftp/sys_qftp.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_qftp.qtt diff --git a/tests/system/sys_qftp/sys_qftp.qtt b/tests/system/sys_qftp/sys_qftp.qtt new file mode 100644 index 0000000..68d9551 --- /dev/null +++ b/tests/system/sys_qftp/sys_qftp.qtt @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // qftp + test_qftp: function() { + startApplication("$QTDIR/examples/network/qftp/qftp"); + + select("Connect"); + + //wait for connection to server + waitFor() { return getLabels().contains("Logged onto ftp.qt.nokia.com."); } + + //select a file robots.txt + var fileList = findWidget( {inherits: "QTreeWidget"} ); + waitFor() { return getList(fileList).contains("robots.txt"); } + + select("robots.txt", fileList); + select("Download"); + + var messageBox = findByProperty({inherits: "QMessageBox"}); + var progressDialog = findByProperty({inherits: "QProgressDialog"}); + + if(isVisible(messageBox) && progressDialog.length == 0) + { + select("OK"); + print("The file exists."); + } else { + waitFor() { return getLabels().contains("Downloaded robots.txt to current directory."); } + } + } +} diff --git a/tests/system/sys_svgviewer/sys_svgviewer.pro b/tests/system/sys_svgviewer/sys_svgviewer.pro new file mode 100644 index 0000000..95bb0ca --- /dev/null +++ b/tests/system/sys_svgviewer/sys_svgviewer.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_svgviewer.qtt diff --git a/tests/system/sys_svgviewer/sys_svgviewer.qtt b/tests/system/sys_svgviewer/sys_svgviewer.qtt new file mode 100644 index 0000000..0fb28f3 --- /dev/null +++ b/tests/system/sys_svgviewer/sys_svgviewer.qtt @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // svgviewer + test_svgviewer: function() { + + startApplication("$QTDIR/examples/painting/svgviewer/svgviewer"); + verifyImage("svgviewer_1"); + + //select menu + select("Renderer/Image",menuBar()); + // select("Image"); + verifyImage("svgviewer_2"); + } +} diff --git a/tests/system/sys_wiggly/sys_wiggly.pro b/tests/system/sys_wiggly/sys_wiggly.pro new file mode 100644 index 0000000..9481a83 --- /dev/null +++ b/tests/system/sys_wiggly/sys_wiggly.pro @@ -0,0 +1,2 @@ +CONFIG+=systemtest +SOURCES=sys_wiggly.qtt diff --git a/tests/system/sys_wiggly/sys_wiggly.qtt b/tests/system/sys_wiggly/sys_wiggly.qtt new file mode 100644 index 0000000..391b5fe --- /dev/null +++ b/tests/system/sys_wiggly/sys_wiggly.qtt @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of QtUiTest. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +testcase = { + + // wiggly + // ?? How to compare the text which we input in the lineEdit and the animated text in the wigglywidget ?? + test_wiggly: function(text) { + + startApplication("$QTDIR/examples/widgets/wiggly/wiggly"); + verifyImage("wiggly_1"); + + var lineEdit = findWidget({classname: "QLineEdit"}); + enter(text,lineEdit); + compare(getSelectedText(lineEdit), text); + verifyImage("wiggly_2"); + wait(1000); + verifyImage("wiggly_3"); + }, + test_wiggly_data:{ + text1: ["hello Qt"], + text2: ["a#b %c^defghighllahdal^^$^"] + }, +} |