aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quickcontrols/controls/data/tst_busyindicator.qml')
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_busyindicator.qml35
1 files changed, 28 insertions, 7 deletions
diff --git a/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml b/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml
index a50fd1bfab..001b0c474f 100644
--- a/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtTest
@@ -22,17 +22,26 @@ TestCase {
id: mouseArea
MouseArea { }
}
-
- function test_defaults() {
+
+ Component {
+ id: busyIndicatorInItem
+ Item {
+ BusyIndicator { }
+ }
+ }
+
+ function init() {
failOnWarning(/.?/)
+ }
+ function test_defaults() {
let control = createTemporaryObject(busyIndicator, testCase)
verify(control)
compare(control.running, true)
}
function test_running() {
- var control = createTemporaryObject(busyIndicator, testCase)
+ let control = createTemporaryObject(busyIndicator, testCase)
verify(control)
compare(control.running, true)
@@ -42,10 +51,10 @@ TestCase {
// QTBUG-61785
function test_mouseArea() {
- var ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
+ let ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
verify(ma)
- var control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height})
+ let control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height})
verify(control)
mousePress(control)
@@ -54,11 +63,23 @@ TestCase {
mouseRelease(control)
verify(!ma.pressed)
- var touch = touchEvent(control)
+ let touch = touchEvent(control)
touch.press(0, control).commit()
verify(ma.pressed)
touch.release(0, control).commit()
verify(!ma.pressed)
}
+
+ // QTBUG-108808
+ function test_visibility() {
+ let control = createTemporaryObject(busyIndicatorInItem, testCase, {visible: false})
+ verify(control)
+
+ let invisibleImage = grabImage(control)
+ control.visible = true
+ let visibleImage = grabImage(control)
+
+ verify(!invisibleImage.equals(visibleImage))
+ }
}