feat: Display passing test cases for valid schemas #179
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.
Feat: Display Passing Test Cases for Valid Schemas
What kind of change does this PR introduce?
Issue Number
Closes #69
Screenshots/videos
Screenshot of the updated output view showing the list of passed test cases:
If relevant, did you update the documentation?
N/A
Summary
This change enhances the user feedback mechanism by displaying all passing test cases when a user's schema is successfully validated.
Previously, a correct submission only showed a generic
"Valid Schema!"
message, hiding the details of the tests that were run. This update ensures that users can see a detailed breakdown of all the test cases they passed, providing better positive reinforcement and a more complete learning experience.Summary of Changes
client-function.ts
Modified
validateCode()
to pass thetestCaseResults
to the reducer on successful validation, instead of discarding them.reducers.ts
Updated the
outputReducer
to correctly store the successful test results in the application state.Output.tsx
Adjusted the
Output
component to render theTestCasesWindow
for valid schemas, displaying the list of all passed tests below the success message.TestCaseWindow.tsx
"Invalid Schema!"
header conditional, so it only appears if there are actual failed tests.FailedTestCasesWindow
toTestCasesWindow
to better reflect its new role.Does this PR introduce a breaking change?
No — this PR updates the output view to show passing test cases.
It also applies automated formatting and lint fixes to the entire codebase.