From a5506a80eee6ca6e1a72989c3b4b446d2e1e195a Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 7 Jun 2022 18:11:58 -0700 Subject: [PATCH] test: normalize node versions for installation tests (#14610) We should cover node 14 on all platforms (similarly to other types of tests), and node 16/18 on linux. --- .github/workflows/tests_primary.yml | 2 +- .github/workflows/tests_secondary.yml | 4 ++-- tests/installation/fixture-scripts/driver-client.js | 4 +++- tests/installation/npx-global-install.spec.ts | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.yml index 05ea1a40e9..4c38bfed2b 100644 --- a/.github/workflows/tests_primary.yml +++ b/.github/workflows/tests_primary.yml @@ -167,7 +167,7 @@ jobs: - macos-latest - windows-latest node_version: - - "^18.0.0" + - "^14.1.0" # pre 14.1, zip extraction was broken (https://github.com/microsoft/playwright/issues/1988) timeout-minutes: 30 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.yml index 690b210881..6ed1f9178e 100644 --- a/.github/workflows/tests_secondary.yml +++ b/.github/workflows/tests_secondary.yml @@ -109,7 +109,7 @@ jobs: name: ${{ matrix.browser }}-win-test-results path: test-results - test-package-installations-older-node-versions: + test-package-installations-other-node-versions: name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})" runs-on: ${{ matrix.os }} strategy: @@ -117,7 +117,7 @@ jobs: matrix: include: - os: ubuntu-latest - node_version: "^14.1.0" # pre 14.1, zip extraction was broken (https://github.com/microsoft/playwright/issues/1988) + node_version: "^18.0.0" - os: ubuntu-latest node_version: "^16.0.0" timeout-minutes: 30 diff --git a/tests/installation/fixture-scripts/driver-client.js b/tests/installation/fixture-scripts/driver-client.js index d5881d736d..202a70abee 100644 --- a/tests/installation/fixture-scripts/driver-client.js +++ b/tests/installation/fixture-scripts/driver-client.js @@ -14,7 +14,9 @@ * limitations under the License. */ -const { start } = require('./node_modules/playwright-core/lib/outofprocess'); +const pw = require.resolve('playwright'); +const oop = require.resolve('playwright-core/lib/outofprocess', { paths: [pw] }); +const { start } = require(oop); (async () => { const { playwright, stop } = await start(); diff --git a/tests/installation/npx-global-install.spec.ts b/tests/installation/npx-global-install.spec.ts index 1a44b41f07..876a2d1186 100755 --- a/tests/installation/npx-global-install.spec.ts +++ b/tests/installation/npx-global-install.spec.ts @@ -16,6 +16,7 @@ import { test, expect } from './npmTest'; test('npx playwright install global', async ({ exec, installedSoftwareOnDisk }) => { + test.skip(process.platform === 'win32', 'isLikelyNpxGlobal() does not work in this setup on our bots'); const result = await exec('npx playwright install'); expect(result).toHaveLoggedSoftwareDownload(['chromium', 'ffmpeg', 'firefox', 'webkit']); expect(await installedSoftwareOnDisk()).toEqual(['chromium', 'ffmpeg', 'firefox', 'webkit']);