Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3577)

Unified Diff: chrome/test/data/webui/md_user_manager/create_profile_tests.js

Issue 1939933002: MD User Manager: Supervised user checkbox is always displaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md-user-manager-stylesheets
Patch Set: Fixed broken browser test Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_user_manager/create_profile_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/create_profile_tests.js b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
index f6b65d255480c59dfad19eea0ed122f3e7afbe49..d3f2918085c8bf01247dd311f487ad97a6365c42 100644
--- a/chrome/test/data/webui/md_user_manager/create_profile_tests.js
+++ b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
@@ -56,9 +56,9 @@ cr.define('user_manager.create_profile_tests', function() {
createProfileElement.signedInUsers_[0].profilePath);
// The 'learn more' link is visible.
- assertTrue(!!createProfileElement.$$('#learn-more'));
+ assertTrue(!!createProfileElement.$$('#learn-more > a'));
- // The dropdown menu is visible only when the checkbox is checked.
+ // The dropdown menu becomes visible when the checkbox is checked.
assertFalse(!!createProfileElement.$$('paper-dropdown-menu'));
// Simulate checking the checkbox.
@@ -355,7 +355,7 @@ cr.define('user_manager.create_profile_tests', function() {
});
// Simulate clicking 'Learn more'.
- MockInteractions.tap(createProfileElement.$$('#learn-more'));
+ MockInteractions.tap(createProfileElement.$$('#learn-more > a'));
});
});
});
@@ -378,9 +378,16 @@ cr.define('user_manager.create_profile_tests', function() {
return browserProxy.whenCalled('getSignedInUsers').then(function() {
assertEquals(0, createProfileElement.signedInUsers_.length);
- // '#supervised-user-container' is not present in the DOM.
- var container = createProfileElement.$$('#supervised-user-container');
- assertFalse(!!container);
+ // Simulate checking the checkbox.
+ MockInteractions.tap(createProfileElement.$$('paper-checkbox'));
+ Polymer.dom.flush();
+
+ // The dropdown menu is not visible when there are no signed in users.
+ assertFalse(!!createProfileElement.$$('paper-dropdown-menu'));
+
+ // Instead a message containing a link to the Help Center on how
+ // to sign in to Chrome is displaying.
+ assertTrue(!!createProfileElement.$$('#sign-in-to-chrome'));
});
});

Powered by Google App Engine
This is Rietveld 408576698