aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_abstractbutton.qml
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 13:51:20 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 13:55:22 +0200
commit6f617349cf865ca3a7befc0dd472b7c2510fc431 (patch)
tree37e70da54a7f3101b82551ccd98508f8d9d64330 /tests/auto/controls/data/tst_abstractbutton.qml
parent718e08392f34dc478ea010c08a4b9c77bb665dfc (diff)
parent8e2d1b1efe736760d27af17160f662454546b054 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
Diffstat (limited to 'tests/auto/controls/data/tst_abstractbutton.qml')
-rw-r--r--tests/auto/controls/data/tst_abstractbutton.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml
index 80155f69..ee26a6d6 100644
--- a/tests/auto/controls/data/tst_abstractbutton.qml
+++ b/tests/auto/controls/data/tst_abstractbutton.qml
@@ -599,7 +599,7 @@ TestCase {
AbstractButton {
action: Action {
text: "Default"
- icon.name: "default"
+ icon.name: checked ? "checked" : "unchecked"
icon.source: "qrc:/icons/default.png"
checkable: true
checked: true
@@ -617,6 +617,7 @@ TestCase {
compare(control.checkable, true)
compare(control.checked, true)
compare(control.enabled, false)
+ compare(control.icon.name, "checked")
var textSpy = signalSpy.createObject(control, { target: control, signalName: "textChanged" })
verify(textSpy.valid)
@@ -630,6 +631,7 @@ TestCase {
compare(control.checkable, false) // propagates
compare(control.checked, false) // propagates
compare(control.enabled, true) // propagates
+ compare(control.icon.name, "unchecked") // propagates
compare(textSpy.count, 1)
// changes via button
@@ -637,19 +639,23 @@ TestCase {
control.checkable = true
control.checked = true
control.enabled = false
+ control.icon.name = "default"
compare(control.text, "Button")
compare(control.checkable, true)
compare(control.checked, true)
compare(control.enabled, false)
+ compare(control.icon.name, "default")
compare(control.action.text, "Action") // does NOT propagate
compare(control.action.checkable, true) // propagates
compare(control.action.checked, true) // propagates
compare(control.action.enabled, true) // does NOT propagate
+ compare(control.action.icon.name, control.action.checked ? "checked" : "unchecked") // does NOT propagate
compare(textSpy.count, 2)
// remove the action so that only the button's properties are left
control.action = null
compare(control.text, "Button")
+ compare(control.icon.name, "default")
compare(textSpy.count, 2)
// setting an action while button has a particular property set