Skip to content

chore(deps): PR #279 fixes + upgrade cypress 13 → 15#281

Merged
jxjj merged 4 commits into
developfrom
chore/update-cypress
Apr 15, 2026
Merged

chore(deps): PR #279 fixes + upgrade cypress 13 → 15#281
jxjj merged 4 commits into
developfrom
chore/update-cypress

Conversation

@jxjj

@jxjj jxjj commented Apr 14, 2026

Copy link
Copy Markdown
Contributor
  • addresses copilot feedback for PR update dev docker config and readme #279 (I mistakenly merged before fixing these).
  • Fixes a local-dev macOS bug where npm run cypress:open launched the UI but the spec list never loaded — consistent with Cypress 13's bundled Electron 27 misbehaving on recent macOS. Cypress 15 ships Electron 37, which renders correctly.
  • Bumps cypress 13.17 → 15.13, cypress-real-events 1.13 → 1.15, and eslint-plugin-cypress 4.1 → 6.3.

jxjj added 3 commits April 14, 2026 15:16
Fixes flagged in PR 279 Copilot review:
- drop duplicate EXPOSE and redundant distro ruby packages from Dockerfile
- clean up ruby-build install.sh invocation (PREFIX env, not bogus positional)
- mysqladmin healthcheck uses --password= so empty DB_PASSWORD doesn't prompt
- drop redundant gem install bundler / bundle install from CI (ruby/setup-ruby
  with bundler-cache handles it)
- document E2E as a throwaway container (docker compose run --rm) so it doesn't
  collide with the main web service

Dev stack improvements (more Sail-like):
- APP_PORT / FORWARD_DB_PORT support for port forwarding (defaults preserved)
- faster db healthcheck polling (interval 2s, start_period 30s) so the stack
  comes up in seconds instead of waiting 30s between probes
- wait-on promoted to a real devDependency (no more npx download on every run)
  and bumped timeout to 60s to absorb rails boot
- cypress_cache named volume so the cypress binary persists and is shared with
  throwaway run --rm containers
- README documents combined dev + test DB setup, explains headless vs
  interactive E2E, and covers a host-side test server sidecar on port 3001 for
  running cypress interactively without flipping RAILS_ENV on the dev stack
- cypress: ^13.17.0 → ^15.13.1
- cypress-real-events: ^1.13.0 → ^1.15.0
- eslint-plugin-cypress: ^4.1.0 → ^6.3.0

Primary motivation: Cypress 13's bundled Electron ~27 hangs on
the spec-list screen when opening the UI on recent macOS. Cypress
15 ships Electron 37, which resolves the hang. Also picks up two
majors of upstream fixes and security updates.

Node 22 already satisfies Cypress 15's Node 20+ requirement. No
code changes were required: no use of removed/renamed APIs
(cy.exec().code, SelectorPlayground, Webpack preprocessor, etc.),
and the only cy.origin spec (happyPath.cy.ts) crosses registrable
domains so Cypress 14's injectDocumentDomain default flip is a
no-op for us.
The cypress_cache volume previously hardcoded /home/vscode/.cache/Cypress.
The Dockerfile already parameterizes the container user via ARG USERNAME
(default vscode), but compose couldn't follow if anyone ever built with
--build-arg USERNAME=other.

Using ${USERNAME:-vscode} directly would collide with the host shell's
$USERNAME (typically set to the host user on Linux), so we use the
APP_USER namespace instead — matches the existing APP_PORT /
FORWARD_DB_PORT pattern in this compose file.

Default behavior unchanged: /home/vscode/.cache/Cypress.
@jxjj jxjj self-assigned this Apr 14, 2026
@jxjj
jxjj requested a review from Copilot April 14, 2026 23:58
@jxjj jxjj changed the title chore(deps): upgrade cypress 13 → 15 (+ dev-stack cleanup) chore(deps): PR #279 fixes + upgrade cypress 13 → 15 Apr 14, 2026
@jxjj
jxjj marked this pull request as ready for review April 15, 2026 00:00
@jxjj
jxjj requested a review from cmcfadden April 15, 2026 00:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the end-to-end testing toolchain (Cypress 13 → 15) and adjusts the dev Docker stack/docs to support newer macOS/Electron behavior and smoother local Cypress usage.

Changes:

  • Bump cypress, cypress-real-events, and eslint-plugin-cypress (plus lockfile updates) and add wait-on as an explicit dev dependency.
  • Tweak Dockerfile/compose for dev ergonomics (Ruby install cleanup, Cypress cache volume/ownership, port/env var normalization, improved DB healthcheck).
  • Update README Cypress guidance, including a “run Cypress from host against a containerized test server” workflow.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Upgrades Cypress-related deps; increases wait-on timeout; adds wait-on dependency.
package-lock.json Lockfile updates for Cypress 15 and transitive dependency changes.
docker/Dockerfile Ruby install cleanup and pre-creates Cypress cache directory for correct volume ownership.
docker-compose.yml Improves DB healthcheck, parameterizes ports, and adds a named Cypress cache volume.
README.md Updates dev/test instructions, especially for running Cypress headlessly vs from host.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread README.md
Comment thread README.md
- bind test:e2e:server to 0.0.0.0:3000 so host-run Cypress can reach
  the containerized Rails server through published port mapping
- clarify README: headless container section now covers both devcontainer
  shell and docker compose exec workflows
@jxjj
jxjj merged commit f512e42 into develop Apr 15, 2026
2 checks passed
@jxjj
jxjj deleted the chore/update-cypress branch April 15, 2026 01:43
@jxjj jxjj mentioned this pull request Apr 15, 2026
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.

3 participants