-
Notifications
You must be signed in to change notification settings - Fork 124
/
documentation.yml
17 lines (13 loc) · 1.21 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
toc:
- name: assert.dom()
description: |
Once installed the DOM element assertions are available at `assert.dom(...).*`:
**Parameters**
- `target` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element))** A CSS selector that can be used to find elements using [`querySelector()`](https://developer.mozilla.org/de/docs/Web/API/Document/querySelector), or an [HTMLElement][] (Not all assertions support both target types.) (optional, default `rootElement` or `document`)
- `rootElement` **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) | [Document](https://developer.mozilla.org/en-US/docs/Web/API/Document) | [ShadowRoot](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot) | [null](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null))?** The root element of the DOM in which to search for the `target` (optional, defaults `document` when `null` or not provided)
**Examples**
```javascript
test('the title exists', function(assert) {
assert.dom('#title').exists();
});
```