@@ -412,19 +412,24 @@ StyledItem {
414 function test_changingSessionSticksToUser() {
414 function test_changingSessionSticksToUser() {
415− LightDM.Sessions.mock.sessionMode = "full";
415+ LightDMController.sessionMode = "full";
416+ // For this test to work, a user has to be selected and the
417+ // mock must be made aware of that user
418+ selectUser("has-password")
419+ LightDMController.currentUsername = "has-password"
416 var loginList = findChild(view, "loginList");
421 var loginList = findChild(view, "loginList");
417 var fakeSessionName = "ASessionWillNeverBeCalledThis";
422 var fakeSessionName = "ASessionWillNeverBeCalledThis";
419 compare(LightDM.Sessions.count > 1, true);
424 compare(LightDM.Sessions.count > 1, true);
420 compare(loginList.currentSession != fakeSessionName, true);
425 compare(loginList.currentSession != fakeSessionName, true);
422− LightDM.Users.mock.sessionName = fakeSessionName;
427+ LightDMController.sessionName = fakeSessionName;
423 tryCompare(loginList, "currentSession", fakeSessionName);
428 tryCompare(loginList, "currentSession", fakeSessionName);
425 // Force a model reset
430 // Force a model reset
426− LightDM.Users.mock.userMode = "single";
431+ LightDMController.userMode = "single";
427− LightDM.Users.mock.userMode = "full";
432+ LightDMController.userMode = "full";
430 function test_tease_data() {
435 function test_tease_data() {