File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app/code/Magento/Catalog/view/frontend/web/js/product/storage
dev/tests/js/jasmine/tests/app/code/Magento/Catalog/frontend/js/product/storage Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ define([
149149 if ( data . items && ids . length ) {
150150 //we can extend only items
151151 data = data . items ;
152- this . data ( _ . extend ( data , currentData ) ) ;
152+ this . data ( _ . extend ( currentData , data ) ) ;
153153 }
154154 } ,
155155
Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ define([
119119 obj . data = function ( data ) {
120120 if ( ! data ) {
121121 return {
122- dataProperty : 'dataValue'
122+ existingKey1 : 'existingKey1Value' ,
123+ existingKey2 : 'existingKey2Value'
123124 } ;
124125 }
125126
@@ -130,14 +131,16 @@ define([
130131 it ( 'check calls "providerHandler" method with data' , function ( ) {
131132 var data = {
132133 items : {
133- key : 'value'
134+ newKey : 'newKeyValue' ,
135+ existingKey2 : 'existingKey2NewValue'
134136 }
135137 } ;
136138
137139 obj . providerHandler ( data ) ;
138140
139- expect ( obj . result . key ) . toBe ( 'value' ) ;
140- expect ( obj . result . dataProperty ) . toBe ( 'dataValue' ) ;
141+ expect ( obj . result . existingKey1 ) . toBe ( 'existingKey1Value' ) ;
142+ expect ( obj . result . existingKey2 ) . toBe ( 'existingKey2NewValue' ) ;
143+ expect ( obj . result . newKey ) . toBe ( 'newKeyValue' ) ;
141144 } ) ;
142145 it ( 'check calls "providerHandler" method without data' , function ( ) {
143146 obj . providerHandler ( { } ) ;
You can’t perform that action at this time.
0 commit comments