docs: clarify webServer ipv4/ipv6 and baseURL protocol (#10610)
This commit is contained in:
parent
682d1f41c7
commit
3337920c76
|
|
@ -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`].
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
18
packages/playwright-test/types/test.d.ts
vendored
18
packages/playwright-test/types/test.d.ts
vendored
|
|
@ -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<TestArgs = {}, WorkerArgs = {}> {
|
|||
/**
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue