File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ define([
16
16
sectionConfig ,
17
17
originalGetJSON ,
18
18
originalReload ,
19
- originalInitNamespaceStorage ,
20
19
originalEach ,
21
20
obj ;
22
21
@@ -72,32 +71,19 @@ define([
72
71
73
72
beforeEach ( function ( ) {
74
73
originalReload = obj . reload ;
75
- originalInitNamespaceStorage = $ . initNamespaceStorage ;
76
74
spyOn ( obj , 'reload' ) . and . returnValue ( true ) ;
77
- spyOn ( $ , 'initNamespaceStorage' ) . and . callFake ( function ( name ) {
78
- var ns = {
79
- localStorage : {
80
- cookie : false ,
81
- _ns : name
82
- } ,
83
- sessionStorage : {
84
- cookie : false ,
85
- _ns : name
86
- }
87
- } ;
88
75
89
- $ . namespaceStorages [ name ] = ns ;
76
+ //Init storage api library
77
+ $ . initNamespaceStorage ( 'mage-cache-storage' ) . localStorage ;
78
+ $ . initNamespaceStorage ( 'mage-cache-storage-section-invalidation' ) . localStorage ;
90
79
91
- return ns ;
92
- } ) ;
93
80
spyOn ( dataProvider , 'getFromStorage' ) ;
94
81
spyOn ( storage , 'keys' ) . and . returnValue ( [ 'section' ] ) ;
95
82
spyOn ( storageInvalidation , 'keys' ) . and . returnValue ( [ 'section' ] ) ;
96
83
} ) ;
97
84
98
85
afterEach ( function ( ) {
99
86
obj . reload = originalReload ;
100
- $ . initNameSpaceStorage = originalInitNamespaceStorage ;
101
87
$ . namespaceStorages = { } ;
102
88
} ) ;
103
89
You can’t perform that action at this time.
0 commit comments