on xenial help sign in
Make tryGenericScopeView show the scope correctly

Approved by: Andrea Cimitan

commit9648eec2d3523c6a26642dee708855e32924bb54 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 22 Sep 2016, 07:36 (10 years ago) parentfb89b4a5f5d224
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 {