aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2024-02-23 12:49:54 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-28 02:58:41 +0000
commitb600257d5d24d0691b3ab72c97c7d98458790b55 (patch)
tree135f361195b8492f06971aa07dada3c8505acc97
parent947c4b6885a562d01c141bba88320ea296be02fa (diff)
Attempt to stabilize tst_how-to-qml's timePicker test
Top-level animations within a transition are run in parallel, which meant that the NumberAnimations that animated the opacity of the labels could technically be conflicting (even though it visually looked correct). This could explain why the test was failing when checking for the opacity to equal 1, and it was instead 0.96. Reduce the duration of the animations now that they execute in succession, as originally intended. Amends d414c81f38d8fea47d91c9414bdecda9ea7761a1. Task-number: QTBUG-122679 Change-Id: I51c62d8c95d54194fd2fb2273c9644378d4b61e5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit ee988e556af28042070ceb535f56f9ac58612947) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6f0f436fa9540a01b50185678bdef9aaef199cb2)
-rw-r--r--tests/auto/quick/doc/how-tos/how-to-qml/time-picker/TimePicker.qml32
1 files changed, 18 insertions, 14 deletions
diff --git a/tests/auto/quick/doc/how-tos/how-to-qml/time-picker/TimePicker.qml b/tests/auto/quick/doc/how-tos/how-to-qml/time-picker/TimePicker.qml
index c838947af6..e7dc64261b 100644
--- a/tests/auto/quick/doc/how-tos/how-to-qml/time-picker/TimePicker.qml
+++ b/tests/auto/quick/doc/how-tos/how-to-qml/time-picker/TimePicker.qml
@@ -157,22 +157,26 @@ Item {
// picker was already visible.
enabled: root.interactive
- NumberAnimation {
- target: contentContainer
- property: "labelOpacity"
- from: 1
- to: 0
- }
+ SequentialAnimation {
+ NumberAnimation {
+ target: contentContainer
+ property: "labelOpacity"
+ from: 1
+ to: 0
+ duration: 100
+ }
- ScriptAction {
- script: root.__effectiveMode = root.mode
- }
+ ScriptAction {
+ script: root.__effectiveMode = root.mode
+ }
- NumberAnimation {
- target: contentContainer
- property: "labelOpacity"
- from: 0
- to: 1
+ NumberAnimation {
+ target: contentContainer
+ property: "labelOpacity"
+ from: 0
+ to: 1
+ duration: 100
+ }
}
},
Transition {