on xenial help sign in
add a test
commit42d92b7802631bdd6697f0d87c66374eb6243dc6 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 31 May 2016, 23:06 (10 years ago) parent1acaf83
1 file changed+29
tests/qmltests/tst_Shell.qml+29
tests/qmltests/tst_Shell.qml+29
@@ -2427,5 +2427,34 @@ Rectangle {
24272427 ApplicationManager.requestFocusApplication("calendar-app");
24282428 tryCompare(app2Surface, "keymap", "fr");
24292429 }
2430+
2431+ function test_closeFocusedDelegate_data() {
2432+ return [
2433+ { tag: "phone" },
2434+ { tag: "tablet" },
2435+ { tag: "desktop" },
2436+ ]
2437+ }
2438+
2439+ function test_closeFocusedDelegate(data) {
2440+ loadShell(data.tag);
2441+ shell.usageScenario = data.tag;
2442+ waitForRendering(shell);
2443+ swipeAwayGreeter();
2444+
2445+ var app2SurfaceId = topLevelSurfaceList.nextId;
2446+ var app2 = ApplicationManager.startApplication("calendar-app");
2447+ waitUntilAppWindowIsFullyLoaded(app2SurfaceId);
2448+
2449+ var app1SurfaceId = topLevelSurfaceList.nextId;
2450+ var app1 = ApplicationManager.startApplication("dialer-app")
2451+ waitUntilAppWindowIsFullyLoaded(app1SurfaceId);
2452+
2453+ var countBeforeClose = topLevelSurfaceList.count;
2454+
2455+ keyClick(Qt.Key_F4, Qt.AltModifier);
2456+
2457+ tryCompare(topLevelSurfaceList, "count", countBeforeClose - 1);
2458+ }
24302459 }
24312460}