Skip to content

Refactor `Wrapper#find` for `Wrapper#findComponent`

Eduardo Sanz García requested to merge eduardosanz/use-findComponent-4 into master

What does this MR do and why?

Part 4. This is the final part of this series:

These MRs above have to be merged before, because in this MR I enable a warning so that the incorrect use of Wrapper#find is not reintroduced (see second commit).

Automatic conversion of Vue Test Util Wrapper#find for Wrapper#findComponent when applied to a Vue component.

From the Vue Test Util page: https://v1.test-utils.vuejs.org/api/wrapper/#find

Deprecation warning

Using find to search for a Component is deprecated and will be removed.
Use findComponent instead. The find method will continue to work for
finding elements using any valid selector.

Screenshots or screen recordings

No change. It only affects tests.

How to set up and validate locally

All Jest specss pass: yarn jest

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Sanz García

Merge request reports

Loading