You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this tool along with storybook, but there are some times when I'd like to disable failures for certain stories. For instance, I have a story of an input element, which is intended to be used together with a label, but my stories show the input by itself. I'd like to silence the error Ensures every form element has a label for these stories. Is there a way I can do this currently, and if not, is it a feature you might consider adding?
The text was updated successfully, but these errors were encountered:
If you're utilizing the test-runner they wrote a blog post about recently, then I haven't yet found a "clean" solution but it is doable albeit there's some manual work involved:
asyncpostRender(page,context){constdisabledRulesForStory=()=>{switch(context.id){case"fields-input--basic-usage": // <-- You have to manually keep track of the stories and which rules to ignore for eachreturn{"label": {enabled: false}}default:
return{}}}constviolations=awaitgetViolations(page,"#root",{detailedReport: true,rules: {
...disabledRulesForStory()},});// ...Rest of your code}
I'm using this tool along with storybook, but there are some times when I'd like to disable failures for certain stories. For instance, I have a story of an
input
element, which is intended to be used together with a label, but my stories show the input by itself. I'd like to silence the errorEnsures every form element has a label
for these stories. Is there a way I can do this currently, and if not, is it a feature you might consider adding?The text was updated successfully, but these errors were encountered: