Skip to content
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

Make "Actual exit status" always black when return code is not checked #511

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

broad-well
Copy link
Contributor

This PR addresses eecs-autograder/autograder.io#30.

When applying classes to the Actual exit status code, it changes the check for ag_test_command_result.return_code_correct from !ag_test_command_result.return_code_correct to ag_test_command_result.return_code_correct === false so that the incorrect return code class is no longer applied if ag_test_command_result.return_code_correct is null.

I have included a new test that verifies this functionality. Without the change above, the test fails.

Screenshots

Before

Screenshot 2024-04-20 at 00-36-35 Autograder io

After

Screenshot 2024-04-20 at 00-36-56 Autograder io

@james-perretta Please review this at your earliest convenience. Thank you!

@@ -33,7 +33,7 @@
{'actual-return-code-correct': ag_test_command_result !== null
&& ag_test_command_result.return_code_correct,
'actual-return-code-incorrect': ag_test_command_result !== null
&& !ag_test_command_result.return_code_correct}]"
&& ag_test_command_result.return_code_correct === false}]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a short comment reminding that return_code_correct can be null? Just since this kind of explicit bool check doesn't show up anywhere else in the codebase.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@james-perretta Added in latest commit

@james-perretta james-perretta merged commit bb20474 into eecs-autograder:develop Apr 23, 2024
1 check passed
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.

3 participants