Skip to content

Commit 4e02adb

Browse files
author
Mohan Ahuja
committed
ACP2E-98: Customer with global account sharing has to login again in the secondary website when guest checkout is disabled
- Fixing static test failures
1 parent 0c508f6 commit 4e02adb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/code/Magento/Customer/view/frontend/web/js/customer-global-session-loader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ define([
1010
'use strict';
1111

1212
return function () {
13+
var customer;
14+
1315
// When the session is available, this customer menu will be available
1416
if ($('.customer-menu').length > 0) {
15-
var customer = customerData.get('customer');
17+
customer = customerData.get('customer');
1618

1719
customerData.getInitCustomerData().done(function () {
1820
// Check if the customer data is set in local storage, if not reload data from server

dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/customer-global-session-loader.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ define([
5050
customer({});
5151
});
5252

53-
afterAll(function() {
53+
afterAll(function () {
5454
$('#customerMenu').remove();
5555
});
5656

@@ -64,15 +64,15 @@ define([
6464
return deferred.promise();
6565
});
6666
customer({
67-
firstname: "First Name"
67+
firstname: 'First Name'
6868
});
6969
customerSessionLoader();
7070

7171
expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('customer');
7272
expect(mocks['Magento_Customer/js/customer-data'].reload).not.toHaveBeenCalled();
7373
});
7474

75-
it('Tests that customer data reloads if customer first name data is not there but wait until promise resolved', function () {
75+
it('Tests that customer data reloads after init, if customer first name is not there', function () {
7676
spyOn(mocks['Magento_Customer/js/customer-data'], 'getInitCustomerData').and.callFake(function () {
7777
deferred = $.Deferred();
7878

0 commit comments

Comments
 (0)