Skip to content

Commit

Permalink
apply general docs to all versions
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Jun 18, 2024
1 parent a4477e9 commit 01e224c
Show file tree
Hide file tree
Showing 20 changed files with 200 additions and 0 deletions.
10 changes: 10 additions & 0 deletions versioned_docs/version-v3/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.0/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.1/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.10/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.11/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.12/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-v4.2/testing/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Most methods are async and return Promises. Use `async` and `await` to declutter

- `find(selector: string)`: Find an element that matches the selector. Similar to `document.querySelector`.
- `setContent(html: string)`: Sets the content of a page. This is where you would include the markup of the component under test.
- `goto(url: string)`: open a page served by the dev server. URL has to start with `/`.
- `setViewport(viewport: Viewport)`: Updates the page to emulate a device display. This is helpful for testing a component's behavior in different orientations and viewport sizes.
- `waitForChanges()`: Both Stencil and Puppeteer have an asynchronous architecture, which is a good thing for performance. Since all calls are async, it's required that `await page.waitForChanges()` is called when changes are made to components.

Expand All @@ -42,6 +43,15 @@ describe('example', () => {
});
```

## Options

The `newE2EPage` accepts the following options:

- `html`: a HTML template, e.g. containing your Stencil component to be rendered in the browser (same as calling `page.setContent('...')`)
- `url`: opens a url to open a page served by the [dev server](./dev-server) (option will be ignored if `html` is set, same as calling `page.goto('...')`)
- `failOnConsoleError`: If set to `true`, Stencil will throw an error if a console error occurs (default: `false`)
- `failOnNetworkError`: If set to `true`, Stencil will throw an error if a network request fails (default: `false`)

## Example End-to-end Test

```typescript
Expand Down
Loading

0 comments on commit 01e224c

Please sign in to comment.