-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with angular storybook host component #21
Comments
Any updates @jogelin? It's not clear to me why this issue would only manifest when testing Storybook w/ Cypress and not when viewing the Storybook directly. |
I was able to work around the issue by calling |
@diminutivesloop no updates on my side. I am also just using the normal |
I'm not very familiar with Angular or this error. Thanks for the reproduction. I can look into it when I have time. It is good there is a workaround. State is supposed to be reset between load calls, so that is failing as well... |
@NicholasBoll The state reset issue may be specific to my setup. I use Angular components and they have some state that isn't controlled by the Storybook knobs. |
@jogelin ...was seeing the same issue on my end. Adding "import 'cypress-storybook/angular';" to the cypress test seemed to resolve the issue (at least for my setup). Hoping its a similar fix for you as well... |
@ahaskell35 I tried again and I still have an error My configurations: preview.js
chip-list.spec.ts
support.ts
chip-list.stories.ts
what do I miss ? |
I have an issue when not using the component directly in storybook configuration but when using it inside a template:
I reproduce it on my fork: https://github.com/jogelin/cypress-storybook/tree/issue_with_host_component
I didn't investigate yet but this is an Angular error. If you don't know Angular,
@NgModule.entryComponents
was used to declare components that could be generated dynamically, on-demand like dialog or snack bar.This is deprecated since Angular 10 with Ivy but it seems Storybook doesn't use Ivy.
It is using an
AppComponent
inside@storybook/angular
when we use a template approach and it seems it needs to be declared in theentryComponents
when using your implementation of component loading....I don't know why because I never had to do that in my storybookThe text was updated successfully, but these errors were encountered: