@@ -318,6 +318,7 @@ Item {
318 respondedSpy.clear();
318 respondedSpy.clear();
319 teaseSpy.clear();
319 teaseSpy.clear();
320 emergencySpy.clear();
320 emergencySpy.clear();
321+ LightDM.Sessions.testScenario = "multipleSessions"
323 function cleanup() {
324 function cleanup() {
@@ -374,9 +375,25 @@ Item {
378+ function test_noSessionsDoesntBreakView() {
379+ LightDM.Sessions.testScenario = "noSessions"
380+ compare(LightDM.Sessions.count, 0)
377 function test_sessionIconNotShownWithOneSession() {
383 function test_sessionIconNotShownWithOneSession() {
378 LightDM.Sessions.testScenario = "singleSession"
384 LightDM.Sessions.testScenario = "singleSession"
379 compare(LightDM.Sessions.count, 1);
385 compare(LightDM.Sessions.count, 1);
387+ var sessionChooserButton = findChild(view, "sessionChooserButton");
388+ compare(sessionChooserButton.visible, false);
391+ function test_sessionIconShownWithMultipleSessions() {
392+ LightDM.Sessions.testScenario = "multipleSessions"
393+ compare(LightDM.Sessions.count > 1, true);
395+ var sessionChooserButton = findChild(view, "sessionChooserButton");
396+ compare(sessionChooserButton.visible, true);
382 function test_tease(data) {
399 function test_tease(data) {