mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
fix: open 0.0.0.0 as localhost (#29054)
Fixes https://github.com/microsoft/playwright/issues/29047
This commit is contained in:
parent
b5e766e99e
commit
4a45724633
@ -168,7 +168,7 @@ export async function openTraceInBrowser(traceUrls: string[], options?: OpenTrac
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('\nListening on ' + url);
|
||||
if (!isUnderTest())
|
||||
await open(url).catch(() => {});
|
||||
await open(url.replace('0.0.0.0', 'localhost')).catch(() => {});
|
||||
}
|
||||
|
||||
class StdinServer implements Transport {
|
||||
|
@ -181,6 +181,7 @@ export async function showHTMLReport(reportFolder: string | undefined, host: str
|
||||
console.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));
|
||||
if (testId)
|
||||
url += `#?testId=${testId}`;
|
||||
url = url.replace('0.0.0.0', 'localhost');
|
||||
await open(url, { wait: true }).catch(() => {});
|
||||
await new Promise(() => {});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user