on xenial help sign in
Set icon search directory
commit9282f8d805a78d08802ae4c3553ca60acd283c46 authorMichael Terry <mike@mterry.name> dateMon 19 Dec 2016, 17:54 (10 years ago) parentddb5511
1 file changed+4−7
tests/qmltests/Greeter/tst_WideView.qml+4−7
tests/qmltests/Greeter/tst_WideView.qml+4−7
@@ -363,6 +363,7 @@ StyledItem {
363363 teaseSpy.clear();
364364 emergencySpy.clear();
365365 LightDM.Sessions.mock.sessionMode = "full";
366+ LightDM.Sessions.iconSearchDirectories = [testIconDirectory];
366367 }
367368
368369 function cleanup() {
@@ -420,9 +421,6 @@ StyledItem {
420421 }
421422
422423 function test_sessionIconsAreValid() {
423− var originalDirectories = LightDM.Sessions.iconSearchDirectories
424− LightDM.Sessions.iconSearchDirectories = [testIconDirectory]
425−
426424 selectUser("has-password");
427425
428426 // Test the login list icon is valid
@@ -442,8 +440,7 @@ StyledItem {
442440
443441 function test_choosingNewSessionChangesLoginListIcon() {
444442 // Ensure the default session is selected (Ubuntu)
445− loader.active = false;
446− loader.active = true;
443+ cleanup();
447444
448445 selectUser("has-password");
449446
@@ -457,14 +454,14 @@ StyledItem {
457454 var currentDelegate = findChild(view, delegateName);
458455 var sessionKey = LightDM.Sessions.data(i,LightDM.SessionRoles.KeyRole);
459456 if (sessionKey === "gnome-classic") {
457+ waitForRendering(currentDelegate);
460458 tap(currentDelegate);
461− var sessionChooserButton = findChild(view, "sessionChooserButton");
462459 waitForRendering(sessionChooserButton);
463− var icon = String(sessionChooserButton.icon);
464460 break;
465461 }
466462 }
467463
464+ icon = String(sessionChooserButton.icon);
468465 compare(icon.indexOf("gnome") > -1, true,
469466 "Expected icon to contain gnome but it was " + icon);
470467 }