File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,28 @@ describe('App', () => {
276
276
})
277
277
` ` `
278
278
279
+ ### No more ` ref` selector in ` findAllComponents`
280
+
281
+ The ` ref` syntax is not supported anymore in ` findAllComponents` . You could set a ` data- test` attribute instead and update the selector:
282
+
283
+ ` Component .vue ` :
284
+
285
+ ` ` ` diff
286
+ < template>
287
+ - < FooComponent v- for = " number in [1, 2, 3]" : key= " number" ref= " number" >
288
+ + < FooComponent v- for = " number in [1, 2, 3]" : key= " number" data- test= " number" >
289
+ {{ number }}
290
+ < / FooComponent>
291
+ < / template>
292
+ ` ` `
293
+
294
+ ` Component .spec .js ` :
295
+
296
+ ` ` ` diff
297
+ - wrapper .findAllComponents ({ ref: ' number' })
298
+ + wrapper .findAllComponents (' [data-test="number"]' )
299
+ ` ` `
300
+
279
301
## Test runners upgrade notes
280
302
281
303
> Vue Test Utils is framework agnostic - you can use it with whichever test runner you like.
You can’t perform that action at this time.
0 commit comments