From 6687d0a331048aea00f75ebe8744224a205fde87 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Wed, 8 Aug 2018 12:14:11 +0200 Subject: [PATCH] tests: Make e2e tests work with the lastest master changes --- package.json | 2 +- test/e2e/jest.config.json | 6 ++++-- test/e2e/specs/block-mover.test.js | 4 +--- test/e2e/specs/rich-text.test.js | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 9bbeb3f400ea72..c7ab0661e13cf7 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "publish:prod": "npm run build:packages && lerna publish", "test": "npm run lint && npm run test-unit", "pretest-e2e": "concurrently \"./bin/reset-e2e-tests.sh\" \"npm run build\"", - "test-e2e": "cross-env JEST_PUPPETEER_CONFIG=test/e2e/puppeteer.config.js wp-scripts test-unit-js --config test/e2e/jest.config.json --runInBand", + "test-e2e": "wp-scripts test-unit-js --config test/e2e/jest.config.json --runInBand", "test-e2e:watch": "npm run test-e2e -- --watch", "test-php": "npm run lint-php && npm run test-unit-php", "test-unit": "wp-scripts test-unit-js --config test/unit/jest.config.json", diff --git a/test/e2e/jest.config.json b/test/e2e/jest.config.json index c0ae803d8ce072..354879e3d358a2 100644 --- a/test/e2e/jest.config.json +++ b/test/e2e/jest.config.json @@ -4,6 +4,8 @@ "setupTestFrameworkScriptFile": "/test/e2e/support/setup-test-framework.js", "testMatch": [ "/test/e2e/specs/**/(*.)test.js" - ] - + ], + "transform": { + "^.+\\.jsx?$": "/node_modules/babel-jest" + } } diff --git a/test/e2e/specs/block-mover.test.js b/test/e2e/specs/block-mover.test.js index 5d1b77707c244b..e53ccdd7535642 100644 --- a/test/e2e/specs/block-mover.test.js +++ b/test/e2e/specs/block-mover.test.js @@ -1,12 +1,10 @@ /** * Internal dependencies */ -import '../support/bootstrap'; -import { newPost, newDesktopBrowserPage } from '../support/utils'; +import { newPost } from '../support/utils'; describe( 'block mover', () => { beforeEach( async () => { - await newDesktopBrowserPage(); await newPost(); } ); diff --git a/test/e2e/specs/rich-text.test.js b/test/e2e/specs/rich-text.test.js index 446448b0fce6c9..c7a67c2feeb6df 100644 --- a/test/e2e/specs/rich-text.test.js +++ b/test/e2e/specs/rich-text.test.js @@ -1,17 +1,14 @@ /** * Internal dependencies */ -import '../support/bootstrap'; import { newPost, - newDesktopBrowserPage, getEditedPostContent, insertBlock, } from '../support/utils'; describe( 'adding blocks', () => { beforeEach( async () => { - await newDesktopBrowserPage(); await newPost(); } );