-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Describe the bug
I am unable to run Gutenberg's end-to-end tests (using Jest and Puppeteer) successfully in a Windows-based dev environment called Laragon (similar to XAMPP). I have node and npm installed fine.
On https://wordpress.org/gutenberg/handbook/reference/testing-overview/#end-to-end-testing, I set the environment variables WP_BASE_URl
, WP_ADMIN
and WP_PASSWORD
to those of a site hosted locally. Then when I run npm run test-e2e
it runs for a bit, but then gives me the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gutenberg@3.9.0 pretest-e2e:concurrently "./bin/reset-e2e-tests.sh" "npm run build"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gutenberg@3.9.0 pretest-e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I believe it's because pretest-e2e
runs concurrently \"./bin/reset-e2e-tests.sh\" \"npm run build\"
, where ./bin/reset-e2e-tests.sh
is a bash file specifically designed for the Docker setup (see https://github.com/WordPress/gutenberg/blob/master/package.json#L183). It reports that Docker isn't setup and fails. It's right, but it should still work because I have a different setup.
If I change that script to instead just be npm run build
the tests run ok.
To Reproduce
Steps to reproduce the behavior:
- Setup a WordPress local site using something besides Docker, like XAMPP or vagrant.
- Set the environment variables
WP_BASE_URl
,WP_ADMIN
andWP_PASSWORD
in your command prompt, then runnpm run test-e2e
from within the gutenberg's base folder.
Expected behavior
I would expect it to work to run the tests, without need any code modifications.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 7
- Browser n/a
- Version n/a
Additional context
- Please add the version of Gutenberg you are using in the description.
- To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.