diff --git a/docs/src/test-advanced-js.md b/docs/src/test-advanced-js.md index 5f7c3fde3e..1ab14decfd 100644 --- a/docs/src/test-advanced-js.md +++ b/docs/src/test-advanced-js.md @@ -206,7 +206,7 @@ export const test = base.extend<{ saveLogs: void }>({ To launch a server during the tests, use the `webServer` option in the [configuration file](#configuration-object). -You can specify a port via `port` or additional environment variables, see [here](#configuration-object). The server will wait for it to be available before running the tests. For continuous integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. +You can specify a port via `port` or additional environment variables, see [here](#configuration-object). The server will wait for it to be available (on `127.0.0.1` or `::1`) before running the tests. For continuous integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. The port gets then passed over to Playwright as a [`param: baseURL`] when creating the context [`method: Browser.newContext`]. diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md index 461d5aa1c3..7053adb519 100644 --- a/docs/src/test-api/class-testconfig.md +++ b/docs/src/test-api/class-testconfig.md @@ -567,9 +567,11 @@ export default config; Launch a development web server during the tests. -The server will wait for it to be available before running the tests. For continuous integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. +The server will wait for it to be available on `127.0.0.1` or `::1` before running the tests. For continuous integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. The port gets then passed over to Playwright as a `baseURL` when creating the context [`method: Browser.newContext`]. +For example `8080` ends up in `baseURL` to be `http://localhost:8080`. If you want to use `https://` you need to manually specify +the `baseURL` inside `use`. ```js js-flavor=ts // playwright.config.ts diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index 513083b713..616e6c6793 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -570,11 +570,14 @@ interface TestConfig { /** * Launch a development web server during the tests. * - * The server will wait for it to be available before running the tests. For continuous integration, you may want to use - * the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. + * The server will wait for it to be available on `127.0.0.1` or `::1` before running the tests. For continuous + * integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server + * on the CI. * * The port gets then passed over to Playwright as a `baseURL` when creating the context - * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context). + * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context). For example `8080` + * ends up in `baseURL` to be `http://localhost:8080`. If you want to use `https://` you need to manually specify the + * `baseURL` inside `use`. * * ```ts * // playwright.config.ts @@ -1056,11 +1059,14 @@ export interface FullConfig { /** * Launch a development web server during the tests. * - * The server will wait for it to be available before running the tests. For continuous integration, you may want to use - * the `reuseExistingServer: !process.env.CI` option which does not use an existing server on the CI. + * The server will wait for it to be available on `127.0.0.1` or `::1` before running the tests. For continuous + * integration, you may want to use the `reuseExistingServer: !process.env.CI` option which does not use an existing server + * on the CI. * * The port gets then passed over to Playwright as a `baseURL` when creating the context - * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context). + * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context). For example `8080` + * ends up in `baseURL` to be `http://localhost:8080`. If you want to use `https://` you need to manually specify the + * `baseURL` inside `use`. * * ```ts * // playwright.config.ts