Skip to content

Commit

Permalink
Remove the use of popular plugins in e2e tests (#15940)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored Jun 3, 2019
1 parent 2627415 commit 74b27d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,63 +81,63 @@ jobs:
script:
- ./bin/run-wp-unit-tests.sh

- name: E2E tests (Admin with plugins) (1/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
- name: E2E tests (Admin) (1/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )

- name: E2E tests (Admin with plugins) (2/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
- name: E2E tests (Admin) (2/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )

- name: E2E tests (Admin with plugins) (3/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
- name: E2E tests (Admin) (3/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )

- name: E2E tests (Admin with plugins) (4/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
- name: E2E tests (Admin) (4/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (1/4)
- name: E2E tests (Author) (1/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (2/4)
- name: E2E tests (Author) (2/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (3/4)
- name: E2E tests (Author) (3/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (4/4)
- name: E2E tests (Author) (4/4)
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
install:
- ./bin/setup-travis-e2e-tests.sh
Expand Down
5 changes: 0 additions & 5 deletions bin/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ fi
echo -e $(status_message "Activating Gutenberg...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI plugin activate gutenberg --quiet

if [ "$POPULAR_PLUGINS" == "true" ]; then
echo -e $(status_message "Activating popular plugins...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI plugin install advanced-custom-fields jetpack wpforms-lite --activate --quiet
fi

# Install a dummy favicon to avoid 404 errors.
echo -e $(status_message "Installing a dummy favicon...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER touch /var/www/html/favicon.ico
Expand Down
8 changes: 1 addition & 7 deletions packages/e2e-tests/specs/block-transforms.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,7 @@ const getTransformResult = async ( blockContent, transformName ) => {
return getEditedPostContent();
};

// Skipping all the tests when plugins are enabled
// makes sure the tests are not executed, and no unused snapshots errors are thrown.
const maybeDescribe = process.env.POPULAR_PLUGINS ?
describe.skip :
describe;

maybeDescribe( 'Block transforms', () => {
describe( 'Block transforms', () => {
const fileBasenames = getAvailableBlockFixturesBasenames();

const transformStructure = {};
Expand Down

0 comments on commit 74b27d2

Please sign in to comment.