From 622c9b5cf6069b10d6bbb45cd036e26b760e527a Mon Sep 17 00:00:00 2001 From: Maciej Kisielewski Date: Tue, 3 Sep 2019 10:41:44 +0200 Subject: change palm-rejection test to user-itneract Signed-off-by: Maciej Kisielewski --- data/palm_rejection.qml | 19 +++++++------------ units/touchpad/jobs.pxu | 13 ++++++++----- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/data/palm_rejection.qml b/data/palm_rejection.qml index 3f93f2a..429f8d8 100644 --- a/data/palm_rejection.qml +++ b/data/palm_rejection.qml @@ -1,7 +1,7 @@ /* * This file is part of Checkbox. * - * Copyright 2018 Canonical Ltd. + * Copyright 2018-2019 Canonical Ltd. * Written by: * Maciej Kisielewski * @@ -20,9 +20,8 @@ import QtQuick 2.5 import QtQuick.Layouts 1.2 import QtQuick.Controls 1.4 -import Plainbox 1.0 -QmlJob { +Item { property var steps: [ ['images/palm-rejection-1.jpg', 2000], ['images/palm-rejection-2.jpg', 500], @@ -61,21 +60,17 @@ QmlJob { text: 'Pass' Layout.fillHeight: true Layout.fillWidth: true - onClicked: testDone({'outcome': 'pass'}) - } - Button { - text: 'Skip' - Layout.fillHeight: true - Layout.fillWidth: true - onClicked: testDone({'outcome': 'skip'}) + onClicked: { + console.log('PASS') + Qt.quit() + } } Button { text: 'Fail' Layout.fillHeight: true Layout.fillWidth: true - onClicked: testDone({'outcome': 'fail'}) + onClicked: Qt.quit() } - } } Timer { diff --git a/units/touchpad/jobs.pxu b/units/touchpad/jobs.pxu index 2fba8ad..a7b7e35 100644 --- a/units/touchpad/jobs.pxu +++ b/units/touchpad/jobs.pxu @@ -219,14 +219,17 @@ _siblings: [{ "id": "touchpad/continuous-move-after-suspend", "depends": "suspend/suspend_advanced touchpad/continuous-move" }] -plugin: qml -category_id: com.canonical.plainbox::touchpad id: touchpad/palm-rejection -requires: dmi.product in ['Notebook','Laptop','Portable','Convertible'] -estimated_duration: 20 +plugin: user-interact +category_id: com.canonical.plainbox::touchpad +command: qmlscene -qt5 --fullscreen $PLAINBOX_PROVIDER_DATA/palm_rejection.qml 2>&1 | grep -o PASS _purpose: This test checks if touchpad ignores palm touches -qml_file: palm_rejection.qml +_steps: + Select "Test" and follow the instruction on the screen +_verification: + Cursor should not have moved. _siblings: [{ "id": "touchpad/palm-rejection-after-suspend", "depends": "suspend/suspend_advanced touchpad/palm-rejection" }] +estimated_duration: 40 -- cgit v1.2.3