Skip to content

Commit fdb2581

Browse files
committed
docs: add note about VueWrapper and DOMWrapper
1 parent a5f9a30 commit fdb2581

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/guide/essentials/conditional-rendering.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ test('renders a profile link', () => {
4848
})
4949
```
5050

51-
If `get()` does not return an element matching the selector, it will raise an error, and your test will fail.
51+
If `get()` does not return an element matching the selector, it will raise an error, and your test will fail. `get()` returns a `DOMWrapper` if an element is found. A `DOMWrapper` is a thin wrapper around the DOM element that implements the [Wrapper API](/api/#wrapper-methods) - that's why we are able to do `profileLink.text()` and access the text. You can access the raw element using the `element` property.
52+
53+
There is another type of wrapper - a `VueWrapper` - that is returned from [`getComponent`](/api/#getcomponent) that works in the same manner.
5254

5355
## Using `find()` and `exists()`
5456

0 commit comments

Comments
 (0)