Bug 1539202 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

WordPress is using Puppeteer to run integration tests and for now only run them against chromium.

The test scripts are available on the Gutenberg repo:
https://github.com/WordPress/gutenberg/tree/master/packages/e2e-tests/specs
Gutenberg is a sub-component of WordPress dedicated to its editor component.

How to run the tests:
```
$ git clone https://github.com/WordPress/gutenberg.git
$ cd gutenberg
$ npm install
$ vi node_modules/puppeteer/lib/Launcher.js
```
Replace the following line:
```
     const rl = readline.createInterface({ input: chromeProcess.stderr });
```
by:
```
     const rl = readline.createInterface({ input: chromeProcess.stdout });
```
```
$ ./bin/setup-local-env.s # it requires some dependencies to be installed, like docker
$ npm run test-e2e # this will run all the tests
$ npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js # this will run just one test
```
For extra debugging you may use `DEBUG` env variable like this:
```
$ DEBUG=puppeteer:session npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js
```
WordPress is using Puppeteer to run integration tests and for now only run them against chromium.

The test scripts are available on the Gutenberg repo:
https://github.com/WordPress/gutenberg/tree/master/packages/e2e-tests/specs
Gutenberg is a sub-component of WordPress dedicated to its editor component.

How to run the tests:
```
$ git clone https://github.com/WordPress/gutenberg.git
$ cd gutenberg
$ npm install
$ vi node_modules/puppeteer/lib/Launcher.js
```
Replace the following line:
```
     const rl = readline.createInterface({ input: chromeProcess.stderr });
```
by:
```
     const rl = readline.createInterface({ input: chromeProcess.stdout });
```
```
$ vi packages/scripts/config/puppeteer.config.js
```
Add the following line, that refers to your local firefox build
```
   executablePath: "/path/to/mozilla-central/your-obj-dir/dist/bin/firefox",
```

```
$ ./bin/setup-local-env.s # it requires some dependencies to be installed, like docker
$ npm run test-e2e # this will run all the tests
$ npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js # this will run just one test
```
For extra debugging you may use `DEBUG` env variable like this:
```
$ DEBUG=puppeteer:session npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js
```
WordPress is using Puppeteer to run integration tests and for now only run them against chromium.

The test scripts are available on the Gutenberg repo:
https://github.com/WordPress/gutenberg/tree/master/packages/e2e-tests/specs
Gutenberg is a sub-component of WordPress dedicated to its editor component.

How to run the tests:
```
$ git clone https://github.com/WordPress/gutenberg.git
$ cd gutenberg
$ npm install
$ vi node_modules/puppeteer/lib/Launcher.js
```
Replace the following line:
```
     const rl = readline.createInterface({ input: chromeProcess.stderr });
```
by:
```
     const rl = readline.createInterface({ input: chromeProcess.stdout });
```
```
$ vi packages/scripts/config/puppeteer.config.js
```
Add the following line, that refers to your local firefox build
```
   executablePath: "/path/to/mozilla-central/your-obj-dir/dist/bin/firefox",
```

```
$ ./bin/setup-local-env.sh # it requires some dependencies to be installed, like docker
$ npm run test-e2e # this will run all the tests
$ npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js # this will run just one test
```
For extra debugging you may use `DEBUG` env variable like this:
```
$ DEBUG=puppeteer:session npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js
```
WordPress is using Puppeteer to run integration tests and for now only run them against chromium.

The test scripts are available on the Gutenberg repo:
https://github.com/WordPress/gutenberg/tree/master/packages/e2e-tests/specs
Gutenberg is a sub-component of WordPress dedicated to its editor component.

How to run the tests:
```
$ git clone https://github.com/WordPress/gutenberg.git
$ cd gutenberg
$ npm install
$ vi node_modules/puppeteer/lib/Launcher.js
```
Replace the following line:
```
     const rl = readline.createInterface({ input: chromeProcess.stderr });
```
by:
```
     const rl = readline.createInterface({ input: chromeProcess.stdout });
```
```
$ vi packages/scripts/config/puppeteer.config.js
```
Add the following line, that refers to your local firefox build
```
   executablePath: "/path/to/mozilla-central/your-obj-dir/dist/bin/firefox",
```

```
$ ./bin/setup-local-env.sh # it requires some dependencies to be installed, like docker
$ npm run build
$ npm run test-e2e # this will run all the tests
$ npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js # this will run just one test
```
For extra debugging you may use `DEBUG` env variable like this:
```
$ DEBUG=puppeteer:session npx wp-scripts test-e2e --config packages/e2e-tests/jest.config.js packages/e2e-tests/specs/links.test.js
```

Back to Bug 1539202 Comment 0