Const
Cleans up all rendered test HTML by removing the actual wrapper nodes. Common use case is at the end of each test.
Cleans up all defined fixtures by removing the actual wrapper nodes. Common usecase is at the end of each test.
Clicks the center of the given element.
Deletes all text that has been typed into the given <input>
element.
Repeatedly tries to focus the given element until it is focused.
Moves the mouse to the center of the given element.
Renders a string or TemplateResult and puts it in the DOM via a fixtureWrapper.
Uses fixture
from @open-wc/testing-helpers
.
Renders a string/TemplateResult and puts it in the DOM via a fixtureWrapper. By default fixture awaits the elements "update complete" Promise.
el.updateComplete
;el.componentOnReady()
;If none of those specfic Promise hooks are found, it will wait for one frame via
await nextFrame()
.
Note: this does not guarantee that the element is done rendering - it just waits for the next JavaScript tick.
Either a string or lit-html TemplateResult
Optional
options: FixtureOptionsA Promise that will resolve to the first child of the rendered DOM
Focus the given element and then type the given string.
Types the given string as if it were input by a keyboard. This doesn't try to type into any element in particular, it'll go wherever the current focus is, if any.
A suite of web test helpers. This is only accessible within a browser runtime. If accessed outside of a browser runtime, it'll be an Error instead of a collection of test helpers.