on xenial help sign in
fixed test_lockPhoneAfterClosingAppInSpreadThenUnlockAndRotate
6cec3a3Nick Dedekind
tests/qmltests/tst_OrientedShell.qml+6−4
@@ -1264,7 +1264,7 @@ Rectangle {
1264 Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1476757
1264 Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1476757
1265
1265
1266 Steps:
1266 Steps:
1267− 1- have a portrait-only app in foreground (eg unity8-dash)
1267+ 1- have a portrait-only app in foreground (eg primary-oriented-app)
1268 2- launch or switch to some other application
1268 2- launch or switch to some other application
1269 3- right-edge swipe to show the apps spread
1269 3- right-edge swipe to show the apps spread
1270 4- swipe up to close the current app (the one from step 2)
1270 4- swipe up to close the current app (the one from step 2)
@@ -1282,8 +1282,10 @@ Rectangle {
1282 function test_lockPhoneAfterClosingAppInSpreadThenUnlockAndRotate() {
1282 function test_lockPhoneAfterClosingAppInSpreadThenUnlockAndRotate() {
1283 loadShell("mako");
1283 loadShell("mako");
1284
1284
1285− compare(topLevelSurfaceList.applicationAt(0).appId, "unity8-dash");
1285+ var primarySurfaceId = topLevelSurfaceList.nextId;
1286− var dashSurfaceId = topLevelSurfaceList.idAt(0);
1286+ var primaryApp = ApplicationManager.startApplication("primary-oriented-app");
1287+ verify(primaryApp);
1288+ waitUntilAppWindowIsFullyLoaded(primarySurfaceId);
1287
1289
1288 var gmailSurfaceId = topLevelSurfaceList.nextId;
1290 var gmailSurfaceId = topLevelSurfaceList.nextId;
1289 var gmailApp = ApplicationManager.startApplication("gmail-webapp");
1291 var gmailApp = ApplicationManager.startApplication("gmail-webapp");
@@ -1305,7 +1307,7 @@ Rectangle {
1305
1307
1306 swipeAwayGreeter();
1308 swipeAwayGreeter();
1307
1309
1308− verify(isAppSurfaceFocused(dashSurfaceId))
1310+ verify(isAppSurfaceFocused(primarySurfaceId))
1309
1311
1310 signalSpy.clear();
1312 signalSpy.clear();
1311 signalSpy.target = shell;
1313 signalSpy.target = shell;