This is a library designed to feel like the official aurelia/testing library but instead it is built to work with Cypress. The purpose of this module is so that components can be visually unit tested as close to reality as possible, ie. in a browser rather than in NodeJS with a virtual DOM.
viewModel
isundefined
in Cypress if a component has been annotated with @containerless.- Appending elements directly to the
document.body
may not work as expected due to the fact that Cypress sandboxes it's test code and application code into seperate iframes as it was not currently designed for you to import components directly. To work around this limitation there is currently some code in place which overrides the functionality of the following methods to redirect calls to the main application iframe.document.addEventListener
- This was added to fix
click.delegate
so that click events were processed as expected.
- This was added to fix
document.appendChild
document.querySelector
document.querySelectorAll
document.body.appendChild
document.body.querySelector
document.body.querySelectorAll
- Gleb Bahmutov for their Cypress React Unit Test library. It helped me figure out how to get styles working quickly.