From e643c46cae4f770440a7f0241ba96c539b05eea0 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 31 May 2019 14:08:15 +0100 Subject: [PATCH] Remove the use of popular plugins in e2e tests --- .travis.yml | 24 +++++++++---------- bin/install-wordpress.sh | 5 ---- .../e2e-tests/specs/block-transforms.test.js | 8 +------ 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ff3c9b044502..8d1046f2104d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,39 +81,39 @@ 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 @@ -121,7 +121,7 @@ jobs: - $( 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 @@ -129,7 +129,7 @@ jobs: - $( 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 @@ -137,7 +137,7 @@ jobs: - $( 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 diff --git a/bin/install-wordpress.sh b/bin/install-wordpress.sh index 2b7b1ebf84b39..551e8bd0dc77e 100755 --- a/bin/install-wordpress.sh +++ b/bin/install-wordpress.sh @@ -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 diff --git a/packages/e2e-tests/specs/block-transforms.test.js b/packages/e2e-tests/specs/block-transforms.test.js index 8a4a2a38461bb..a16a7a1ec1003 100644 --- a/packages/e2e-tests/specs/block-transforms.test.js +++ b/packages/e2e-tests/specs/block-transforms.test.js @@ -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 = {};