Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (07-07-23) (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Jul 7, 2023
1 parent 6b63e07 commit 691c838
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dotnet/docs/mock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ await page.RouteFromHARAsync("./hars/fruit.har", new () {

// Go to the page
await page.GotoAsync("https://demo.playwright.dev/api-mocking");

// Assert that the fruit is visible
await Expect(page.GetByText("Strawberry")).ToBeVisibleAsync();
```

### Modifying a HAR file
Expand Down
3 changes: 3 additions & 0 deletions java/docs/mock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ page.routeFromHAR("./hars/fruit.har", new RouteFromHAROptions()

// Go to the page
page.goto("https://demo.playwright.dev/api-mocking");

// Assert that the fruit is visible
assertThat(page.getByText("Strawberry")).isVisible();
```

### Modifying a HAR file
Expand Down
3 changes: 3 additions & 0 deletions nodejs/docs/mock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ test('records or updates the HAR file', async ({ page }) => {

// Go to the page
await page.goto('https://demo.playwright.dev/api-mocking');

// Assert that the fruit is visible
await expect(page.getByText('Strawberry')).toBeVisible();
});
```

Expand Down
6 changes: 6 additions & 0 deletions python/docs/mock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def records_or_updates_the_har_file(page: Page):

# Go to the page
page.goto("https://demo.playwright.dev/api-mocking")

# Assert that the fruit is visible
expect(page.get_by_text("Strawberry")).to_be_visible()
```

</TabItem>
Expand All @@ -176,6 +179,9 @@ async def records_or_updates_the_har_file(page: Page):

# Go to the page
await page.goto("https://demo.playwright.dev/api-mocking")

# Assert that the fruit is visible
await expect(page.get_by_text("Strawberry")).to_be_visible()
```

</TabItem>
Expand Down

0 comments on commit 691c838

Please sign in to comment.