As of today Cypress released v7.0.0 with support for "Component Testing" (alpha - no longer experimental).
This will allow us to perform the equivalent of 'unit tests' from within the real browser environment.
Benefits of [Cypress-based] Component tests
- An optimal bridge between traditional unit tests (Jest) and traditional e2e tests (Cypress)
- Isolated component tests should run much quicker than Full App e2e tests
- Allow for catching inconcistencies between browsers at the component level
- May be easier to write or reason about in some instances
(than comparable Jest [JSDOM-based] unit tests) when testing:
- visual results (CSS or [real] DOM)
- viewport-size constrained components
- natural human interaction (click, keypress, etc)
- Works with Vue2, Vue3, and TypeScript
- Cypress mount() is based on vue-test-utils
- I'm suspecting we might need a Cypress plugin which implements Quasar mountFactory() the way Cypress needs
- This Cypress issue asks about usage with Quasar, it could be a good place to start working with Cypress to ensure functionality with Quasar's wrapper
Additional Cypress 'Component Testing' release literature
Release Blog Post
Vue specific docs
Vue specific example code
General Component Testing Guide
Cypress Vue Docs
I believe it will take some prep and examples from Quasar side to support Cypress Component Testing.
The Quasar Team (ping @IlCallo) is currently focused on the transition to Vue3 so it may be some time before this can be fully addressed.
I wanted to at least put it on the roadmap as a milestone to discuss and work towards when time is permitting.
As of today Cypress released v7.0.0 with support for "Component Testing" (alpha - no longer experimental).
This will allow us to perform the equivalent of 'unit tests' from within the real browser environment.
Benefits of [Cypress-based] Component tests
(than comparable Jest [JSDOM-based] unit tests) when testing:
Additional Cypress 'Component Testing' release literature
Release Blog Post
Vue specific docs
Vue specific example code
General Component Testing Guide
Cypress Vue Docs
I believe it will take some prep and examples from Quasar side to support Cypress Component Testing.
The Quasar Team (ping @IlCallo) is currently focused on the transition to Vue3 so it may be some time before this can be fully addressed.
I wanted to at least put it on the roadmap as a milestone to discuss and work towards when time is permitting.