Skip to content

[Testing:Autograding] Add non-zero depends_on_points test#12635

Merged
bmcutler merged 10 commits into
Submitty:mainfrom
Mohit23490:cypress-test-nonzero-depends-on-points
Jun 19, 2026
Merged

[Testing:Autograding] Add non-zero depends_on_points test#12635
bmcutler merged 10 commits into
Submitty:mainfrom
Mohit23490:cypress-test-nonzero-depends-on-points

Conversation

@Mohit23490

@Mohit23490 Mohit23490 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?
Fixes #11696

The existing locked gradeable test only covers eg_depends_on_points: 0.
This PR adds tests for non-zero depends_on_points to ensure autograding
point thresholds are correctly enforced.

What is the New Behavior?

  1. Added gradeable locked_homework_points with eg_depends_on_points: 7
    in testing.yml
  2. Added Cypress test verifying users without 7+ points cannot access
    the locked gradeable
  3. Added Cypress test verifying users with 7+ points can access it

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Run: recreate_sample_courses --test_only_grading
  2. Run: npx cypress run --spec "site/cypress/e2e/Cypress-Feature/grades.spec.js"
  3. Verify new test "Should test locked gradeable with non-zero depends_on_points" passes

Automated Testing & Documentation
Cypress end-to-end test added in grades.spec.js.
No documentation changes needed.

Other information
Not a breaking change. No migrations needed. No security concerns.

@IDzyre

IDzyre commented Mar 24, 2026

Copy link
Copy Markdown
Member

Hey @Mohit23490 , thank you for your contribution!

Please update your PR title to use our required format
[<TYPE>:<MODULE>] <SUBJECT>, where <SUBJECT> is 40 chars max.
See also: https://submitty.org/developer/getting_started/make_a_pull_request

Please also use our PR description template:
https://raw.githubusercontent.com/Submitty/Submitty/refs/heads/main/.github/PULL_REQUEST_TEMPLATE.md
and ensure the information in your description is accurate.

Also, please address merge conflicts.

Once this pull request adheres to all Submitty conventions, we may run the CI on your PR. If the CI passes we will proceed with a full review.

@Mohit23490 Mohit23490 changed the title Add Cypress test for non-zero depends_on_points (#11696) [Testing:Autograding] Add non-zero depends_on_points test Mar 25, 2026
@Mohit23490
Mohit23490 force-pushed the cypress-test-nonzero-depends-on-points branch from eaa0a19 to 4d448e8 Compare March 25, 2026 01:40
@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.64%. Comparing base (4e310f6) to head (aa0f92f).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12635      +/-   ##
============================================
- Coverage     21.64%   21.64%   -0.01%     
  Complexity     9861     9861              
============================================
  Files           268      268              
  Lines         36918    36920       +2     
  Branches        495      495              
============================================
  Hits           7990     7990              
- Misses        28437    28439       +2     
  Partials        491      491              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.01% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.70% <ø> (-0.01%) ⬇️
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.

@Mohit23490

Copy link
Copy Markdown
Contributor Author

The JavaScript lint errors on lines 2-12 of gradeable.spec.js appear to be pre-existing indentation issues in the upstream code and are not related to my changes. My changes only add a new test at the end of the file.
I have fixed the YAML lint error (missing newline at end of testing.yml).
Should I fix the pre-existing lint issues in gradeable.spec.js as part of this PR or should that be addressed separately?

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.

Is there a reason your deleting existing tests instead of just adding new tests to the end?

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.

Thank you for the review.
I apologize for the confusion — this was unintentional during merge conflict resolution. I will restore the existing tests immediately.

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.

Apologies again for the confusion. The existing tests were accidentally removed during merge conflict resolution — it was not intentional. I have now restored all original tests and added my new test at the end of the file without modifying anything else.
I am also working on setting up Submitty locally to be able to run and verify the tests before pushing. I will make sure this does not happen again

@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Apr 13, 2026
@dandrecollins07-ctrl dandrecollins07-ctrl self-assigned this Jun 8, 2026

@dandrecollins07-ctrl dandrecollins07-ctrl 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.

Verified that the new test correctly covers non-zero eg_depends_on_points behavior using a 7-point threshold instead of the original 0. Fixed lint issues encountered during review. Approving.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jun 8, 2026
@bmcutler
bmcutler requested a review from williamschen23 June 8, 2026 18:50
@automateprojectmangement automateprojectmangement Bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Jun 8, 2026
@github-actions github-actions Bot removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jun 9, 2026

@williamschen23 williamschen23 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.

looks good, tested and worked well

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jun 9, 2026

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

One small request for the Cypress test portion.

Comment thread site/cypress/e2e/Cypress-Gradeable/gradeable.spec.js Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Jun 9, 2026

@mattLif mattLif 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.

Tested Cypress test and it passed and cleaned up successfully. Code for test and sample data look good, and it seems like the requested changes have been made. Only CI that fail are flaky on main. I'm approving.

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

The test looks good overall, but didn't pass on CI (Cypress-Gradeable is failing the gradeable.spec, at the "depends_on_points", may be a CI vs local issue, but I haven't tested locally).

@bmcutler
bmcutler merged commit 5831685 into Submitty:main Jun 19, 2026
23 of 26 checks passed
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.

Cypress test for non-zero autograding lock

6 participants