elgentos / magento2-cypress-testing-suite

A community-driven Cypress testing suite for Magento 2
MIT License
172 stars 37 forks source link

Missing dependencies when running the module inside docker #53

Closed BorisovskiP closed 2 years ago

BorisovskiP commented 2 years ago

We currently use https://github.com/davidalger/warden for our projects. Running npx cypress run --spec ./cypress/integration/path/to/some.spec.js leads to the following error:

Your system is missing the dependency: Xvfb

Install Xvfb and run Cypress again.

Read our documentation on dependencies for more information:

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------

Error: spawn Xvfb ENOENT

----------

Platform: linux-x64 (CentOS - 8
)
Cypress Version: 10.3.0

I see two possible solutions to this:

  1. Require these packages directly into warden so that each installation will have them
  2. Update the README.md to include this so that people running into this issues should know how to fix it.
Vinai commented 2 years ago

The installation instructions from the cypress website work:

apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
BorisovskiP commented 2 years ago

@Vinai true, this indeed fixed our issue. This issue is more of updating the documentation for people who use warden. The correct link for the warden fix is https://docs.cypress.io/guides/getting-started/installing-cypress#CentOS since warden uses CentOS

Vinai commented 2 years ago

Ah, I'm using it on a debian based Linux distribution in CI.