Skip to content

Upgrade Cypress#4849

Merged
joshhanley merged 27 commits into
mainfrom
josh/upgrade-cypress
Jul 1, 2026
Merged

Upgrade Cypress#4849
joshhanley merged 27 commits into
mainfrom
josh/upgrade-cypress

Conversation

@joshhanley

Copy link
Copy Markdown
Collaborator

The Scenario

On Apple Silicon Macs without Rosetta installed, Alpine's Cypress test suite cannot run with the current Cypress 7 dependency.

Cypress installs an x64 macOS binary, then fails during the smoke test with a bad CPU type error.

Command failed with Unknown system error -86: /Users/josh/Library/Caches/Cypress/7.7.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test
spawn Unknown system error -86

The Problem

Alpine currently depends on Cypress ^7.0.0, which resolves to Cypress 7.7.0.

Cypress 7 does not provide a native macOS ARM binary. On Apple Silicon machines without Rosetta, the installed x64 Cypress binary cannot be executed.

Cypress 8 and 9 have the same limitation, so the branch needs to continue through to Cypress 10.2 or newer to get native Apple Silicon support.

The Solution

Upgrade Cypress from 7 to 10 on this branch.

The commits are split by major version so CI can validate each step independently. Cypress was upgraded from 7 to 8 first, then from 8 to 9, then from 9 to 10.

The Cypress 10 config migration is included with the Cypress 10 commit, keeping each step focused on the compatibility work required for that major.

cypress-plugin-tab 2 has a regression in how it handles cancelled Tab key events. When focus-trap prevents the default Tab event and moves focus itself, v2 restores focus to the original element, undoing focus-trap's wrap-around behaviour.

Keep the existing 1.x plugin while upgrading Cypress to 10 so Alpine's focus-trap tests continue to exercise the expected focus behaviour until the plugin regression is fixed upstream.
@joshhanley
joshhanley force-pushed the josh/upgrade-cypress branch from f29feea to d8eb254 Compare June 25, 2026 00:57
Cypress 12 re-queries aliases when resolving them. The mouse modifier test was re-aliasing subjects from aliases with the same names, which creates a self-referential alias chain and overflows the stack.

Query the checkboxes directly for the final assertions instead of overwriting the existing aliases.
@joshhanley joshhanley changed the title Upgrade Cypress from 7 to 10 Upgrade Cypress Jun 25, 2026
Cypress 13 serializes CSS custom property declarations with a space after the colon in raw style attributes. Update the expected serialized style strings to match.
Cypress 15's CI browser can leave the observed element just outside the 100px root margin after scrollIntoView(). Use a wider margin in the test so it still verifies margin parsing without depending on borderline scroll geometry.
@calebporzio

Copy link
Copy Markdown
Collaborator

this ready to get out of draft and merged?

@joshhanley

Copy link
Copy Markdown
Collaborator Author

@calebporzio not quite. That one test kept failing, so it's the only test enabled in CI at the moment. I'll finishing it today, then I will merge it.

@joshhanley
joshhanley marked this pull request as ready for review July 1, 2026 02:05
@joshhanley
joshhanley merged commit 8c26b53 into main Jul 1, 2026
2 checks passed
@joshhanley
joshhanley deleted the josh/upgrade-cypress branch July 1, 2026 02:17
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