Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): update playwright config helper function name #1398

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/testing/playwright/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Overwrite Playwright config options here
});
```

The `createStencilPlaywrightConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createstencilplaywrightconfig-function).
The `createConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createconfig-function).

1. update your project's `tsconfig.json` to add the `ESNext.Disposable` option to the `lib` array:

Expand All @@ -67,7 +67,7 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow
:::

1. Ensure the Stencil project has a [`www` output target](../../output-targets/www.md). Playwright relies on pre-compiled output running in a dev server
to run tests against. When using the `createStencilPlaywrightConfig()` helper, a configuration for the dev server will be automatically created based on
to run tests against. When using the `createConfig()` helper, a configuration for the dev server will be automatically created based on
the Stencil project's `www` output target config and [dev server config](../../config/dev-server.md). If no `www` output target is specified,
tests will not be able to run.

Expand Down Expand Up @@ -107,7 +107,7 @@ options:
- **Option 1:** Update the Playwright config to match a different test file pattern:

```ts title="playwright.config.ts"
export default createStencilPlaywrightConfig({
export default createConfig({
// Example: match all test files with the 'e2e.playwright.ts' naming convention
testMatch: '*.e2e.playwright.ts',
});
Expand Down
2 changes: 1 addition & 1 deletion docs/testing/playwright/02-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Playwright command.

By default, the adapter will execute all tests in a project with a `.e2e.ts` file suffix. This can be modified by passing the
[`testDir`](https://playwright.dev/docs/api/class-testproject#test-project-test-dir) and/or [`testMatch`](https://playwright.dev/docs/api/class-testproject#test-project-test-match)
configuration options as overrides to `createStencilPlaywrightConfig()`.
configuration options as overrides to `createConfig()`.

## Debugging

Expand Down
8 changes: 4 additions & 4 deletions docs/testing/playwright/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Playwright Adapter API
sidebar_label: API
---

## `createStencilPlaywrightConfig` Function
## `createConfig` Function

**Signature:** `createStencilPlaywrightConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`
**Signature:** `createConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`

Returns a [Playwright test configuration](https://playwright.dev/docs/test-configuration#introduction).

Expand All @@ -17,11 +17,11 @@ as some options to override specific values in the config options related to the

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Change which test files Playwright will execute
testMatch: '*.spec.ts',

Expand Down
12 changes: 6 additions & 6 deletions versioned_docs/version-v4.13.0/testing/playwright/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Overwrite Playwright config options here
});
```

The `createStencilPlaywrightConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createstencilplaywrightconfig-function).
The `createConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createconfig-function).

1. update your project's `tsconfig.json` to add the `ESNext.Disposable` option to the `lib` array:

Expand All @@ -67,7 +67,7 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow
:::

1. Ensure the Stencil project has a [`www` output target](../../output-targets/www.md). Playwright relies on pre-compiled output running in a dev server
to run tests against. When using the `createStencilPlaywrightConfig()` helper, a configuration for the dev server will be automatically created based on
to run tests against. When using the `createConfig()` helper, a configuration for the dev server will be automatically created based on
the Stencil project's `www` output target config and [dev server config](../../config/dev-server.md). If no `www` output target is specified,
tests will not be able to run.

Expand Down Expand Up @@ -107,7 +107,7 @@ options:
- **Option 1:** Update the Playwright config to match a different test file pattern:

```ts title="playwright.config.ts"
export default createStencilPlaywrightConfig({
export default createConfig({
// Example: match all test files with the 'e2e.playwright.ts' naming convention
testMatch: '*.e2e.playwright.ts',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Playwright command.

By default, the adapter will execute all tests in a project with a `.e2e.ts` file suffix. This can be modified by passing the
[`testDir`](https://playwright.dev/docs/api/class-testproject#test-project-test-dir) and/or [`testMatch`](https://playwright.dev/docs/api/class-testproject#test-project-test-match)
configuration options as overrides to `createStencilPlaywrightConfig()`.
configuration options as overrides to `createConfig()`.

## Debugging

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v4.13.0/testing/playwright/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Playwright Adapter API
sidebar_label: API
---

## `createStencilPlaywrightConfig` Function
## `createConfig` Function

**Signature:** `createStencilPlaywrightConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`
**Signature:** `createConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`

Returns a [Playwright test configuration](https://playwright.dev/docs/test-configuration#introduction).

Expand All @@ -17,11 +17,11 @@ as some options to override specific values in the config options related to the

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Change which test files Playwright will execute
testMatch: '*.spec.ts',

Expand Down
12 changes: 6 additions & 6 deletions versioned_docs/version-v4.14/testing/playwright/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Overwrite Playwright config options here
});
```

The `createStencilPlaywrightConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createstencilplaywrightconfig-function).
The `createConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createconfig-function).

1. update your project's `tsconfig.json` to add the `ESNext.Disposable` option to the `lib` array:

Expand All @@ -67,7 +67,7 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow
:::

1. Ensure the Stencil project has a [`www` output target](../../output-targets/www.md). Playwright relies on pre-compiled output running in a dev server
to run tests against. When using the `createStencilPlaywrightConfig()` helper, a configuration for the dev server will be automatically created based on
to run tests against. When using the `createConfig()` helper, a configuration for the dev server will be automatically created based on
the Stencil project's `www` output target config and [dev server config](../../config/dev-server.md). If no `www` output target is specified,
tests will not be able to run.

Expand Down Expand Up @@ -107,7 +107,7 @@ options:
- **Option 1:** Update the Playwright config to match a different test file pattern:

```ts title="playwright.config.ts"
export default createStencilPlaywrightConfig({
export default createConfig({
// Example: match all test files with the 'e2e.playwright.ts' naming convention
testMatch: '*.e2e.playwright.ts',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Playwright command.

By default, the adapter will execute all tests in a project with a `.e2e.ts` file suffix. This can be modified by passing the
[`testDir`](https://playwright.dev/docs/api/class-testproject#test-project-test-dir) and/or [`testMatch`](https://playwright.dev/docs/api/class-testproject#test-project-test-match)
configuration options as overrides to `createStencilPlaywrightConfig()`.
configuration options as overrides to `createConfig()`.

## Debugging

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v4.14/testing/playwright/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Playwright Adapter API
sidebar_label: API
---

## `createStencilPlaywrightConfig` Function
## `createConfig` Function

**Signature:** `createStencilPlaywrightConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`
**Signature:** `createConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`

Returns a [Playwright test configuration](https://playwright.dev/docs/test-configuration#introduction).

Expand All @@ -17,11 +17,11 @@ as some options to override specific values in the config options related to the

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Change which test files Playwright will execute
testMatch: '*.spec.ts',

Expand Down
12 changes: 6 additions & 6 deletions versioned_docs/version-v4.15/testing/playwright/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Overwrite Playwright config options here
});
```

The `createStencilPlaywrightConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createstencilplaywrightconfig-function).
The `createConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createconfig-function).

1. update your project's `tsconfig.json` to add the `ESNext.Disposable` option to the `lib` array:

Expand All @@ -67,7 +67,7 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow
:::

1. Ensure the Stencil project has a [`www` output target](../../output-targets/www.md). Playwright relies on pre-compiled output running in a dev server
to run tests against. When using the `createStencilPlaywrightConfig()` helper, a configuration for the dev server will be automatically created based on
to run tests against. When using the `createConfig()` helper, a configuration for the dev server will be automatically created based on
the Stencil project's `www` output target config and [dev server config](../../config/dev-server.md). If no `www` output target is specified,
tests will not be able to run.

Expand Down Expand Up @@ -107,7 +107,7 @@ options:
- **Option 1:** Update the Playwright config to match a different test file pattern:

```ts title="playwright.config.ts"
export default createStencilPlaywrightConfig({
export default createConfig({
// Example: match all test files with the 'e2e.playwright.ts' naming convention
testMatch: '*.e2e.playwright.ts',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Playwright command.

By default, the adapter will execute all tests in a project with a `.e2e.ts` file suffix. This can be modified by passing the
[`testDir`](https://playwright.dev/docs/api/class-testproject#test-project-test-dir) and/or [`testMatch`](https://playwright.dev/docs/api/class-testproject#test-project-test-match)
configuration options as overrides to `createStencilPlaywrightConfig()`.
configuration options as overrides to `createConfig()`.

## Debugging

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v4.15/testing/playwright/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Playwright Adapter API
sidebar_label: API
---

## `createStencilPlaywrightConfig` Function
## `createConfig` Function

**Signature:** `createStencilPlaywrightConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`
**Signature:** `createConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`

Returns a [Playwright test configuration](https://playwright.dev/docs/test-configuration#introduction).

Expand All @@ -17,11 +17,11 @@ as some options to override specific values in the config options related to the

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Change which test files Playwright will execute
testMatch: '*.spec.ts',

Expand Down
12 changes: 6 additions & 6 deletions versioned_docs/version-v4.16/testing/playwright/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Overwrite Playwright config options here
});
```

The `createStencilPlaywrightConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createstencilplaywrightconfig-function).
The `createConfig()` is a utility that will create a default Playwright configuration based on your project's Stencil config. Read
more about how to use this utility in the [API docs](./03-api.md#createconfig-function).

1. update your project's `tsconfig.json` to add the `ESNext.Disposable` option to the `lib` array:

Expand All @@ -67,7 +67,7 @@ To install the Stencil Playwright adapter in an existing Stencil project, follow
:::

1. Ensure the Stencil project has a [`www` output target](../../output-targets/www.md). Playwright relies on pre-compiled output running in a dev server
to run tests against. When using the `createStencilPlaywrightConfig()` helper, a configuration for the dev server will be automatically created based on
to run tests against. When using the `createConfig()` helper, a configuration for the dev server will be automatically created based on
the Stencil project's `www` output target config and [dev server config](../../config/dev-server.md). If no `www` output target is specified,
tests will not be able to run.

Expand Down Expand Up @@ -107,7 +107,7 @@ options:
- **Option 1:** Update the Playwright config to match a different test file pattern:

```ts title="playwright.config.ts"
export default createStencilPlaywrightConfig({
export default createConfig({
// Example: match all test files with the 'e2e.playwright.ts' naming convention
testMatch: '*.e2e.playwright.ts',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Playwright command.

By default, the adapter will execute all tests in a project with a `.e2e.ts` file suffix. This can be modified by passing the
[`testDir`](https://playwright.dev/docs/api/class-testproject#test-project-test-dir) and/or [`testMatch`](https://playwright.dev/docs/api/class-testproject#test-project-test-match)
configuration options as overrides to `createStencilPlaywrightConfig()`.
configuration options as overrides to `createConfig()`.

## Debugging

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v4.16/testing/playwright/03-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Playwright Adapter API
sidebar_label: API
---

## `createStencilPlaywrightConfig` Function
## `createConfig` Function

**Signature:** `createStencilPlaywrightConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`
**Signature:** `createConfig(overrides?: CreateStencilPlaywrightConfigOptions): Promise<PlaywrightTestConfig>`

Returns a [Playwright test configuration](https://playwright.dev/docs/test-configuration#introduction).

Expand All @@ -17,11 +17,11 @@ as some options to override specific values in the config options related to the

```ts title="playwright.config.ts"
import { expect } from '@playwright/test';
import { matchers, createStencilPlaywrightConfig } from '@stencil/playwright';
import { matchers, createConfig } from '@stencil/playwright';

expect.extend(matchers);

export default createStencilPlaywrightConfig({
export default createConfig({
// Change which test files Playwright will execute
testMatch: '*.spec.ts',

Expand Down
Loading