Skip to content

Commit

Permalink
fix(html-reporter): Include specified host and port in the logged ins…
Browse files Browse the repository at this point in the history
…tructions to launch the HTML report (#28144)

Signed-off-by: Daniel <3473356+D4N14L@users.noreply.github.com>
  • Loading branch information
D4N14L committed Nov 15, 2023
1 parent 611badc commit 1c8ceb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/playwright/src/reporters/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ class HtmlReporter extends EmptyReporter {
} else if (!FullConfigInternal.from(this.config)?.cliListOnly) {
const packageManagerCommand = getPackageManagerExecCommand();
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('To open last HTML report run:');
console.log(colors.cyan(`
${packageManagerCommand} playwright show-report${relativeReportPath}
${packageManagerCommand} playwright show-report${relativeReportPath}${hostArg}${portArg}
`));
}
}
Expand Down

0 comments on commit 1c8ceb0

Please sign in to comment.