diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 16b22d3d7bfee9..bcb23d904c72f0 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -215,6 +215,10 @@ _Example:_ This is how you execute those scripts using the presented setup: * `npm run test:e2e` - runs all unit tests. +* `npm run test-e2e interactive` - runs all unit tests interactively. +* `npm run test-e2e interactive FILE_NAME` - runs one test file interactively. +* `npm run test-e2e:watch interactive` - runs all tests interactively and watch for changes. +* `npm run test-e2e:watch interactive FILE_NAME` - runs one test file interactively and watch for changes. * `npm run test:e2e:help` - prints all available options to configure unit tests runner. This script automatically detects the best config to start Puppeteer but sometimes you may need to specify custom options: diff --git a/packages/scripts/scripts/test-e2e.js b/packages/scripts/scripts/test-e2e.js index 8105891c8d838b..fb22ede249f4bc 100644 --- a/packages/scripts/scripts/test-e2e.js +++ b/packages/scripts/scripts/test-e2e.js @@ -50,4 +50,10 @@ if ( hasCliArg( '--puppeteer-interactive' ) ) { process.env.PUPPETEER_SLOWMO = getCliArg( '--puppeteer-slowmo' ) || 80; } +if ( hasCliArg( '--puppeteer-local' ) ) { + process.env.WP_BASE_URL = 'http://localhost:8888'; + process.env.WP_USERNAME = 'admin'; + process.env.WP_PASSWORD = 'password'; +} + jest.run( [ ...config, ...runInBand, ...getCliArgs( cleanUpPrefixes ) ] );