feat: implement new parameters api, make cli --help work and notify user on page errors that occured while processing stories for Steps - #73
Merged
Conversation
Hotell
commented
Feb 17, 2025
| const tags: string = story["tags"]; | ||
| if(tags && tags.includes("no-screenshot")){ | ||
| console.log(`StoryId: ${id} has tag no-screenshot hence skipping.`); | ||
| if (tags && tags.includes("no-screenshot")) { |
| stories = Object.values(rawStoriesObject.stories ?? {}); | ||
| console.log(`${stories.length} stories found`); | ||
| console.warn('NOTE: stories Steps will not be processed') | ||
| console.warn("NOTE: stories Steps will not be processed"); |
| let regex = new RegExp(excludePattern); | ||
| if(regex.test(ssNamePrefix)){ | ||
| console.log(`Skipping story ${ssNamePrefix} as it matches exclude pattern ${excludePattern}`); | ||
| if (regex.test(ssNamePrefix)) { |
| type: "string", | ||
| }) | ||
| .option("browsers", { | ||
| alias: "browsers", |
Author
There was a problem hiding this comment.
these were clashing with actual args preventing proper --help output
Hotell
marked this pull request as ready for review
February 17, 2025 17:23
…any story processing occurred
…undefined check when obtaining steps via findSteps fn
Hotell
commented
Feb 19, 2025
| let steps = findSteps(res); | ||
| if (steps !== "undefined" && steps !== null) { | ||
| const steps = findSteps(res); | ||
| if (steps !== undefined && steps !== null) { |
Author
There was a problem hiding this comment.
this fixes false positives regarding story missing Steps definition. this was previously always setting steps property. with this fix .step will exist on processed story only IFF a story really defines Steps
…ely if any story processing occurred
1 task
This was referenced Feb 27, 2025
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.
Fixes:
false positives about
Stepspresence and executionfixes false positives regarding story missing Steps definition.
Previously
.stepsproperty was always set onstorybecause of logical error.With this fix
.stepwill exist on processed story only IFF a story really definesStepsproper
--helpoutputFeatures:
new API for defining
StepsThis API should be used going forward as it supports various use-cases and Storybook version beyond v8
Before:
After:
new CLI flag
--bailOnStoriesErrorfails SW process in 2 places if enables:
1. errors occurred while processing stories -> it will exit process immediately.
2. errors occurred during creating snapshots images per story
new notification about issues that occurred while processing stories for Steps
previously these issues were consumed within page evaluation which consumer never received
improved Steps execution logging
Before:
After:
Related Issues
makeStylesapi is used directly for story rendering fluentui#33861