aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_stackview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_stackview.qml')
-rw-r--r--tests/auto/controls/data/tst_stackview.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index aee82eec..2eb802bf 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -459,6 +459,22 @@ TestCase {
compare(control.depth, 1)
compare(control.currentItem, item6)
+ // replace the topmost item
+ control.push(component)
+ compare(control.depth, 2)
+ var item7 = control.replace(control.get(1), component, StackView.Immediate)
+ compare(control.depth, 2)
+ compare(control.currentItem, item7)
+
+ // replace the item in the middle
+ control.push(component)
+ control.push(component)
+ control.push(component)
+ compare(control.depth, 5)
+ var item8 = control.replace(control.get(2), component, StackView.Immediate)
+ compare(control.depth, 3)
+ compare(control.currentItem, item8)
+
control.destroy()
}