We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c6abc4 commit 59283d0Copy full SHA for 59283d0
docs/en/api/selectors.md
@@ -23,8 +23,6 @@ You can also use combinators:
23
24
Vue components are also valid selectors.
25
26
-`vue-test-utils` uses the `name` property to search the instance tree for matching Vue components.
27
-
28
```js
29
// Foo.vue
30
@@ -44,6 +42,15 @@ expect(wrapper.is(Foo)).toBe(true)
44
42
45
43
## Find Option Object
46
+### Name
+
47
+Using a find option object, `vue-test-utils` allows for selecting elements by `name` on wrapper components.
48
49
+```js
50
+const buttonWrapper = wrapper.find({ name: 'my-button' })
51
+buttonWrapper.trigger('click')
52
+```
53
54
### Ref
55
56
Using a find option object, `vue-test-utils` allows for selecting elements by `$ref` on wrapper components.
0 commit comments