plugin: shell
id: touchscreen/nontouch-automated
requires:
  xinput.device_class == 'XITouchClass' and xinput.touch_mode != 'direct'
command: true
estimated_duration: 1.2
_description:
 Determine whether the screen is detected as a non-touch device automatically.

plugin: shell
id: touchscreen/multitouch-automated
requires:
  xinput.device_class == 'XITouchClass' and xinput.touch_mode == 'direct'
command: true
estimated_duration: 1.2
_description:
 Determine whether the screen is detected as a multitouch device automatically.

plugin: manual
id: touchscreen/multitouch-manual
depends: touchscreen/nontouch-automated
estimated_duration: 120.0
_description:
 PURPOSE:
     Touchscreen manual detection of multitouch.
 STEPS:
     1. Look at the specifications for your system.
 VERIFICATION:
     Is the screen supposed to be multitouch?

plugin: manual
id: touchscreen/tap-detect
depends: touchscreen/multitouch-automated
estimated_duration: 120.0
_description:
 PURPOSE:
     Check touchscreen tap recognition
 STEPS:
     1. Tap an object on the screen with finger. The cursor should jump to location tapped and object should highlight
 VERIFICATION:
     Does tap recognition work?

plugin: manual
id: touchscreen/drag-n-drop
depends: touchscreen/multitouch-automated
estimated_duration: 120.0
_description:
 PURPOSE:
     Check touchscreen drag & drop
 STEPS:
     1. Tap and hold an object on the desktop
     2. Drag and drop the object in a different location
 VERIFICATION:
     Does drag and drop work?

plugin: user-interact-verify
id: touchscreen/multitouch-zoom
_summary: Check touchscreen pinch gesture for zoom
depends: touchscreen/multitouch-automated
command: qmlscene $PLAINBOX_PROVIDER_DATA/touch_zoom_test.qml 2>&1 |grep -o PASS
estimated_duration: 120.0
_description:
 PURPOSE:
     Check touchscreen pinch gesture for zoom
 STEPS:
     1. Press the Test button
     2. Using 2 fingers, resize the blue square until it turns green, then release it.
 VERIFICATION:
     Did the blue square change size following the gesture?

plugin: user-interact-verify
id: touchscreen/multitouch-rotate
_summary: Check touchscreen pinch gesture for rotate
depends: touchscreen/multitouch-automated
command: qmlscene $PLAINBOX_PROVIDER_DATA/touch_rotate_test.qml 2>&1 |grep -o PASS
estimated_duration: 120.0
_description:
 PURPOSE:
     Check touchscreen pinch gesture for rotate
 STEPS:
     1. Press the Test button
     2. Using 2 fingers, rotate the blue square until it turns green, then release it.
 VERIFICATION:
     Did the blue square rotate following the gesture?

plugin: manual
id: touchscreen/multitouch-window-move
depends: touchscreen/multitouch-automated
estimated_duration: 120.0
_description:
 PURPOSE:
     Validate that 3-touch drag is operating as expected
 STEPS:
     1. Open a windows and bring it to the foreground
     2. 3-touch the window and drag
 VERIFICATION:
     Did the window move along with the drag?

plugin: manual
id: touchscreen/multitouch-dash
depends: touchscreen/multitouch-automated
estimated_duration: 120.0
_description:
 PURPOSE:
     Validate that 4-touch tap is operating as expected
 STEPS:
     1. 4-touch tap anywhere on the touchscreen
 VERIFICATION:
     Did the tap open the Dash?

plugin: user-interact-verify
id: touchscreen/3-touch-tap
depends: touchscreen/multitouch-automated
estimated_duration: 15.0
_description:
 PURPOSE:
     Validate that 3-touch tap is operating as expected
 STEPS:
     1. Tap the screen with 3 fingers simultaneously.
     2. Once 3 fingers are on the screen you should see the indicator they are recognized.
 VERIFICATION:
     Did you see the green circles around the three fingers?
command:
    manage_compiz_plugin unityshell disable
    qmlscene $PLAINBOX_PROVIDER_DATA/touch_tap_test.qml --touchpoints=3 2>&1 | grep -o PASS
    EXIT=$?
    manage_compiz_plugin unityshell enable
    exit $EXIT

plugin: user-interact-verify
id: touchscreen/4-touch-tap
depends: touchscreen/multitouch-automated
estimated_duration: 15.0
_description:
 PURPOSE:
     Validate that 4-touch tap is operating as expected
 STEPS:
     1. Tap the screen with 4 fingers simultaneously.
     2. Once 4 fingers are on the screen you should see the indicator they are recognized.
 VERIFICATION:
     Did you see the green circles around the four fingers?
command:
    manage_compiz_plugin unityshell disable
    qmlscene $PLAINBOX_PROVIDER_DATA/touch_tap_test.qml --touchpoints=4 2>&1 | grep -o PASS
    EXIT=$?
    manage_compiz_plugin unityshell enable
    exit $EXIT
