@@ -142,7 +142,7 @@ define([
142
142
expect ( $ . fn . formKey ) . toBeDefined ( ) ;
143
143
} ) ;
144
144
145
- it ( 'widget set value to input[form_key]' , function ( ) {
145
+ it ( 'widget gets value of input[form_key]' , function ( ) {
146
146
spyOn ( $ . mage . cookies , 'get' ) . and . returnValue ( 'FAKE_COOKIE' ) ;
147
147
148
148
wdContainer . formKey ( {
@@ -153,7 +153,7 @@ define([
153
153
expect ( inputContainer . val ( ) ) . toBe ( 'FAKE_COOKIE' ) ;
154
154
} ) ;
155
155
156
- it ( 'widget set value to input[form_key]' , function ( ) {
156
+ it ( 'widget sets value to input[form_key] in case it empty ' , function ( ) {
157
157
spyOn ( $ . mage . cookies , 'set' ) ;
158
158
spyOn ( $ . mage . cookies , 'get' ) ;
159
159
@@ -166,7 +166,7 @@ define([
166
166
expect ( inputContainer . val ( ) ) . toEqual ( jasmine . any ( String ) ) ;
167
167
} ) ;
168
168
169
- it ( 'widget exist on load on body' , function ( done ) {
169
+ it ( 'widget exists on load on body' , function ( done ) {
170
170
$ ( function ( ) {
171
171
expect ( $ ( 'body' ) . data ( 'mageFormKey' ) ) . toBeDefined ( ) ;
172
172
done ( ) ;
@@ -204,7 +204,7 @@ define([
204
204
expect ( $ . fn . comments ) . not . toHaveBeenCalled ( ) ;
205
205
} ) ;
206
206
207
- it ( '_searchPlaceholders called only when HTML_COMMENTS' , function ( ) {
207
+ it ( '_searchPlaceholders is called only when HTML_COMMENTS' , function ( ) {
208
208
var nodes ;
209
209
spyOn ( $ . mage . cookies , 'get' ) . and . returnValue ( 'FAKE_VERSION_COOKIE' ) ;
210
210
spyOn ( $ . mage . pageCache . prototype , '_searchPlaceholders' ) ;
@@ -221,7 +221,7 @@ define([
221
221
expect ( $ . mage . pageCache . prototype . _searchPlaceholders ) . toHaveBeenCalledWith ( nodes ) ;
222
222
} ) ;
223
223
224
- it ( '_searchPlaceholders return Array of blocks' , function ( ) {
224
+ it ( '_searchPlaceholders returns Array of blocks' , function ( ) {
225
225
var nodes ,
226
226
searches ;
227
227
spyOn ( $ . mage . cookies , 'get' ) . and . returnValue ( 'FAKE_VERSION_COOKIE' ) ;
@@ -240,24 +240,7 @@ define([
240
240
expect ( searches [ 0 ] . closeElement . nodeType ) . toBeDefined ( ) ;
241
241
} ) ;
242
242
243
- it ( '_searchPlaceholders called only when HTML_COMMENTS' , function ( ) {
244
- var nodes ;
245
- spyOn ( $ . mage . cookies , 'get' ) . and . returnValue ( 'FAKE_VERSION_COOKIE' ) ;
246
- spyOn ( $ . mage . pageCache . prototype , '_searchPlaceholders' ) ;
247
-
248
- wdContainer
249
- . html ( '<!-- BLOCK FAKE_BLOCK -->FAKE_TEXT<!-- /BLOCK FAKE_BLOCK -->' )
250
- . pageCache ( ) ;
251
-
252
- nodes = wdContainer . comments ( ) ;
253
- expect ( nodes . length ) . toEqual ( 2 ) ;
254
-
255
- expect ( $ . mage . cookies . get ) . toHaveBeenCalled ( ) ;
256
- expect ( $ . mage . pageCache . prototype . _searchPlaceholders ) . toHaveBeenCalled ( ) ;
257
- expect ( $ . mage . pageCache . prototype . _searchPlaceholders ) . toHaveBeenCalledWith ( nodes ) ;
258
- } ) ;
259
-
260
- it ( '_replacePlaceholder append HTML after sibling node' , function ( ) {
243
+ it ( '_replacePlaceholder appends HTML after sibling node' , function ( ) {
261
244
var replacer ,
262
245
searcher ,
263
246
placeholders ,
@@ -280,7 +263,7 @@ define([
280
263
expect ( wdContainer . html ( ) ) . toEqual ( '<span></span><span>FAKE_HTML</span>' ) ;
281
264
} ) ;
282
265
283
- it ( '_replacePlaceholder prepend HTML if no sibling' , function ( ) {
266
+ it ( '_replacePlaceholder prepends HTML if no sibling' , function ( ) {
284
267
var replacer ,
285
268
searcher ,
286
269
placeholders ,
0 commit comments