@@ -110,7 +110,6 @@ Item {
110110 Column {
111111 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
112112 spacing: units.gu(1)
113−
114113 Row {
115114 Button {
116115 text: "Show Last Chance"
@@ -261,6 +260,21 @@ Item {
261260 text: "emergency: " + emergencySpy.count
262261 }
263262 }
263+ Row {
264+ CheckBox {
265+ id: multipleSessions
266+ onClicked: {
267+ if (checked) {
268+ LightDM.Sessions.testScenario = "multipleSessions"
269+ } else {
270+ LightDM.Sessions.testScenario = "singleSession"
271+ }
272+ }
273+ }
274+ Label {
275+ text: "Multiple sessions"
276+ }
277+ }
264278 Row {
265279 Button {
266280 text: "Reload View"
@@ -377,16 +391,41 @@ Item {
377391 }
378392
379393 function test_sessionIconsAreValid() {
394+ /*LightDM.Sessions.testScenario = "multipleSessions"
380395 var originalDirectories = LightDM.Sessions.iconSearchDirectories
381− var sessionChooserButton = findChild(view, "sessionChooserButton")
382− LightDM.Sessions.testScenario = "multipleSessions"
383− console.log("FIRST JOSH: " + sessionChooserButton.imageSource)
384396 LightDM.Sessions.iconSearchDirectories = [testIconDirectory]
385397
398+ // Test the login list icon is valid
386399 var sessionChooserButton = findChild(view, "sessionChooserButton")
387400 compare(sessionChooserButton.visible, true)
388− console.log("JOSH: " + sessionChooserButton.imageSource)
389− compare(true, false)
401+
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
409+ sleep(50000)
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)
417+
418+
419+ //compare(true, false)
420+
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)
428+ } */
390429 }
391430
392431 function test_noSessionsDoesntBreakView() {