Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: normalize node versions for installation tests (#14610)
Dmitry Gozmana5506a80eee6
diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.ymlindex 05ea1a40e9..4c38bfed2b 100644--- a/.github/workflows/tests_primary.yml+++ b/.github/workflows/tests_primary.yml@@ -167,7 +167,7 @@ jobs:- macos-latest- windows-latestnode_version:- - "^18.0.0"+ - "^14.1.0" # pre 14.1, zip extraction was broken (https://github.com/microsoft/playwright/issues/1988)timeout-minutes: 30steps:- uses: actions/checkout@v2diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.ymlindex 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-resultspath: 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-latestnode_version: "^16.0.0"timeout-minutes: 30diff --git a/tests/installation/fixture-scripts/driver-client.js b/tests/installation/fixture-scripts/driver-client.jsindex 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.tsindex 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']);