From afbcd1bd63e7d8f6517634fa8d4e329a5e039349 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 18 Mar 2021 14:33:12 +0000 Subject: [PATCH] Build/Test Tools: Revert [50540]. The E2E workflow is failing after this change. Reverting to to investigate further. Unprops desrosj. See #52843. git-svn-id: https://develop.svn.wordpress.org/trunk@50542 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 51 +++++++++++++++++++++++++++++++++++++----- package.json | 1 + tests/e2e/run-tests.js | 14 +++++++----- 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index b05edfba5e..243ded09bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2315,6 +2315,12 @@ "@types/unist": "*" } }, + "@types/mime-types": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz", + "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM=", + "dev": true + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -3924,6 +3930,14 @@ "tar-fs": "^2.0.0", "unbzip2-stream": "^1.3.3", "ws": "^7.2.3" + }, + "dependencies": { + "devtools-protocol": { + "version": "0.0.818844", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.818844.tgz", + "integrity": "sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==", + "dev": true + } } }, "rimraf": { @@ -8051,12 +8065,6 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, - "devtools-protocol": { - "version": "0.0.818844", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.818844.tgz", - "integrity": "sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==", - "dev": true - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -18635,6 +18643,37 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "puppeteer": { + "version": "npm:puppeteer-core@3.0.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz", + "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==", + "dev": true, + "requires": { + "@types/mime-types": "^2.1.0", + "debug": "^4.1.0", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^4.0.0", + "mime": "^2.0.3", + "mime-types": "^2.1.25", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", diff --git a/package.json b/package.json index 7639511289..8728b79753 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "install-changed": "1.1.0", "matchdep": "~2.0.0", "prettier": "npm:wp-prettier@2.0.5", + "puppeteer": "npm:puppeteer-core@3.0.0", "qunit": "~2.14.0", "sass": "^1.32.8", "sinon": "~9.2.4", diff --git a/tests/e2e/run-tests.js b/tests/e2e/run-tests.js index 2d334c55df..ecb3b85100 100644 --- a/tests/e2e/run-tests.js +++ b/tests/e2e/run-tests.js @@ -1,13 +1,17 @@ const dotenv = require( 'dotenv' ); const dotenv_expand = require( 'dotenv-expand' ); +const { sync: spawn } = require( 'cross-spawn' ); const { execSync } = require( 'child_process' ); // WP_BASE_URL interpolates LOCAL_PORT, so needs to be parsed by dotenv_expand(). dotenv_expand( dotenv.config() ); +const result = spawn( 'node', [ require.resolve( 'puppeteer/install' ) ], { + stdio: 'inherit', +} ); +if ( result.status > 0 ) { + process.exit( result.status ); +} + // Run the tests, passing additional arguments through to the test script. -execSync( - 'wp-scripts test-e2e --config tests/e2e/jest.config.js ' + - process.argv.slice( 2 ).join( ' ' ), - { stdio: 'inherit' } -); +execSync( 'wp-scripts test-e2e --config tests/e2e/jest.config.js ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );