@@ -110,7 +110,6 @@ Item {
111 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
111 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
112 spacing: units.gu(1)
112 spacing: units.gu(1)
116 text: "Show Last Chance"
115 text: "Show Last Chance"
@@ -261,6 +260,21 @@ Item {
261 text: "emergency: " + emergencySpy.count
260 text: "emergency: " + emergencySpy.count
265+ id: multipleSessions
268+ LightDM.Sessions.testScenario = "multipleSessions"
270+ LightDM.Sessions.testScenario = "singleSession"
275+ text: "Multiple sessions"
266 text: "Reload View"
280 text: "Reload View"
@@ -377,16 +391,41 @@ Item {
379 function test_sessionIconsAreValid() {
393 function test_sessionIconsAreValid() {
394+ /*LightDM.Sessions.testScenario = "multipleSessions"
380 var originalDirectories = LightDM.Sessions.iconSearchDirectories
395 var originalDirectories = LightDM.Sessions.iconSearchDirectories
381− var sessionChooserButton = findChild(view, "sessionChooserButton")
382− LightDM.Sessions.testScenario = "multipleSessions"
383− console.log("FIRST JOSH: " + sessionChooserButton.imageSource)
384 LightDM.Sessions.iconSearchDirectories = [testIconDirectory]
396 LightDM.Sessions.iconSearchDirectories = [testIconDirectory]
398+ // Test the login list icon is valid
386 var sessionChooserButton = findChild(view, "sessionChooserButton")
399 var sessionChooserButton = findChild(view, "sessionChooserButton")
387 compare(sessionChooserButton.visible, true)
400 compare(sessionChooserButton.visible, true)
388− console.log("JOSH: " + sessionChooserButton.imageSource)
401+
389− compare(true, false)
402+ var session = String(view.sessionToStart).toLowerCase()
403+ var icon = String(sessionChooserButton.icon)
404+ compare(icon.indexOf(session) > -1, true)*/
405+ // Test the session list icons are valid
406+ //mouseClick(sessionChooserButton)
407+ //view.loginListShown = false
408+ view.testThing = false
410+ console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n")
411+ loader.active = false
412+ loader.active = true
413+ view.loginListShown = false
414+ var sessionList = findChild(view, "sessionsList");
415+ compare(sessionList.expanded, true)
416+ compare(sessionList.visible, true)
419+ //compare(true, false)
421+/* for (var i = 0; i < LightDM.Sessions.count; i++) {
422+ var delegateName = "sessionDelegate" + String(i);
423+ var currentDelegate = findChild(view, delegateName)
424+ var session = String(currentDelegate.text).toLowerCase()
425+ console.log("\n\n SESSION NAME: " + session)
426+ var icon = String(currentDelegate.iconSource)
427+ compare(icon.indexOf(session) > -1, true)
392 function test_noSessionsDoesntBreakView() {
431 function test_noSessionsDoesntBreakView() {