/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** 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, Digia gives you certain additional ** rights. These rights are described in the Digia 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. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ //TESTED_COMPONENT=src/feedback testcase = { initTestCase: function() { testcase.qtuitest_platform = getLocalEnv("TESTPLATFORM"); if (!checkPlatform(testcase.qtuitest_platform)){ fail("TESTPLATFORM "+ testcase.qtuitest_platform +" not valid"); } if (testcase.platform == "linux" || testcase.platform == "mac") { testcase.platform = "unix"; } }, /* comment as it reduplicate with simple_vibrate_test in sys_feedback.qtt file user_interface_response : function() { // Test meta data testTitle = "Tactilefeedback - User interface response"; testBinary = "hapticsquare"; testSource = "$MOBILITYDIR/examples/hapticsquare"; testGoal = "Verify that all interfaces' response are correctly"; testPreconditions = "None"; testGroups = " "; testRequirements = "" // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | App launches normally | | select *Click* tab | Verify the device emits a short, light vibe | | select *Rumble* tab | Verify the device emits a long vibe that increases in intensity | ")); }, */ gameplay_feedback: function() { // Test meta data testTitle = "Feedback - Gameplay feedback"; testBinary = ""; testSource = ""; testGoal = ""; testPreconditions = "None"; testGroups = " "; testRequirements = "" skip('Not implement yet', SkipAll); //prompt("Verify the QML snake game vibrates the device slightly when consuming yellow points."); } } function checkPlatform(platform) { if (platform == undefined){ return false; } if (platform.contains("S60") || platform.contains("Symbian")) { testcase.platform = "symbian"; return true; } else if (platform.contains("maemo")) { testcase.platform = "maemo"; } else if (platform.contains("linux") || platform.contains("mac")) { testcase.platform = "unix"; return true; } else if (platform.contains("windows")) { testcase.platform = "windows"; return true; } else if (platform.contains("wince")) { testcase.platform = "wince"; return true; } return false; } function getLocalEnv(name) { var env = QProcess.systemEnvironment(); var re = new RegExp("^" + name + "=(.*)$"); for (var i=0; i