Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (16-11-24) (#1594)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Nov 16, 2024
1 parent 8d84aea commit fc07c4f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions dotnet/docs/api/class-locatorassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Ensures the [Locator] points to an enabled element.

```csharp
var locator = Page.Locator("button.submit");
await Expect(locator).toBeEnabledAsync();
await Expect(locator).ToBeEnabledAsync();
```

**Arguments**
Expand Down Expand Up @@ -377,7 +377,7 @@ Ensures the [Locator] points to an element with a given [accessible description]

```csharp
var locator = Page.GetByTestId("save-button");
await Expect(locator).toHaveAccessibleDescriptionAsync("Save results to disk");
await Expect(locator).ToHaveAccessibleDescriptionAsync("Save results to disk");
```

**Arguments**
Expand Down Expand Up @@ -407,7 +407,7 @@ Ensures the [Locator] points to an element with a given [accessible name](https:

```csharp
var locator = Page.GetByTestId("save-button");
await Expect(locator).toHaveAccessibleNameAsync("Save to disk");
await Expect(locator).ToHaveAccessibleNameAsync("Save to disk");
```

**Arguments**
Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Playwright tests can be ran on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.
Playwright tests can be run on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.

#### You will learn
- [How to set up GitHub Actions](/ci-intro.mdx#setting-up-github-actions)
Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/clock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ await Page.GotoAsync("http://localhost:3333");
await Page.Clock.PauseAtAsync(new DateTime(2024, 2, 2, 10, 0, 0));

// Assert the page state.
await Expect(Page.GetByTestId("current-time")).ToHaveText("2/2/2024, 10:00:00 AM");
await Expect(Page.GetByTestId("current-time")).ToHaveTextAsync("2/2/2024, 10:00:00 AM");

// Close the laptop lid again and open it at 10:30am.
await Page.Clock.FastForwardAsync("30:00");
await Expect(Page.GetByTestId("current-time")).ToHaveText("2/2/2024, 10:30:00 AM");
await Expect(Page.GetByTestId("current-time")).ToHaveTextAsync("2/2/2024, 10:30:00 AM");
```

## Test inactivity monitoring
Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ All the same methods are also available on [Locator], [FrameLocator] and [Frame]
- [Expect(Locator).ToHaveAttributeAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-attribute) with an empty value does not match missing attribute anymore. For example, the following snippet will succeed when `button` **does not** have a `disabled` attribute.

```csharp
await Expect(Page.GetByRole(AriaRole.Button)).ToHaveAttribute("disabled", "");
await Expect(Page.GetByRole(AriaRole.Button)).ToHaveAttributeAsync("disabled", "");
```

### Browser Versions
Expand Down
2 changes: 1 addition & 1 deletion java/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Playwright tests can be ran on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.
Playwright tests can be run on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.

#### You will learn
- [How to set up GitHub Actions](/ci-intro.mdx#setting-up-github-actions)
Expand Down
2 changes: 1 addition & 1 deletion nodejs/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The `tests` folder contains a basic example test to help you get started with te

## Running the Example Test

By default tests will be run on all 3 browsers, chromium, firefox and webkit using 3 workers. This can be configured in the [playwright.config file](./test-configuration.mdx). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal.
By default tests will be run on all 3 browsers, Chromium, Firefox and WebKit using 3 workers. This can be configured in the [playwright.config file](./test-configuration.mdx). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal.

<Tabs defaultValue="npm" values={[ {label: 'npm', value: 'npm'}, {label: 'yarn', value: 'yarn'}, {label: 'pnpm', value: 'pnpm'} ] }>

Expand Down
6 changes: 3 additions & 3 deletions nodejs/docs/running-tests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npx playwright test --ui

![UI Mode](https://github.com/microsoft/playwright/assets/13063165/c5b501cc-4f5d-485a-87cc-66044c651786)

Check out or [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about it's features.
Check out or [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about its features.

### Run tests in headed mode

Expand Down Expand Up @@ -115,11 +115,11 @@ npx playwright test --ui

![showing errors in ui mode](https://github.com/microsoft/playwright/assets/13063165/ffca2fd1-5349-41fb-ade9-ace143bb2c58)

While debugging you can use the Pick Locator button to select an element on the page and see the locator that Playwright would use to find that element. You can also edit the locator in the locator playground and see it highlighting live on the Browser window. Use the Copy Locator button to copy the locator to your clipboard and then paste it into you test.
While debugging you can use the Pick Locator button to select an element on the page and see the locator that Playwright would use to find that element. You can also edit the locator in the locator playground and see it highlighting live on the Browser window. Use the Copy Locator button to copy the locator to your clipboard and then paste it into your test.

![pick locator in ui mode](https://github.com/microsoft/playwright/assets/13063165/9e7eeb84-bd26-4010-8614-75e24b56c716)

Check out our [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about it's features.
Check out our [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about its features.

### Debug tests with the Playwright Inspector

Expand Down
2 changes: 1 addition & 1 deletion nodejs/docs/trace-viewer-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ npx playwright test --trace on

## Opening the HTML report

The HTML report shows you a report of all your tests that have been ran and on which browsers as well as how long they took. Tests can be filtered by passed tests, failed, flakey or skipped tests. You can also search for a particular test. Clicking on a test will open the detailed view where you can see more information on your tests such as the errors, the test steps and the trace.
The HTML report shows you a report of all your tests that have been run and on which browsers as well as how long they took. Tests can be filtered by passed tests, failed, flaky or skipped tests. You can also search for a particular test. Clicking on a test will open the detailed view where you can see more information on your tests such as the errors, the test steps and the trace.

```bash
npx playwright show-report
Expand Down
2 changes: 1 addition & 1 deletion python/docs/ci-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Playwright tests can be ran on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.
Playwright tests can be run on any CI provider. In this section we will cover running tests on GitHub using GitHub actions. If you would like to see how to configure other CI providers check out our detailed doc on Continuous Integration.

#### You will learn
- [How to set up GitHub Actions](/ci-intro.mdx#setting-up-github-actions)
Expand Down

0 comments on commit fc07c4f

Please sign in to comment.