on xenial help sign in
Remove the activity indicator from tests

Now that its animation runs in the render thread instead of in the main (GUI) one. This fixes the problem were qml tests would take 100% CPU and fail at some point. Approved by: Daniel d'Andrada

commitd051ca1cff26686f132b2fb8bf6d58a7078003cb authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 18 Mar 2015, 10:18 (12 years ago) parent6eef4340493ee4
1 file changed+16−6
tests/utils/modules/Unity/Test/UnityTestCase.qml+16−6
tests/utils/modules/Unity/Test/UnityTestCase.qml+16−6
@@ -23,12 +23,22 @@ TestCase {
2323 id: testCase
2424 TestUtil {id:util}
2525
26− ActivityIndicator {
27− visible: testCase.running
28− anchors.centerIn: parent
29− Component.onCompleted: parent = testCase.parent
30− z: 100
31− running: visible
26+ // This is needed for waitForRendering calls to return
27+ // if the watched element already got rendered
28+ Rectangle {
29+ width: units.gu(1)
30+ height: width
31+ parent: testCase.parent
32+ border { width: units.dp(1); color: "black" }
33+ opacity: 0.6
34+
35+ RotationAnimation on rotation {
36+ running: true
37+ from: 0
38+ to: 360
39+ loops: Animation.Infinite
40+ duration: 1000
41+ }
3242 }
3343
3444 // Fake implementation to be provided to items under test