Skip to content

feat: Display passing test cases for valid schemas #179

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tanay-nagde
Copy link

Feat: Display Passing Test Cases for Valid Schemas

What kind of change does this PR introduce?

  • Feature
  • Refactoring

Issue Number

Closes #69

Screenshots/videos

Screenshot of the updated output view showing the list of passed test cases:

Screenshot 2025-07-21 142941

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 the testCaseResults 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 the TestCasesWindow for valid schemas, displaying the list of all passed tests below the success message.

  • TestCaseWindow.tsx

    • Made the "Invalid Schema!" header conditional, so it only appears if there are actual failed tests.
    • Renamed the component from FailedTestCasesWindow to TestCasesWindow 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.


Updates the output view to show passing test cases. Also applies automated formatting and lint fixes to the entire codebase.
@tanay-nagde
Copy link
Author

@JeelRajodiya please review my code .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show passing (all) testcases when the user submits a correct schema
1 participant