@@ -70,6 +70,8 @@ Item {
7070
7171 var dashHome = findChild(shell, "DashHome");
7272 swipeUntilScopeViewIsReached(dashHome);
73+
74+ hideIndicators();
7375 }
7476
7577 function killApps(apps) {
@@ -268,6 +270,19 @@ Item {
268270 mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2);
269271 }
270272
273+ function showIndicators() {
274+ var indicators = findChild(shell, "indicators");
275+ indicators.show();
276+ tryCompare(indicators, "fullyOpened", true);
277+ }
278+
279+ function hideIndicators() {
280+ var indicators = findChild(shell, "indicators");
281+ if (indicators.fullyOpened) {
282+ indicators.hide();
283+ }
284+ }
285+
271286 function waitUntilApplicationWindowIsFullyVisible() {
272287 var underlay = findChild(shell, "underlay");
273288 tryCompare(underlay, "visible", false);
@@ -360,5 +375,40 @@ Item {
360375 tryCompareFunction(function() { return backgroundImage.source.toString().indexOf(data.expectedUrl) !== -1; }, true)
361376 tryCompare(backgroundImage, "status", Image.Ready)
362377 }
378+
379+ function test_DashShown_data() {
380+ return [
381+ {tag: "in focus", greeter: false, app: false, launcher: false, indicators: false, expectedShown: true},
382+ {tag: "under greeter", greeter: true, app: false, launcher: false, indicators: false, expectedShown: false},
383+ {tag: "under app", greeter: false, app: true, launcher: false, indicators: false, expectedShown: false},
384+ {tag: "under launcher", greeter: false, app: false, launcher: true, indicators: false, expectedShown: true},
385+ {tag: "under indicators", greeter: false, app: false, launcher: false, indicators: true, expectedShown: true},
386+ ]
387+ }
388+
389+ function test_DashShown(data) {
390+ if (data.greeter) {
391+ // Swipe the greeter in
392+ var greeter = findChild(shell, "greeter");
393+ Powerd.displayPowerStateChange(Powerd.Off, 0);
394+ tryCompare(greeter, "showProgress", 1);
395+ }
396+
397+ if (data.app) {
398+ dragLauncherIntoView();
399+ tapOnAppIconInLauncher();
400+ }
401+
402+ if (data.launcher) {
403+ dragLauncherIntoView();
404+ }
405+
406+ if (data.indicators) {
407+
408+ }
409+
410+ var dash = findChild(shell, "dash");
411+ tryCompare(dash, "shown", data.expectedShown);
412+ }
363413 }
364414}