mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(html-reporter): Include specified host and port in the logged instructions to launch the HTML report (#28144)
Signed-off-by: Daniel <3473356+D4N14L@users.noreply.github.com>
This commit is contained in:
parent
611badcf74
commit
1c8ceb0a02
@ -134,10 +134,12 @@ class HtmlReporter extends EmptyReporter {
|
|||||||
} else if (!FullConfigInternal.from(this.config)?.cliListOnly) {
|
} else if (!FullConfigInternal.from(this.config)?.cliListOnly) {
|
||||||
const packageManagerCommand = getPackageManagerExecCommand();
|
const packageManagerCommand = getPackageManagerExecCommand();
|
||||||
const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);
|
const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);
|
||||||
|
const hostArg = this._options.host ? ` --host ${this._options.host}` : '';
|
||||||
|
const portArg = this._options.port ? ` --port ${this._options.port}` : '';
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log('To open last HTML report run:');
|
console.log('To open last HTML report run:');
|
||||||
console.log(colors.cyan(`
|
console.log(colors.cyan(`
|
||||||
${packageManagerCommand} playwright show-report${relativeReportPath}
|
${packageManagerCommand} playwright show-report${relativeReportPath}${hostArg}${portArg}
|
||||||
`));
|
`));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user