[Testing:TAGrading] Add E2E Overridden Banner Tests#12535
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12535 +/- ##
=========================================
Coverage 21.66% 21.66%
Complexity 9637 9637
=========================================
Files 268 268
Lines 36222 36222
Branches 487 487
=========================================
Hits 7847 7847
Misses 27892 27892
Partials 483 483
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.
Hey @Khine12, thank you for your contribution!
Can we add this to grade_override.spec.js instead of creating a new file? Please also adjust the title to match our conventions. I suggest [Testing:TAGrading]. You can also remove the issue number from the title since you are linking it in the description to get it below the 40 char limit.
|
@JManion32 Thank you for the feedback! I've moved the tests to grade_override.spec.js and updated the title to match your conventions. |
|
Hi @JManion32, I've addressed your feedback — moved the tests to grade_override.spec.js and updated the title convention. The Cypress (UI) failure is in docker_ui.spec.js which is unrelated to this PR's changes. Could you please take another look when you get a chance? |
Since you changed the files, could you update the description to be accurate? |
828a94e to
ce9b2cc
Compare
| cy.logout(); | ||
| cy.login('student'); | ||
| cy.visit(['sample', 'gradeable', gradeable]); | ||
| cy.get('[data-testid="overridden-grades-student-banner"]').should('be.visible'); |
There was a problem hiding this comment.
We should probably also test the content of the banner too
There was a problem hiding this comment.
"Done! I've added content assertions to also verify the banner text."
There was a problem hiding this comment.
"Done! The banner content assertions have now been added to verify the text."
|
The banner content assertions have been added to line 64 to address the review feedback. |
|
The 3 failing checks (Cypress Autograding-Tutorial, Gradeable, UI) are unrelated to my changes — my PR only touches |
|
@JManion32 or @IDzyre can one of you please re-review and approve if its ready to go? |
IDzyre
left a comment
There was a problem hiding this comment.
Test looks good, assuming that it is adding all that needs to be tested for the issue.
### Why is this Change Important & Necessary? Closes Submitty#11811 The overridden banner had no E2E tests. This PR adds test coverage to verify the banner displays correctly for both graders and students. ### What is the New Behavior? - Added `data-testid="overridden-grades-student-banner"` to `SubmitBox.twig` - Added tests to existing `grade_override.spec.js` to verify the student-facing overridden banner appears on the submission page ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Run: `npx cypress run --headless --browser electron --spec cypress/e2e/Cypress-Feature/grade_override.spec.js` 2. All tests should pass. ### Automated Testing & Documentation Tests added to `grade_override.spec.js` verifying the student banner appears when a grade override exists. ### Other information No breaking changes. No migrations needed. No security concerns. --------- Co-authored-by: Barb Cutler <[email protected]>
### Why is this Change Important & Necessary? Closes Submitty#11811 The overridden banner had no E2E tests. This PR adds test coverage to verify the banner displays correctly for both graders and students. ### What is the New Behavior? - Added `data-testid="overridden-grades-student-banner"` to `SubmitBox.twig` - Added tests to existing `grade_override.spec.js` to verify the student-facing overridden banner appears on the submission page ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Run: `npx cypress run --headless --browser electron --spec cypress/e2e/Cypress-Feature/grade_override.spec.js` 2. All tests should pass. ### Automated Testing & Documentation Tests added to `grade_override.spec.js` verifying the student banner appears when a grade override exists. ### Other information No breaking changes. No migrations needed. No security concerns. --------- Co-authored-by: Barb Cutler <[email protected]>
### Why is this Change Important & Necessary? Closes Submitty#11811 The overridden banner had no E2E tests. This PR adds test coverage to verify the banner displays correctly for both graders and students. ### What is the New Behavior? - Added `data-testid="overridden-grades-student-banner"` to `SubmitBox.twig` - Added tests to existing `grade_override.spec.js` to verify the student-facing overridden banner appears on the submission page ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Run: `npx cypress run --headless --browser electron --spec cypress/e2e/Cypress-Feature/grade_override.spec.js` 2. All tests should pass. ### Automated Testing & Documentation Tests added to `grade_override.spec.js` verifying the student banner appears when a grade override exists. ### Other information No breaking changes. No migrations needed. No security concerns. --------- Co-authored-by: Barb Cutler <[email protected]>
Why is this Change Important & Necessary?
Closes #11811
The overridden banner had no E2E tests. This PR adds test coverage
to verify the banner displays correctly for both graders and students.
What is the New Behavior?
data-testid="overridden-grades-student-banner"toSubmitBox.twiggrade_override.spec.jsto verify the student-facing overridden banner appears on the submission pageWhat steps should a reviewer take to reproduce or test the bug or new feature?
npx cypress run --headless --browser electron --spec cypress/e2e/Cypress-Feature/grade_override.spec.jsAutomated Testing & Documentation
Tests added to
grade_override.spec.jsverifying the student banner appears when a grade override exists.Other information
No breaking changes. No migrations needed. No security concerns.