chore: relax npm version constraint in installation tests (#16427)

Resolves #16281.
This commit is contained in:
Ross Wollman 2022-08-10 15:33:47 -07:00 committed by GitHub
parent fcee4d5444
commit a3836de182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -176,7 +176,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- run: npm i -g npm@8.15.1 # This should NOT be pinned beyond major version once https://github.com/microsoft/playwright/issues/16281 is resolved.
- run: npm i -g npm@8
- run: npm ci
env:
DEBUG: pw:install

View File

@ -128,7 +128,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- run: npm i -g npm@8.15.1 # This should NOT be pinned beyond major version once https://github.com/microsoft/playwright/issues/16281 is resolved.
- run: npm i -g npm@8
- run: npm ci
env:
DEBUG: pw:install

View File

@ -16,7 +16,7 @@
import { test, expect } from './npmTest';
test('npx playwright --help should not download browsers', async ({ exec, installedSoftwareOnDisk }) => {
const result = await exec('npx playwright --help');
const result = await exec('npx playwright --help', { env: { npm_config_prefix: '' } }); // global npx and npm_config_prefix do not work together nicely (https://github.com/npm/cli/issues/5268)
expect(result).toHaveLoggedSoftwareDownload([]);
expect(await installedSoftwareOnDisk()).toEqual([]);
expect(result).not.toContain(`To avoid unexpected behavior, please install your dependencies first`);

View File

@ -17,7 +17,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');
const result = await exec('npx playwright install', { env: { npm_config_prefix: '' } }); // global npx and npm_config_prefix do not work together nicely (https://github.com/npm/cli/issues/5268)
expect(result).toHaveLoggedSoftwareDownload(['chromium', 'ffmpeg', 'firefox', 'webkit']);
expect(await installedSoftwareOnDisk()).toEqual(['chromium', 'ffmpeg', 'firefox', 'webkit']);
expect(result).not.toContain(`Please run the following command to download new browsers`);

View File

@ -16,7 +16,7 @@
import { test, expect } from './npmTest';
test('npx playwright codegen', async ({ exec, installedSoftwareOnDisk }) => {
const stdio = await exec('npx playwright codegen', { expectToExitWithError: true });
const stdio = await exec('npx playwright codegen', { expectToExitWithError: true, env: { npm_config_prefix: '' } }); // global npx and npm_config_prefix do not work together nicely (https://github.com/npm/cli/issues/5268)
expect(stdio).toHaveLoggedSoftwareDownload([]);
expect(await installedSoftwareOnDisk()).toEqual([]);
expect(stdio).toContain(`Please run the following command to download new browsers`);