Skip to content

Commit

Permalink
Merge pull request #511 from broad-well/develop
Browse files Browse the repository at this point in the history
Make "Actual exit status" always black when return code is not checked
  • Loading branch information
james-perretta authored Apr 23, 2024
2 parents 1ba1153 + 83093ed commit bb20474
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
{'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}]"
// return_code_correct can be null so we need to check for false
// to avoid showing the red warning color when it's null
&& ag_test_command_result.return_code_correct === false}]"
>{{ag_test_command_result.actual_return_code}}</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ describe('Correctness feedback tests', () => {
);
});

test('Actual return code available, return code not checked', async () => {
ag_test_command_result.expected_return_code = ag_cli.ExpectedReturnCode.none;
ag_test_command_result.return_code_correct = null;
// https://github.com/eecs-autograder/autograder.io/issues/30
// Any status should be correct, including 2
ag_test_command_result.actual_return_code = 2;
let wrapper = await make_wrapper();
let section_wrapper = wrapper.findComponent({ref: 'actual_return_code'});
expect(section_wrapper.find('.actual-return-code-incorrect').exists()).toBe(false);
});

test('Expected return code available, return code not checked', async () => {
ag_test_command_result.expected_return_code = ag_cli.ExpectedReturnCode.none;
let wrapper = await make_wrapper();
Expand Down

0 comments on commit bb20474

Please sign in to comment.