mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
fix: warn if PWT commands get executed without PWT (#26542)
Fixes https://github.com/microsoft/playwright/issues/26541
This commit is contained in:
parent
e15db7993a
commit
29fbcbee69
@ -48,20 +48,16 @@ function printPlaywrightTestError(command: string) {
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const command = program.command('test').allowUnknownOption(true);
|
||||
command.description('Run tests with Playwright Test. Available in @playwright/test package.');
|
||||
command.action(async () => {
|
||||
printPlaywrightTestError('test');
|
||||
gracefullyProcessExitDoNotHang(1);
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const command = program.command('show-report').allowUnknownOption(true);
|
||||
command.description('Show Playwright Test HTML report. Available in @playwright/test package.');
|
||||
command.action(async () => {
|
||||
printPlaywrightTestError('show-report');
|
||||
const kExternalPlaywrightTestCommands = [
|
||||
['test', 'Run tests with Playwright Test.'],
|
||||
['show-report', 'Show Playwright Test HTML report.'],
|
||||
['merge-reports', 'Merge Playwright Test Blob reports'],
|
||||
];
|
||||
for (const [command, description] of kExternalPlaywrightTestCommands) {
|
||||
const playwrightTest = program.command(command).allowUnknownOption(true);
|
||||
playwrightTest.description(`${description} Available in @playwright/test package.`);
|
||||
playwrightTest.action(async () => {
|
||||
printPlaywrightTestError(command);
|
||||
gracefullyProcessExitDoNotHang(1);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user