-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: implement new parameters api, make cli --help work and notify user on page errors that occured while processing stories for Steps #73
base: storybook7
Are you sure you want to change the base?
Conversation
@@ -100,19 +111,23 @@ export class StoryWrightProcessor { | |||
itemsForBatch.map(async (story: object) => { | |||
const id: string = story["id"]; | |||
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")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outcome of running prettier -w
@@ -65,7 +76,7 @@ export class StoryWrightProcessor { | |||
} = require(storiesJsonPath); | |||
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outcome of running prettier -w
// regex test to check if exclude pattern is present in ssNamePrefix | ||
let regex = new RegExp(excludePattern); | ||
if(regex.test(ssNamePrefix)){ | ||
console.log(`Skipping story ${ssNamePrefix} as it matches exclude pattern ${excludePattern}`); | ||
if (regex.test(ssNamePrefix)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outcome of running prettier -w
@@ -26,7 +36,6 @@ const args = argv | |||
type: "string", | |||
}) | |||
.option("browsers", { | |||
alias: "browsers", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were clashing with actual args preventing proper --help
output
…any story processing occurred
…undefined check when obtaining steps via findSteps fn
let steps = findSteps(res); | ||
if (steps !== "undefined" && steps !== null) { | ||
const steps = findSteps(res); | ||
if (steps !== undefined && steps !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Fixes:
false positives about
Steps
presence and executionfixes false positives regarding story missing Steps definition.
Previously
.steps
property was always set onstory
because of logical error.With this fix
.step
will exist on processed story only IFF a story really definesSteps
proper
--help
outputFeatures:
new API for defining
Steps
This API should be used going forward as it supports various use-cases and Storybook version beyond v8
Before:
After:
new CLI flag
--bailOnStoriesError
fails 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
makeStyles
api is used directly for story rendering fluentui#33861