mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
chore: relax npm version constraint in installation tests (#16427)
Resolves #16281.
This commit is contained in:
parent
fcee4d5444
commit
a3836de182
2
.github/workflows/tests_primary.yml
vendored
2
.github/workflows/tests_primary.yml
vendored
@ -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
|
||||
|
2
.github/workflows/tests_secondary.yml
vendored
2
.github/workflows/tests_secondary.yml
vendored
@ -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
|
||||
|
@ -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`);
|
||||
|
@ -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`);
|
||||
|
@ -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`);
|
||||
|
Loading…
Reference in New Issue
Block a user