on xenial help sign in
add a QML test to verify pressing the PrtScr keyboard shortcut
commit86a756f8f818323082d8dd7680584398e9fb61d3 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 17 Jul 2015, 12:57 (11 years ago) parent9216c20
1 file changed+5
tests/qmltests/Components/tst_PhysicalKeysMapper.qml+5
tests/qmltests/Components/tst_PhysicalKeysMapper.qml+5
@@ -89,6 +89,11 @@ TestCase {
8989 compare(powerSpy.count, 1);
9090 }
9191
92+ function test_screenshotPrtScr() {
93+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_Print })
94+ tryCompare(screenshotSpy, "count", 1) // verify the screenshotTriggered signal has been called, exactly once
95+ }
96+
9297 function test_screenshotButtons_data() {
9398 return [
9499 { tag: "UpFirst", first: Qt.Key_VolumeUp, second: Qt.Key_VolumeDown },