-
Notifications
You must be signed in to change notification settings - Fork 366
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
fix(sandpack-tests): introduce hideTestsAndSupressLogs
prop
#775
fix(sandpack-tests): introduce hideTestsAndSupressLogs
prop
#775
Conversation
…ptions to hide verbose and watch buttons
@ubeytd is attempting to deploy a commit to the CodeSandbox Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 250f798:
|
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.
Thank you! It looks promising.
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.
It looks good! Just a few tweaks and it's ready to go
Awesome! Thanks for guiding me all the way 💪🏻 |
hideTestsAndSupressLogs
prop
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
What kind of change does this pull request introduce?
This pull request introduces a new feature to
SandpackProvider
options.Specifically, it adds the ability to hide test files and suppress their output from being logged to the console when a test fails.
Additionally, it allows for the hiding of the
verbose
andwatch
buttons from the test console and prevents opening test files with test links from the console.What is the current behavior?
Currently, there is no option to hide test files or suppress their output when they fail in the
SandpackProvider
options. And, there is no option to hide theverbose
orwatch
buttons from the tests console.Also when the user clicks on the test file path, even if it is hidden, the editor will open the test file.
What is the new behavior?
With this feature, a
hideTestsAndSupressLogs
option is added to theSandpackProvider
options.When set to true, this option hides test files and suppresses their output from being logged to the console when a test fails.
Also, it will prevent opening test files in the editor, if the user clicks on the path link on the console.
Additionally,
hideVerboseButton
andhideWatchButton
options are added to theSandpackTests
component to allow the hiding of theverbose
andwatch
buttons from the tests console.What steps did you take to test this?
To test this feature, the following steps were taken:
HiddenTests
component to Storybook.hideTestsAndSupressLogs
to true and ran a test that was expected to fail.hideVerboseButton
andhideWatchButton
to true and confirmed that the buttons were hidden from the tests console.Checklist
Closes #768
Thank you for considering this feature. 🤗
I believe it will be useful for the users of
codesandbox/sandpack
who want to hide tests completely.Please let me know if you would like me to add & change code/docs for this feature 💪🏻