on xenial help sign in
Make tryGenericScopeView show the scope correctly

Approved by: Andrea Cimitan

commitcde0538d125ecfc751ca8f91ba56de519d954df7 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 14 Sep 2016, 00:36 (10 years ago) parentc9128a85f5d224
1 file changed+7−1
tests/qmltests/Dash/tst_GenericScopeView.qml+7−1
tests/qmltests/Dash/tst_GenericScopeView.qml+7−1
@@ -22,6 +22,7 @@ import "../../../qml/Dash"
2222import "../../../qml/Components"
2323import Ubuntu.Components 1.3
2424import Unity.Test 0.1 as UT
25+import Qt.test.qtestroot 1.0
2526
2627Item {
2728 id: shell
@@ -40,7 +41,12 @@ Item {
4041 Scopes {
4142 id: scopes
4243 // for tryGenericScopeView
43− onLoadedChanged: if (loaded) genericScopeView.scope = scopes.getScope(2);
44+ onLoadedChanged: {
45+ if (loaded && UT.Util.isInstanceOf(QTestRootObject, "DummyTestRootObject")) {
46+ genericScopeView.scope = scopes.getScope(2);
47+ genericScopeView.isCurrent = true;
48+ }
49+ }
4450 }
4551
4652 MockScope {