aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_checkbox.qml
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-04-30 16:51:49 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-05-04 10:49:01 +0000
commit029d119f4c0e13afbcbd5a0724af7d158acaf8e2 (patch)
tree2f9b8fd13b61c4a462dca8422807bb021a2e5bc4 /tests/auto/controls/data/tst_checkbox.qml
parent0d3c6767c1117980f48edbd3f4737a8f37471a8f (diff)
ControlSpy: Accept a list of signals to spy on
This API is cleaner than having to connect to each signal handler namually. We solve the 'pressed' signal problem by connecting to the other signal accessor, namely 'onPressed'. And we do so for all signals. We also lay foundation to capture the signal parameters as each signal is emitted. What we may do with those values is not clear yet. Auto-tests updated accordingly. Change-Id: Ieda96a43072ca7dff2b183e07f6f67aa49c8cf5d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_checkbox.qml')
-rw-r--r--tests/auto/controls/data/tst_checkbox.qml10
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml
index 734f5464..e3414595 100644
--- a/tests/auto/controls/data/tst_checkbox.qml
+++ b/tests/auto/controls/data/tst_checkbox.qml
@@ -56,16 +56,9 @@ TestCase {
id: control
property ControlSpy spy: ControlSpy {
- id: spy
target: control
+ signals: ["pressed", "released", "canceled", "clicked", "pressedChanged", "checkedChanged"]
}
-
- onPressed: spy.checkSignal("pressed")
- onReleased: spy.checkSignal("released")
- onCanceled: spy.checkSignal("canceled")
- onClicked: spy.checkSignal("clicked")
- onPressedChanged: spy.checkSignal("pressedChanged")
- onCheckedChanged: spy.checkSignal("checkedChanged")
}
}
@@ -147,7 +140,6 @@ TestCase {
function test_mouse() {
var control = checkBox.createObject(testCase)
-
// check
control.spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }],
"pressed"]