on xenial help sign in
Make sure attributes is always defined in mock overview scope.
commit3eb4c4b6b9d833b621cabb1184abbf5451f9aa20 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 14 Aug 2014, 01:26 (12 years ago) parent2f2bc75
2 files changed+6−2
tests/mocks/Unity/fake_scopesoverview.cpp+4−2 tests/qmltests/Dash/tst_Dash.qml+2
tests/mocks/Unity/fake_scopesoverview.cpp+4−2
@@ -105,11 +105,12 @@ ScopesOverviewCategories::data(const QModelIndex& index, int role) const
105105 }
106106 case RoleComponents:
107107 {
108− QVariantMap map, artMap;
108+ QVariantMap map, artMap, attributesMap;
109109 artMap["aspect-ratio"] = "0.5";
110110 artMap["field"] = "art";
111111 map["art"] = artMap;
112112 map["title"] = "HOLA";
113+ map["attributes"] = attributesMap;
113114 return map;
114115 }
115116 case RoleResults:
@@ -188,11 +189,12 @@ ScopesOverviewSearchCategories::data(const QModelIndex& index, int role) const
188189 }
189190 case RoleComponents:
190191 {
191− QVariantMap map, artMap;
192+ QVariantMap map, artMap, attributesMap;
192193 artMap["aspect-ratio"] = "1";
193194 artMap["field"] = "art";
194195 map["art"] = artMap;
195196 map["title"] = "HOLA";
197+ map["attributes"] = attributesMap;
196198 return map;
197199 }
198200 case RoleResults:
tests/qmltests/Dash/tst_Dash.qml+2
@@ -273,6 +273,8 @@ Item {
273273 // Click on a temp scope in the search
274274 var dashCategorysearchA = findChild(searchResultsViewer, "dashCategorysearchA");
275275 var cardTempScope = findChild(dashCategorysearchA, "delegate2");
276+ verify(cardTempScope, "Could not find delegate2");
277+
276278 waitForRendering(cardTempScope);
277279 mouseClick(cardTempScope, cardTempScope.width / 2, cardTempScope.height / 2);
278280