Skip to content

[Testing:TAGrading] Add E2E Overridden Banner Tests#12535

Merged
williamjallen merged 11 commits into
Submitty:mainfrom
Khine12:e2e-overridden-banner-tests
Mar 23, 2026
Merged

[Testing:TAGrading] Add E2E Overridden Banner Tests#12535
williamjallen merged 11 commits into
Submitty:mainfrom
Khine12:e2e-overridden-banner-tests

Conversation

@Khine12

@Khine12 Khine12 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

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?

  • 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.

@codecov

codecov Bot commented Mar 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (3f846d7) to head (2dc2404).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JManion32 JManion32 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 5, 2026
@Khine12 Khine12 changed the title [Feature:Testing] Add E2E tests for Overridden Banner #11811 [Testing:TAGrading] Add E2E Overridden Banner Tests Mar 5, 2026
@Khine12

Khine12 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@JManion32 Thank you for the feedback! I've moved the tests to grade_override.spec.js and updated the title to match your conventions.

@Khine12 Khine12 changed the title [Testing:TAGrading] Add E2E Overridden Banner Tests [TAGrading:Testing] Add E2E Overridden Banner Tests Mar 5, 2026
@Khine12

Khine12 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

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?
Thank you!

Comment thread site/cypress/e2e/Cypress-Feature/grade_override.spec.js Outdated
@IDzyre

IDzyre commented Mar 6, 2026

Copy link
Copy Markdown
Member

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? Thank you!

Since you changed the files, could you update the description to be accurate?

@Khine12 Khine12 changed the title [TAGrading:Testing] Add E2E Overridden Banner Tests [Testing:TAGrading] Add E2E Overridden Banner Tests Mar 6, 2026
@Khine12
Khine12 force-pushed the e2e-overridden-banner-tests branch from 828a94e to ce9b2cc Compare March 6, 2026 23:06
cy.logout();
cy.login('student');
cy.visit(['sample', 'gradeable', gradeable]);
cy.get('[data-testid="overridden-grades-student-banner"]').should('be.visible');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably also test the content of the banner too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"Done! I've added content assertions to also verify the banner text."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

They haven't been added.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"Done! The banner content assertions have now been added to verify the text."

@Khine12

Khine12 commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

The banner content assertions have been added to line 64 to address the review feedback.
Additionally, the CI / Cypress (Gradeable) failure is a pre-existing issue unrelated to this PR. The same test fails on main with the identical error: expected '<td.align-left>' to contain 'Joe'. This appears to be a flaky test in the existing test suite.

@Khine12
Khine12 requested a review from JManion32 March 11, 2026 23:04
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 11, 2026
@Khine12
Khine12 requested a review from IDzyre March 11, 2026 23:04
@IDzyre IDzyre moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 13, 2026
@Khine12

Khine12 commented Mar 14, 2026

Copy link
Copy Markdown
Contributor Author

The 3 failing checks (Cypress Autograding-Tutorial, Gradeable, UI) are unrelated to my changes — my PR only touches site/cypress/e2e/Cypress-TAGrading/overridden_status_banner.spec.js. The Autograding-Tutorial failure is a Docker connectivity issue (0 / 5 submissions graded), the Gradeable failure is a flaky visibility issue in hotkey.spec.js, and the UI failure appears to be a pre-existing issue. Could a maintainer rerun the failing checks?

@bmcutler bmcutler moved this from Awaiting Maintainer Review to In Review in Submitty Development Mar 22, 2026
@bmcutler

Copy link
Copy Markdown
Member

@JManion32 or @IDzyre can one of you please re-review and approve if its ready to go?

@IDzyre IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test looks good, assuming that it is adding all that needs to be tested for the issue.

@williamjallen
williamjallen dismissed JManion32’s stale review March 23, 2026 23:42

Requested changes addressed.l

@williamjallen
williamjallen merged commit 6073b20 into Submitty:main Mar 23, 2026
25 checks passed
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 25, 2026
### 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]>
@Khine12
Khine12 deleted the e2e-overridden-banner-tests branch March 28, 2026 08:26
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Mar 29, 2026
### 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]>
GarvitKhandelwal31 pushed a commit to GarvitKhandelwal31/Submitty that referenced this pull request Apr 14, 2026
### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Overridden Banner E2E tests

5 participants