Skip to content

Updated Cypress to 14.5.4 and fixed end-to-end tests - #1833

Merged
david-yz-liu merged 2 commits into
masterfrom
update-cypress
Nov 14, 2026
Merged

david-yz-liu merged 2 commits into
masterfrom
update-cypress

Conversation

@david-yz-liu

@david-yz-liu david-yz-liu commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

Updates Cypress to the latest 14.x release (14.5.4) and gets the end-to-end tests running again. Nobody had been running them, and they had fallen out of date with the app.

Cypress config

  • Migrated legacy cypress.json to cypress.config.js
  • Added cypress/support/e2e.js, which hides the disclaimer popup before each page load. The popup covered part of the graph and caused "element is covered" failures.
  • Removed /cypress/support from .gitignore, added the Cypress global to the ESLint config, and gitignored cypress/screenshots and cypress/videos.

Test fixes

  • Updated test IDs: course codes now have session suffixes (csc209 → csc209h1), and some bool and hybrid nodes have changed.
  • Edges out of hybrid nodes use database-generated IDs (e.g. h3586->csc456h1), so edge_spec.js now looks up the hybrid's ID at runtime. Its hover tests now use csc209h1 → h(csc209h1) → csc456h1, since the hybrid they used before (h62 → csc343) no longer exists.
  • Added the missing cy.visit to the Course Node block. These tests had relied on state left over from earlier tests.
  • Aligned the two overridden-prerequisite hover tests in node_spec.js with Node.test.js: hovering a child of an overridden course does not mark that course's unmet prerequisites as missing.
  • The Info Box test now stubs /course with a fixture (cypress/fixtures/csc108-course-info.json).

CI

  • The build job now runs the end-to-end tests. On failure, it uploads screenshots and the server log as a cypress-failures artifact. This adds about 45 seconds to CI.

Docs

  • Added pnpm run cypress:run and pnpm run cypress:open scripts, plus a README section on running the end-to-end tests.

Type of Change

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
✨ New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests) X
📦 Dependency update (change that updates a dependency) X
🔧 Internal (change that only affects developers or continuous integration) X

Checklist

Before opening your pull request:

  • I have performed a self-review of my changes.
  • I have added tests for my changes, if applicable.
  • I have updated the project documentation, if applicable.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CI checks have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

🤖 Generated with Claude Code

- Migrated the legacy cypress.json config (unsupported since Cypress 10) to cypress.config.js
- Updated outdated test IDs (course codes now have session suffixes, e.g. csc209h1) and graph structure
- Looked up hybrid edge IDs at runtime, since they are database-generated
- Added a support file that hides the disclaimer popup, which blocked interactions
- Added missing cy.visit for test isolation, and aligned overridden-prereq hover assertions with Node.test.js
- Added cypress:run/cypress:open scripts and README instructions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

coveralls commented Nov 14, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 43622453243

Coverage decreased (-0.02%) to 61.596%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4303
Covered Lines: 2702
Line Coverage: 62.79%
Relevant Branches: 1009
Covered Branches: 570
Branch Coverage: 56.49%
Branches in Coverage %: Yes
Coverage Strength: 158.01 hits per line

💛 - Coveralls

- Run Cypress in the CI build job against a server with the graphs database
- Cache the Cypress binary and upload screenshots/server log on failure
- Stub /course in the Info Box test with a fixture, since course info
  otherwise requires scraping the Arts & Science Calendar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@david-yz-liu
david-yz-liu merged commit db798cd into master Nov 14, 2026
6 checks passed
@david-yz-liu
david-yz-liu deleted the update-cypress branch November 14, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants