Skip to content

Commit

Permalink
cherry-pick(#29715): fix: point to the right cli program export
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Feb 28, 2024
1 parent e7f0635 commit 84780b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/playwright-chromium/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
* limitations under the License.
*/

const { program } = require('playwright-core/lib/program');
const { program } = require('playwright-core/lib/cli/program');
program.parse(process.argv);
2 changes: 1 addition & 1 deletion packages/playwright-firefox/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
* limitations under the License.
*/

const { program } = require('playwright-core/lib/program');
const { program } = require('playwright-core/lib/cli/program');
program.parse(process.argv);
2 changes: 1 addition & 1 deletion packages/playwright-webkit/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
* limitations under the License.
*/

const { program } = require('playwright-core/lib/program');
const { program } = require('playwright-core/lib/cli/program');
program.parse(process.argv);
6 changes: 6 additions & 0 deletions tests/installation/playwright-cli-install-should-work.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ test('subsequent installs works', async ({ exec }) => {
// of UnhandledPromiseRejection.
await exec('node --unhandled-rejections=strict', path.join('node_modules', '@playwright', 'browser-chromium', 'install.js'));
});

test('install playwright-chromium should work', async ({ exec, installedSoftwareOnDisk }) => {
await exec('npm i playwright-chromium');
await exec('npx playwright install chromium');
await exec('node sanity.js playwright-chromium chromium');
});

0 comments on commit 84780b1

Please sign in to comment.