File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
app/code/Magento/Customer/view/frontend/web/js
dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/view Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ define([
24
24
messageContainer = messageContainer || globalMessageList ;
25
25
let customerLoginUrl = 'customer/ajax/login' ;
26
26
27
- if ( window . authenticationPopup && window . authenticationPopup . customerLoginUrl ) {
28
- customerLoginUrl = window . authenticationPopup . customerLoginUrl ;
27
+ if ( loginData . customerLoginUrl ) {
28
+ customerLoginUrl = loginData . customerLoginUrl ;
29
29
}
30
30
31
31
return storage . post (
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ define([
80
80
formDataArray . forEach ( function ( entry ) {
81
81
loginData [ entry . name ] = entry . value ;
82
82
} ) ;
83
-
83
+ loginData [ 'customerLoginUrl' ] = window . authenticationPopup . customerLoginUrl ;
84
84
if ( formElement . validation ( ) &&
85
85
formElement . validation ( 'isValid' )
86
86
) {
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ define(['squire'], function (Squire) {
30
30
customerRegisterUrl : 'register_url' ,
31
31
customerForgotPasswordUrl : 'forgot_password_url' ,
32
32
autocomplete : 'autocomplete_flag' ,
33
- baseUrl : 'base_url'
33
+ baseUrl : 'base_url' ,
34
+ customerLoginUrl :'customer_login_url'
34
35
} ;
35
36
36
37
injector . mock ( mocks ) ;
@@ -81,7 +82,8 @@ define(['squire'], function (Squire) {
81
82
82
83
expect ( obj . login ( null , event ) ) . toBeFalsy ( ) ;
83
84
expect ( mocks [ 'Magento_Customer/js/action/login' ] ) . toHaveBeenCalledWith ( {
84
- username : 'customer'
85
+ username : 'customer' ,
86
+ customerLoginUrl : 'customer_login_url'
85
87
} ) ;
86
88
} ) ;
87
89
} ) ;
You can’t perform that action at this time.
0 commit comments