diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-02-22 03:05:56 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-02-22 03:05:57 +0100 |
commit | 35afc8d21b2f705463ec56d3e11679efb798b757 (patch) | |
tree | 1ed9824247f3a689ed24d91da54c01ec99c662bb /tests/auto/controls/data/tst_tooltip.qml | |
parent | c9260cd940fe9ca0e440b715cbfc13dd046e07b0 (diff) | |
parent | 09476c590ab13623130d5ac79045fa68e504be96 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1
Change-Id: Iff02839c8ace49582750e06fa1ea9c559f6c93fe
Diffstat (limited to 'tests/auto/controls/data/tst_tooltip.qml')
-rw-r--r-- | tests/auto/controls/data/tst_tooltip.qml | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml index d98a7cc8..adea23ef 100644 --- a/tests/auto/controls/data/tst_tooltip.qml +++ b/tests/auto/controls/data/tst_tooltip.qml @@ -227,15 +227,39 @@ TestCase { id: toolTipWithExitTransition ToolTip { + Component.onCompleted: contentItem.objectName = "contentItem" + enter: Transition { NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 100 } } exit: Transition { - NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 1000 } + NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 500 } } } } + function test_openDuringExitTransitionWithTimeout() { + let control = createTemporaryObject(toolTipWithExitTransition, testCase, { timeout: 250 }) + verify(control) + control.open() + verify(control.visible) + // Can't be fully open yet because the enter transition has only just started. + compare(control.opened, false) + compare(control.enter.running, true) + tryCompare(control, "opened", true) + + // Let it timeout and begin the exit transition. + tryCompare(control, "opened", false) + verify(control.visible) + tryCompare(control.exit, "running", true) + verify(control.visible) + + // Quickly open it again; it should still timeout eventually. + control.open() + tryCompare(control, "opened", true) + tryCompare(control.exit, "running", true) + } + function test_makeVisibleWhileExitTransitionRunning_data() { return [ { tag: "imperative", imperative: true }, |