Skip to content

chore: relax npm version constraint in installation tests #16427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests_primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/installation/npx-global-help.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
2 changes: 1 addition & 1 deletion tests/installation/npx-global-install.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
2 changes: 1 addition & 1 deletion tests/installation/npx-global-spec-codegen.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down