Skip to content

Instructions and commands for running cypress on Windows+WSL2#37

Merged
penyaskito merged 6 commits intodrupal-canvas:mainfrom
penyaskito:cypress-on-linux-and-wsl2
Feb 25, 2026
Merged

Instructions and commands for running cypress on Windows+WSL2#37
penyaskito merged 6 commits intodrupal-canvas:mainfrom
penyaskito:cypress-on-linux-and-wsl2

Conversation

@penyaskito
Copy link
Contributor

@penyaskito penyaskito commented Mar 12, 2025

Instructions and commands for running on Windows+WSL2.
I've been successful using this.

On my different tries I did some other steps that might or not might affected this, so would be great if we could get someone to test this. In any case it should not break anything for MacOS, the only working system at the moment, so should be safe to accept.

Also I would expect this to work on Linux too. But don't have a system to verify :-/

@penyaskito
Copy link
Contributor Author

penyaskito commented Mar 15, 2025

I was able to test this from scratch in a different computer and it worked like a charm.
I think if anyone can validate that this doesn't break macosx, is safe to merge.
Also curious if we can find someone to test in linux.

@penyaskito penyaskito changed the title Instructions and commands for running on Windows+WSL2 Instructions and commands for running cypress on Windows+WSL2 Mar 24, 2025
@TravisCarden
Copy link
Collaborator

TravisCarden commented Mar 26, 2025

Hey, @penyaskito. I appreciate all your contributions! I've been deallocated from this project for the time-being... Do you think you could recruit someone from #experience-builder on Drupal Slack to test and verify that it still works on macOS with your changes? If you throw out a request for anyone who can to test it on Linux that would be great, but I'm also find with just adding a note indicating that it might work but hasn't been tested on it.

Copy link
Collaborator

@TravisCarden TravisCarden left a comment

Choose a reason for hiding this comment

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

A few little changes. Also, this needs a rebase as of #41.

open -a XQuartz
# Give it a moment to start up.
sleep 2
# Running on WSL2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like someone with experience with WSL2 to review this.

@omarlopesino
Copy link
Contributor

I tested this with Linux (Ubuntu 24.04.3 LTS) and it works for me. Apart from updating experience_builder to canvas, I've had to add a docker-compose.web-extras.yml file to .ddev configuration:

services:
  web:
    environment:
      - DISPLAY=:0
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix

Additionally, I've had to install chrome into the container, because electron was crashing at every try. After that, the cypress window opens on my host and runs the tests. Thanks!

If this gets merged I could open a PR with specific configuration for linux.

penyaskito and others added 4 commits February 5, 2026 19:10
Fix docs structure and warnings.

Co-authored-by: Travis Carden <travis.carden@gmail.com>
@penyaskito penyaskito force-pushed the cypress-on-linux-and-wsl2 branch from 279e244 to e93ef63 Compare February 5, 2026 18:11
@penyaskito
Copy link
Contributor Author

Rebased

@penyaskito penyaskito dismissed TravisCarden’s stale review February 25, 2026 08:32

Outdated, we verified this works even for Linux now.

@penyaskito
Copy link
Contributor Author

I'm going to merge and release this as-is. It's been reported to work on WSL2 by me, I've tested it doesn't break on Mac, and we got positive feedback even for Linux.

@omarlopesino I'd appreciate a new PR for the config that was required to run cypress on linux. I can report cypress on electron also breaks for me often, specially when trying to play the "welcome" video. If I'm quick enough to skip the video it works.

@penyaskito penyaskito merged commit 381287e into drupal-canvas:main Feb 25, 2026
2 checks passed
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