[Bugfix:Developer] Cypress test for TA Grading#12272
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12272 +/- ##
=========================================
Coverage 21.69% 21.69%
Complexity 9617 9617
=========================================
Files 268 268
Lines 36113 36113
Branches 478 478
=========================================
Hits 7835 7835
Misses 27804 27804
Partials 474 474
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
JManion32
left a comment
There was a problem hiding this comment.
Everything works good, but you have to revert any changes the test made to the sample course after completion.
This is an important convention in E2E tests, especially for Submitty. Our Cypress tests use the sample course when we run them locally. If your test modifies data in that course and doesn't revert it, other tests may fail as well.
I tested locally and rubric_grading passed with a 3/3 initially, but only received a 1/3 for every subsequent test (with the only one passing being your test).
To fix, you just need to add more to the bottom of your test that reverts any changes you made to the sample course.
JManion32
left a comment
There was a problem hiding this comment.
The Cypress test is self-contained, and prevents the issue from occurring in the future. Great work!
Why is this Change Important & Necessary?
Fixes #12220
Previously, there was an issue #12083, where the collapsed view of a graded component for a TA did not match the student's view. This was resolved by PR #12131 .
What is the New Behavior?
To ensure this problem remains fully resolved, this Cypress test logs in as a TA, assigns a mark that is not marked "show to all students", and then collapses the component. The test verifies that only the assigned mark, and the show-to-all mark, are the only two visible in this graded component.
What steps should a reviewer take to reproduce or test the bug or new feature?
Review the code and make sure test is passing.
Automated Testing & Documentation
Other information
This is not a breaking change.