diff --git a/docs/api/wrapper/find.md b/docs/api/wrapper/find.md index 5d4bb8934..fa9ab48e5 100644 --- a/docs/api/wrapper/find.md +++ b/docs/api/wrapper/find.md @@ -32,4 +32,24 @@ const fooRef = wrapper.find({ ref: 'foo' }) expect(fooRef.is(Foo)).toBe(true) ``` +- **Note:** + + - When chaining `find` calls together, only DOM selectors can be used + +```js +let button + +// Will throw an error +button = wrapper.find({ ref: 'testButton' }) +expect(button.find(Icon).exists()).toBe(true) + +// Will throw an error +button = wrapper.find({ ref: 'testButton' }) +expect(button.find({ name: 'icon' }).exists()).toBe(true) + +// Will work as expected +button = wrapper.find({ ref: 'testButton' }) +expect(button.find('.icon').exists()).toBe(true) +``` + See also: [get](./get.md).