From e1bf1e9a03066a9029132e476794d3f16abcd6ff Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 25 Sep 2015 21:30:59 +0200 Subject: StackView: add dedicated replace transitions Change-Id: I614d11bb566c96166ebf8bc0d2f5d4286d823a5f Reviewed-by: Kai Uwe Broulik Reviewed-by: Mitch Curtis --- tests/auto/controls/data/tst_stackview.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml index 3dc6d0c9..22d4cfe3 100644 --- a/tests/auto/controls/data/tst_stackview.qml +++ b/tests/auto/controls/data/tst_stackview.qml @@ -451,6 +451,8 @@ TestCase { property int popExitRuns property int pushEnterRuns property int pushExitRuns + property int replaceEnterRuns + property int replaceExitRuns popEnter: Transition { PauseAnimation { duration: 1 } onRunningChanged: if (!running) ++popEnterRuns @@ -467,6 +469,14 @@ TestCase { PauseAnimation { duration: 1 } onRunningChanged: if (!running) ++pushExitRuns } + replaceEnter: Transition { + PauseAnimation { duration: 1 } + onRunningChanged: if (!running) ++replaceEnterRuns + } + replaceExit: Transition { + PauseAnimation { duration: 1 } + onRunningChanged: if (!running) ++replaceExitRuns + } } } @@ -484,6 +494,11 @@ TestCase { compare(control.pushEnterRuns, 1) compare(control.pushExitRuns, 1) + control.replace(component) + tryCompare(control, "busy", false) + compare(control.replaceEnterRuns, 1) + compare(control.replaceExitRuns, 1) + control.pop() tryCompare(control, "busy", false) compare(control.popEnterRuns, 1) -- cgit v1.2.3