Skip to content

Commit 6e65578

Browse files
prakhar1989bojeil-google
authored andcommitted
fixed failing tests
1 parent a10edb2 commit 6e65578

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

javascript/ui/page/passwordsignup_test.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ var infoBarTestHelper =
4949
new firebaseui.auth.ui.element.InfoBarTestHelper().registerTests();
5050

5151

52-
function createComponent(tosUrl, opt_name) {
52+
function createComponent(tosUrl, shouldDisplayName, opt_name) {
5353
var component = new firebaseui.auth.ui.page.PasswordSignUp(
5454
tosUrl,
55+
shouldDisplayName,
5556
goog.bind(
5657
firebaseui.auth.ui.element.FormTestHelper.prototype.onSubmit,
5758
formTestHelper),
@@ -75,7 +76,7 @@ function createComponent(tosUrl, opt_name) {
7576
function setUp() {
7677
root = goog.dom.createDom(goog.dom.TagName.DIV);
7778
document.body.appendChild(root);
78-
component = createComponent('http://localhost/tos');
79+
component = createComponent('http://localhost/tos', true);
7980
}
8081

8182

@@ -92,6 +93,7 @@ function testInitialFocus_email() {
9293
component.dispose();
9394
component = new firebaseui.auth.ui.page.PasswordSignUp(
9495
null,
96+
true,
9597
goog.bind(
9698
firebaseui.auth.ui.element.FormTestHelper.prototype.onSubmit,
9799
formTestHelper));
@@ -117,7 +119,7 @@ function testInitialFocus_newPassword() {
117119
return;
118120
}
119121
component.dispose();
120-
component = createComponent('http://localhost/tos', 'John Doe');
122+
component = createComponent('http://localhost/tos', true, 'John Doe');
121123
assertEquals(
122124
component.getNewPasswordElement(),
123125
goog.dom.getActiveElement(document));
@@ -144,7 +146,7 @@ function testFocusToNewPasswordOnNameEnter() {
144146

145147
function testSubmitOnNewPasswordEnter() {
146148
component.dispose();
147-
component = createComponent(null); // No ToS.
149+
component = createComponent(null, true); // No ToS.
148150
goog.testing.events.fireKeySequence(
149151
component.getNewPasswordElement(), goog.events.KeyCodes.ENTER);
150152
formTestHelper.assertSubmitted();
@@ -157,6 +159,7 @@ function testPasswordSignUp_pageEvents() {
157159
// Initialize component.
158160
component = new firebaseui.auth.ui.page.PasswordSignUp(
159161
null,
162+
true,
160163
goog.bind(
161164
firebaseui.auth.ui.element.FormTestHelper.prototype.onSubmit,
162165
formTestHelper));

javascript/widgets/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ firebaseui.auth.widget.Config.prototype.getTosUrl = function() {
295295
};
296296

297297

298-
/** @return {bool} Whether the display name should be displayed. */
298+
/** @return {boolean} Whether the display name should be displayed. */
299299
firebaseui.auth.widget.Config.prototype.getShouldDisplayName = function() {
300-
return /** @type {bool} */ (this.config_.get('shouldDisplayName'));
300+
return /** @type {boolean} */ (this.config_.get('shouldDisplayName'));
301301
};
302302

303303

0 commit comments

Comments
 (0)