Storyshots: fix broken storyshots with angular#23555
Merged
valentinpalkovic merged 2 commits intostorybookjs:nextfrom Jul 24, 2023
Merged
Storyshots: fix broken storyshots with angular#23555valentinpalkovic merged 2 commits intostorybookjs:nextfrom
valentinpalkovic merged 2 commits intostorybookjs:nextfrom
Conversation
valentinpalkovic
approved these changes
Jul 24, 2023
This was referenced Jul 24, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23549
What I did
Storyshots + angular is broken in 7.x due to the ngModule metadata not being passed, which results in a crash here due to
analyzedMetadatabeingundefined:storybook/code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts
Line 61 in 379e484
Fixed by correcting the type to no longer make
analyzedMetadataoptional and passing in the expectedanalyzedMetadatavalue.How to test
I applied this patch locally to our application and verified that storyshots with angular now work.
Checklist
MIGRATION.MD
Maintainers
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]