on xenial help sign in
Make tryGenericScopeView show the scope correctly

Approved by: Andrea Cimitan

commit3a6fe626c95f263d69007208fc342cf445e26ad7 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 13 Sep 2016, 06:49 (10 years ago) parent67a46135f5d224
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 {