Skip to content

Commit 43965ed

Browse files
author
Oleksandr Dubovyk
committed
MAGETWO-62966: Storefront Password Strength validator ignores case when Email = Password
- Fixed falling tests
1 parent 27be394 commit 43965ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Customer/view/frontend/web/js/password-strength-indicator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ define([
7474
displayScore = 0;
7575
} else {
7676
this.options.cache.input.rules('add', {
77-
'password-not-equal-to-email': this.options.cache.email.val()
77+
'password-not-equal-to-user-name': this.options.cache.email.val()
7878
});
7979

8080
if (password.toLowerCase() === this.options.cache.email.val().toLowerCase()) {

dev/tests/js/jasmine/tests/lib/mage/validation.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ define([
165165
});
166166

167167
describe('Validation of the password against the user name', function () {
168-
it("rejects data, if password is the same as user name", function() {
168+
it('rejects data, if password is the same as user name', function() {
169169
var password = $('<input id="password" type="password" value="EmailPasswordTheSame" />');
170170
var email = $('<input id="email" type="email" value="EmailPasswordTheSame" />');
171171

@@ -174,7 +174,7 @@ define([
174174
)).toEqual(false);
175175
});
176176

177-
it("approves data, if password is different from user name", function() {
177+
it('approves data, if password is different from user name', function() {
178178
var password = $('<input id="password" type="password" value="SomePassword" />');
179179
var email = $('<input id="email" type="email" value="SomeEmail" />');
180180

0 commit comments

Comments
 (0)