diff options
Diffstat (limited to 'tests/remote')
-rw-r--r-- | tests/remote/AssistantTest.qml | 76 | ||||
-rw-r--r-- | tests/remote/QstObjectApiTests.qml | 54 | ||||
-rw-r--r-- | tests/remote/RemoteApiTests.qml | 61 | ||||
-rw-r--r-- | tests/remote/RunProcessTests.qml | 51 | ||||
-rw-r--r-- | tests/remote/TestAppWidgetTest.qml | 68 | ||||
-rw-r--r-- | tests/remote/common/ApplicationTest.qml | 68 | ||||
-rw-r--r-- | tests/remote/qstobject/InheritanceBasedItemHandlerTest.qml | 75 | ||||
-rw-r--r-- | tests/remote/qstobject/ItemPropertyTest.qml | 60 | ||||
-rw-r--r-- | tests/remote/qstobject/MyQLineEdit.qml | 49 | ||||
-rw-r--r-- | tests/remote/qstobject/ParentApiTest.qml | 62 | ||||
-rw-r--r-- | tests/remote/qstobject/QstObjectApiTests.qml | 63 | ||||
-rw-r--r-- | tests/remote/runProcess/RunCommandTest.qml | 61 |
12 files changed, 748 insertions, 0 deletions
diff --git a/tests/remote/AssistantTest.qml b/tests/remote/AssistantTest.qml new file mode 100644 index 0000000..87e0733 --- /dev/null +++ b/tests/remote/AssistantTest.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import 'common' + +ApplicationTest { + name: 'Assistant test' + executableName: 'assistant' + + function run() { + var i, + zoomIn = app.item( { toolTip: "Zoom in"} ), + zoomOut = app.item( { toolTip: "Zoom out"} ); + + app.mouseClick(zoomIn, Qt.RightButton); + sleep(1000); + + for (i=0; i<10; i++) { + app.mouseClick(zoomIn); + } + + for (i=0; i<10; i++) { + app.mouseClick(zoomOut); + } + + app.keyPress(Qt.Key_H); + app.keyPress(Qt.Key_E); + app.keyPress(Qt.Key_L); + app.keyPress(Qt.Key_L); + app.keyPress(Qt.Key_O); + + var p = Qt.point(200,300); + app.mouseClick(p); + sleep(1000); + } +} diff --git a/tests/remote/QstObjectApiTests.qml b/tests/remote/QstObjectApiTests.qml new file mode 100644 index 0000000..e04f1b6 --- /dev/null +++ b/tests/remote/QstObjectApiTests.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 + +import "qstobject" + +TestCollection { + name: 'QstObject api tests'; description: name + + ItemPropertyTest{} + ParentApiTest{} + InheritanceBasedItemHandlerTest{} +} + diff --git a/tests/remote/RemoteApiTests.qml b/tests/remote/RemoteApiTests.qml new file mode 100644 index 0000000..84cb71e --- /dev/null +++ b/tests/remote/RemoteApiTests.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import 'common' + +TestCollection { + name: 'Remote component Test'; description: name + + ApplicationTest { + name: 'Same Application object test'; description: name + executableName: 'testapp_widgets' + + function run() { + var currentApp = remote.currentApplication(); + expect(currentApp.toString()).toBe(app.toString()); + expect(currentApp).toBe(app); + } + } + +} + diff --git a/tests/remote/RunProcessTests.qml b/tests/remote/RunProcessTests.qml new file mode 100644 index 0000000..c85ad8f --- /dev/null +++ b/tests/remote/RunProcessTests.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 + +import "runProcess" + +TestCollection { + name: 'runProcess tests'; description: name + + RunCommandTest{} +} diff --git a/tests/remote/TestAppWidgetTest.qml b/tests/remote/TestAppWidgetTest.qml new file mode 100644 index 0000000..3cf62ee --- /dev/null +++ b/tests/remote/TestAppWidgetTest.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import 'common' + +ApplicationTest { + name: 'testwidget tests' + executableName: 'testapp_widgets' + + function run() { + var textEdit = app.item({ + inherits: 'QLineEdit' + } ); + + expect(textEdit.property('text')).not.toBe(undefined); + expect(textEdit.property('text')).toBe(''); + app.mouseClick(textEdit); + + app.keyPress(Qt.Key_H); + app.keyPress(Qt.Key_E); + app.keyPress(Qt.Key_L); + app.keyPress(Qt.Key_L); + app.keyPress(Qt.Key_O); + + expect(textEdit.property('text')).toBe('hello'); + } + +} diff --git a/tests/remote/common/ApplicationTest.qml b/tests/remote/common/ApplicationTest.qml new file mode 100644 index 0000000..5af0acd --- /dev/null +++ b/tests/remote/common/ApplicationTest.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 + +Test { + name: ''; description: name + + property string executableName: '' + property Application app + property alias remote: host + + remotes: [ + Remote { + id: host + host: config.remotes.localhost.address + } + ] + + + function setup() { + expect(executableName).not.toBe(''); + app = host.startApplication(executableName); + } + + function cleanup() { + app.terminate(); + } +} diff --git a/tests/remote/qstobject/InheritanceBasedItemHandlerTest.qml b/tests/remote/qstobject/InheritanceBasedItemHandlerTest.qml new file mode 100644 index 0000000..83b1fd4 --- /dev/null +++ b/tests/remote/qstobject/InheritanceBasedItemHandlerTest.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import '../common' + +ApplicationTest { + name: 'parent api test' + executableName: 'testapp_widgets' + + function run() { + var textEdit = app.item({ + inherits: 'QLineEdit' + }); + + expect(textEdit.type()).toBe('QLineEdit'); + expect(textEdit.handles).toBe('QWidget'); + + core().ItemFactory.register('QLineEdit', 'MyQLineEdit.qml'); + + var sameTextEdit = app.item({ + inherits: 'QLineEdit' + }); + expect(sameTextEdit.type()).toBe('QLineEdit'); + expect(sameTextEdit.handles).toBe('QLineEdit'); + + core().ItemFactory.unregister('QLineEdit'); + var textEdit3 = app.item({ + text: '', + inherits: 'QLineEdit' + } ); + expect(textEdit3.type()).toBe('QLineEdit'); + expect(textEdit3.handles).toBe('QWidget'); + + } +} diff --git a/tests/remote/qstobject/ItemPropertyTest.qml b/tests/remote/qstobject/ItemPropertyTest.qml new file mode 100644 index 0000000..9022045 --- /dev/null +++ b/tests/remote/qstobject/ItemPropertyTest.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import '../common' + +ApplicationTest { + name: 'property setProperty test' + executableName: 'testapp_widgets' + + function run() { + var textEdit = app.item({ + text: '', + inherits: 'QLineEdit' + } ); + + expect(textEdit.property('text')).not.toBe(undefined); + textEdit.setProperty('text', 'Hello World'); + expect(textEdit.property('text')).toBe('Hello World'); + } +} diff --git a/tests/remote/qstobject/MyQLineEdit.qml b/tests/remote/qstobject/MyQLineEdit.qml new file mode 100644 index 0000000..ee1a299 --- /dev/null +++ b/tests/remote/qstobject/MyQLineEdit.qml @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 + +QstObject { + handles: 'QLineEdit' + function enter(text) { + } +} diff --git a/tests/remote/qstobject/ParentApiTest.qml b/tests/remote/qstobject/ParentApiTest.qml new file mode 100644 index 0000000..59e0008 --- /dev/null +++ b/tests/remote/qstobject/ParentApiTest.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 1.1 +import QtSystemTest 1.0 +import '../common' + +ApplicationTest { + name: 'parent api test' + executableName: 'testapp_widgets' + + function run() { + var textEdit = app.item({ + text: '', + inherits: 'QLineEdit' + } ); + expect(textEdit.type()).toBe('QLineEdit'); + + var parent = textEdit.parent(); + expect(parent).not.toBe(undefined); + expect(parent.__isQmlWrapper).toBe(true); + expect(parent.type()).not.toBe(undefined); + } +} diff --git a/tests/remote/qstobject/QstObjectApiTests.qml b/tests/remote/qstobject/QstObjectApiTests.qml new file mode 100644 index 0000000..9e42e15 --- /dev/null +++ b/tests/remote/qstobject/QstObjectApiTests.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtSystemTest 1.0 +import '../common' + +ApplicationTest { + name: 'parent api test' + executableName: 'testapp_widgets' + + function run() { + var textEdit = app.item({ + text: '', + inherits: 'QLineEdit' + } ); + expect(textEdit.type()).toBe('QLineEdit'); + + var parent = textEdit.parent(); + expect(parent).not.toBe(undefined); + expect(parent.__isQmlWrapper).toBe(true); + expect(parent.type()).not.toBe(undefined); + } +} + diff --git a/tests/remote/runProcess/RunCommandTest.qml b/tests/remote/runProcess/RunCommandTest.qml new file mode 100644 index 0000000..22f9f7e --- /dev/null +++ b/tests/remote/runProcess/RunCommandTest.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of QtSystemTest. +** +** $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$ +** +****************************************************************************/ + +import QtSystemTest 1.0 + +Test { + name: 'run ls'; description: name + + remotes: [ + Remote { + id: host + host: config.remotes.localhost.address + } + ] + + function run() { + var output = host.runProcess( { program: "/bin/ls", timeout: 1000 } ); + expect(output).not.toBe(undefined); + expect(output).not.toBe(null); + expect(output.length).not.toBe(0); + log(output); + } +} |