-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
In order to support Angular for Component Testing, we need to add an Angular mounting package. We already have an npm/angular package, so replacing/updating this package would be best (it was never officially published).
The responsibilities of this package are:
- Mount a compiled Angular component into the DOM
- Provide options for customizing the mounted components behavior (ngModule, providers, directives etc...)
Angular users are already familiar with unit-testing Angular components. Angular provides testing support out of the box, so leveraging the existing APIs would be great as users who are familiar with unit testing would be able to quickly pick up Cypress Angular component testing. The caveat here is that Angular uses a custom compiler, so we should investigate if using this API would produce any differences in components mounted in dev vs Cypress.
This package should be copied to the cli package so that users are able to import this package via import { mount } from "cypress/angular".
Requirements:
- Should mount Angular components via an exported
mountfunction - Should allow Angular components to be customized in order to provide the component with the proper context (ngModule, providers, directives etc..)
- Should be copied to the
clipackage to support import fromcypress/angular - Should add system tests proving that Angular components can be mounted
There is an external package created by our very own @jordanpowell88.
There is active discussion on versioning CT mounting libs that will affect how we publish and version this package