-
-
Notifications
You must be signed in to change notification settings - Fork 39
Display all passing test cases upon valid schema #155
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
base: main
Are you sure you want to change the base?
Conversation
@JeelRajodiya please review this PR |
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.
Pull Request Overview
This PR updates the display logic for test cases based on schema validity. It ensures that all test cases are marked as passed when a valid schema is provided and updates the UI accordingly.
- Modified TestCasesWindow to support the isValidSchema prop and normalize test case results.
- Updated Output to conditionally render the TestCasesWindow component and adjusted error handling.
- Replaced unsafe DOM access in scroll functions with proper null checks and improved equality comparisons.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
app/components/TestCaseWindow/TestCaseWindow.tsx | Updated component to display all passing test cases upon valid schema; improved safe access in scrolling and normalized test case results. |
app/components/Output/Output.tsx | Adjusted component to use the updated TestCasesWindow and improved error comparison and error message handling. |
Comments suppressed due to low confidence (1)
app/components/TestCaseWindow/TestCaseWindow.tsx:58
- [nitpick] The component name 'TestCasesWindow' does not match the file name 'TestCaseWindow.tsx'; consider renaming the file or component to maintain naming consistency.
export default function TestCasesWindow({
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.
Great job for implementing the changes @techmannih! The feature is working as expected, but there is an edge case, which needs to be fixed.
Here is how you can reproduce the edge case:
- Validate a lesson
- Move to the next lesson
- Come back to the lesson,
- without modifying the code, hit validate, the code was saved in the editor so it is valid. but you will see the valid code message instead of all the test cases as passing. (view below gif for your reference)
@JeelRajodiya Correct, got your point! But this behavior was already there before the changes in this PR — meaning the last one doesn't reset even earlier. I think it’s not related to my changes. please once check Tour website |
@techmannih that is okay, but we need to make the feature without any bugs. you can fix that problem in this PR. |
Hi @JeelRajodiya , Might be this issue is same as mentioned in this issue . |
@AQIB-NAWAB yeah this is same issue, are you working on this issue? |
What kind of change does this PR introduce?
Display all passing test cases upon valid schema
Issue Number: