Skip to content

[Bugfix:Testing] Fix specs that hardcode term#12978

Merged
williamjallen merged 7 commits into
mainfrom
fix-term-specs
Jul 2, 2026
Merged

[Bugfix:Testing] Fix specs that hardcode term#12978
williamjallen merged 7 commits into
mainfrom
fix-term-specs

Conversation

@roye2

@roye2 roye2 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

What is the New Behavior?

some cypress specs are using hardcoded term values and fail when the testing term rolls over.

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

updated the failing specs to no longer hardcode the term and instead use the function in utils.js to dynamically get the semester.

Automated Testing & Documentation

Other information

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jul 1, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.35%. Comparing base (01f8919) to head (1140947).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12978   +/-   ##
=========================================
  Coverage     21.35%   21.35%           
  Complexity     9990     9990           
=========================================
  Files           275      275           
  Lines         37317    37317           
  Branches        505      505           
=========================================
  Hits           7969     7969           
  Misses        28847    28847           
  Partials        501      501           
Flag Coverage Δ
autograder 21.16% <ø> (ø)
js 1.98% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.41% <ø> (ø)
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.

@roye2 roye2 closed this Jul 1, 2026
@roye2
roye2 force-pushed the fix-term-specs branch from 871e135 to d96835d Compare July 1, 2026 18:23
@roye2 roye2 reopened this Jul 1, 2026
@roye2 roye2 changed the title Fix term specs [Bugfix:Testing] Fix specs that hardcode term Jul 1, 2026
@roye2
roye2 marked this pull request as ready for review July 1, 2026 18:33

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

Code looks good to me and should be merged on priority.

My suggestion for a follow-up PR -
We should definitely prevent future contributors to hardcode the term in future. Could we add a linting rule to catch this? Somewhere in site/eslint.config.js perhaps??

@roye2

roye2 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Code looks good to me and should be merged on priority.

My suggestion for a follow-up PR - We should definitely prevent future contributors to hardcode the term in future. Could we add a linting rule to catch this? Somewhere in site/eslint.config.js perhaps??

Thanks for the review! That is a very good idea. We could definitely add a linting rule about this, just pattern match s** and f** and warn about it. I will add that to my notes of things to work on.

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor

Code looks good to me and should be merged on priority.
My suggestion for a follow-up PR - We should definitely prevent future contributors to hardcode the term in future. Could we add a linting rule to catch this? Somewhere in site/eslint.config.js perhaps??

Thanks for the review! That is a very good idea. We could definitely add a linting rule about this, just pattern match s** and f** and warn about it. I will add that to my notes of things to work on.

Should we throw a warning or an error? I am afraid warning might go unnoticed. We must find a clever and a robust way to do so if we plan to throw error.

@roye2

roye2 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Code looks good to me and should be merged on priority.
My suggestion for a follow-up PR - We should definitely prevent future contributors to hardcode the term in future. Could we add a linting rule to catch this? Somewhere in site/eslint.config.js perhaps??

Thanks for the review! That is a very good idea. We could definitely add a linting rule about this, just pattern match s** and f** and warn about it. I will add that to my notes of things to work on.

Should we throw a warning or an error? I am afraid warning might go unnoticed. We must find a clever and a robust way to do so if we plan to throw error.

Sorry I wasn't clearer. What I meant to say is hardcoding the term should fail the Javascript Lint CI. If there was an eslint rule about it that would be the result, and of course if you ran eslint locally you would see the same thing.

@williamjallen
williamjallen merged commit 5b9585a into main Jul 2, 2026
49 of 52 checks passed
@williamjallen
williamjallen deleted the fix-term-specs branch July 2, 2026 23:46
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.

3 participants