Merge lp:~nick-dedekind/unity8/qmltest-renderer-bumping into lp:unity8

Proposed by Nick Dedekind
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 1316
Merged at revision: 1346
Proposed branch: lp:~nick-dedekind/unity8/qmltest-renderer-bumping
Merge into: lp:unity8
Diff against target: 21 lines (+9/-0)
1 file modified
tests/utils/modules/Unity/Test/UnityTestCase.qml (+9/-0)
To merge this branch: bzr merge lp:~nick-dedekind/unity8/qmltest-renderer-bumping
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel d'Andrada (community) Approve
Michael Zanetti Pending
Review via email: mp+237035@code.launchpad.net

Commit message

Force rendering so we don't get stuck in "waitForRendering" loop in tests.

Description of the change

Force rendering so we don't get stuck in "waitForRendering" loop in tests.
Wipes about 5 minutes off qmltest time.

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 * Did you perform an exploratory manual test run of your code change and any related functionality?
 * Did you make sure that your branch does not contain spurious tags?
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 * If you changed the UI, has there been a design review?

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Great! It does make the tests run faster!

But I don't see the need to bring back all that code just to display something moving on the screen. Why don't we use what Ubuntu.Components already provides? Like this:

"""
=== modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
--- tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-10-01 21:26:55 +0000
+++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-10-03 16:33:42 +0000
@@ -23,11 +23,12 @@ TestCase {
     id: testCase
     TestUtil {id:util}

- WaitingDots {
+ ActivityIndicator {
         visible: testCase.running
         anchors.centerIn: parent
         Component.onCompleted: parent = testCase.parent
         z: 100
+ running: visible
     }

     // Fake implementation to be provided to items under test
"""

review: Needs Fixing
1316. By Nick Dedekind

use existing controls

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Great! It does make the tests run faster!
>
> But I don't see the need to bring back all that code just to display something
> moving on the screen. Why don't we use what Ubuntu.Components already
> provides? Like this:
>
> """
> === modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
> --- tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-10-01 21:26:55
> +0000
> +++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-10-03 16:33:42
> +0000
> @@ -23,11 +23,12 @@ TestCase {
> id: testCase
> TestUtil {id:util}
>
> - WaitingDots {
> + ActivityIndicator {
> visible: testCase.running
> anchors.centerIn: parent
> Component.onCompleted: parent = testCase.parent
> z: 100
> + running: visible
> }
>
> // Fake implementation to be provided to items under test
> """

Fixed

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looking good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
2--- tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-08-08 11:23:57 +0000
3+++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2014-10-06 10:31:51 +0000
4@@ -20,8 +20,17 @@
5 import Unity.Test 0.1 as UT
6
7 TestCase {
8+ id: testCase
9 TestUtil {id:util}
10
11+ ActivityIndicator {
12+ visible: testCase.running
13+ anchors.centerIn: parent
14+ Component.onCompleted: parent = testCase.parent
15+ z: 100
16+ running: visible
17+ }
18+
19 // Fake implementation to be provided to items under test
20 property var fakeDateTime: new function() {
21 this.currentTimeMs = 0

Subscribers

People subscribed via source and target branches