aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-04-28 21:35:07 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-29 12:45:19 +0000
commitf2d3a486933cd3cb71b60ee27af53017e3a958bb (patch)
treeaccaefe79c96d9def8b0c63c53ff650d511e75f0 /tests
parent3980354daa4d8dfa8ec07ed2c2265ebb137b6f36 (diff)
Popup: emit opened() when fully opened
Opening sequence: aboutToShow() -> visibleChanged() -> enter transition -> opened() Closing sequence: aboutToHide() -> exit transition -> visibleChanged() -> closed() Change-Id: If1a97f0d3cbc1dad0e1b1ceade4b807a9bff122e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_popup.qml20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index b28a31e8..f5b9398c 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -955,22 +955,32 @@ TestCase {
signalName: "closed"
}
+ Component {
+ id: pausePopup
+ Popup {
+ enter: Transition { PauseAnimation { duration: 200 } }
+ exit: Transition { PauseAnimation { duration: 200 } }
+ }
+ }
+
function test_openedClosed() {
- var control = popupControl.createObject(testCase)
+ var control = pausePopup.createObject(testCase)
verify(control)
openedSpy.target = control
closedSpy.target = control
control.open()
- tryCompare(control, "visible", true)
- compare(openedSpy.count, 1)
+ compare(control.visible, true)
+ compare(openedSpy.count, 0)
+ tryCompare(openedSpy, "count", 1)
compare(closedSpy.count, 0)
control.close()
- tryCompare(control, "visible", false)
compare(openedSpy.count, 1)
- compare(closedSpy.count, 1)
+ compare(closedSpy.count, 0)
+ tryCompare(closedSpy, "count", 1)
+ compare(control.visible, false)
control.destroy()
}