Passing a HTML element/reference with Cypress #29660
Unanswered
muniz95
asked this question in
Component Testing
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone.
I'm setting a component test class for an Angular component that accepts a string/TemplateRef as @input:
@Input('cardHeader') cardHeader: string | TemplateRef<any> = '';
In my test case I can evaluate the test passing a string without any problem:
cy.mount(CardComponent, { componentProperties: { cardHeader: 'Test' } })
I saw that TestBed has a method to create an instance for a given component; is there anything similar in Cypress? And if no, how can I pass an element to a component?
Beta Was this translation helpful? Give feedback.
All reactions