@@ -67,13 +67,17 @@ Item {
6767 name: "DashContent"
6868 when: scopesModel.loaded && windowShown
6969
70− function init() {
71− scopesModel.clear();
70+ function loadScopes() {
7271 scopeLoadedSpy.clear();
7372 scopesModel.load();
7473 tryCompare(scopeLoadedSpy, "count", 4);
7574 }
7675
76+ function init() {
77+ scopesModel.clear();
78+ loadScopes();
79+ }
80+
7781 function cleanup() {
7882 movementStartedSpy.clear();
7983 dashContent.visible = true;
@@ -93,9 +97,7 @@ Item {
9397 compare(dashContentList.count, 0, "DashContent should have 0 items when it starts");
9498 tryCompare(dashContentList, "currentIndex", -1);
9599
96− scopeLoadedSpy.clear();
97− scopesModel.load();
98− tryCompare(scopeLoadedSpy, "count", 4);
100+ loadScopes();
99101
100102 verify(dashContentList.currentIndex >= 0);
101103 }
@@ -109,9 +111,7 @@ Item {
109111 // pretend we're running after a model reset
110112 dashContentList.currentIndex = 27;
111113
112− scopeLoadedSpy.clear();
113− scopesModel.load();
114− tryCompare(scopeLoadedSpy, "count", 4);
114+ loadScopes();
115115
116116 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < 5);
117117 }
@@ -326,8 +326,6 @@ Item {
326326 }
327327
328328 function test_previewOpenClose() {
329− tryCompare(scopeLoadedSpy, "count", 4);
330−
331329 var previewListView = findChild(dashContent, "dashContentPreviewList");
332330 tryCompare(previewListView, "open", false);
333331
@@ -352,8 +350,6 @@ Item {
352350 },
353351 true);
354352
355− tryCompare(scopeLoadedSpy, "count", 4);
356−
357353 var previewListView = findChild(dashContent, "dashContentPreviewList");
358354 tryCompare(previewListView, "open", false);
359355
@@ -368,8 +364,6 @@ Item {
368364 }
369365
370366 function test_previewCycle() {
371− tryCompare(scopeLoadedSpy, "count", 4);
372−
373367 var categoryListView = findChild(dashContent, "categoryListView");
374368 categoryListView.positionAtBeginning();
375369
@@ -392,5 +386,26 @@ Item {
392386 }
393387 closePreview();
394388 }
389+
390+ function test_carouselAspectRatio() {
391+ tryCompareFunction(function() {
392+ var scope = findChild(dashContent, "MockScope1 loader");
393+ if (scope != null) {
394+ var dashCategory1 = findChild(scope, "dashCategory1");
395+ if (dashCategory1 != null) {
396+ var tile = findChild(dashCategory1, "carouselDelegate1");
397+ return tile != null;
398+ }
399+ }
400+ return false;
401+ },
402+ true);
403+
404+ var scope = findChild(dashContent, "MockScope1 loader");
405+ var dashCategory1 = findChild(scope, "dashCategory1");
406+ var cardTool = findChild(dashCategory1, "cardTool");
407+ var carouselLV = findChild(dashCategory1, "listView");
408+ verify(carouselLV.tileWidth / carouselLV.tileHeight == cardTool.components["art"]["aspect-ratio"]);
409+ }
395410 }
396411}