on xenial help sign in
Add a test
commit32458de03e25a013a3bafeb4b6c4fad85746521e authorJosh Arenson <joshua.arenson@canonical.com> dateMon 20 Mar 2017, 17:46 (10 years ago) parent2c8cfc9
2 files changed+10
tests/mocks/liblightdm/MockUsersModel.cpp+1 tests/qmltests/Greeter/tst_WideView.qml+9
tests/mocks/liblightdm/MockUsersModel.cpp+1
@@ -186,6 +186,7 @@ void UsersModel::resetEntries()
186186 { "no-background", "No Background", "", 0, false, false, "ubuntu", 0 },
187187 { "no-password", "No Password", 0, 0, false, false, "ubuntu", 0 },
188188 { "no-response", "No Response", 0, 0, false, false, "ubuntu", 0 },
189+ { "no-session", "No Session", 0, 0, false, false, "", 0 },
189190 { "question-prompt", "Question Prompt", 0, 0, false, false, "ubuntu", 0 },
190191 { "two-factor", "Two Factor", 0, 0, false, false, "ubuntu", 0 },
191192 { "two-prompts", "Two Prompts", 0, 0, false, false, "ubuntu", 0 },
tests/qmltests/Greeter/tst_WideView.qml+9
@@ -395,6 +395,15 @@ StyledItem {
395395 waitForRendering(view);
396396 }
397397
398+ function test_sessionless_user_is_still_valid() {
399+ var loginList = findChild(view, "loginList")
400+
401+ selectUser("no-session");
402+ compare(LightDM.Users.data(loginList.currentIndex, LightDM.UserRoles.SessionRole), "");
403+
404+ tryCompare(loginList, "currentSession", LightDM.Greeter.defaultSession);
405+ }
406+
398407 function test_changingSessionSticksToUser() {
399408 var loginList = findChild(view, "loginList");
400409