Skip to content

Commit

Permalink
docs(clock): Fix C# version of clock documentation (#31560)
Browse files Browse the repository at this point in the history
  • Loading branch information
RenderMichael authored Jul 8, 2024
1 parent 21c4531 commit 1d93054
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ assertThat(locator).hasText("2/2/2024, 10:30:00 AM");
```csharp
// Initialize clock with some time before the test time and let the page load naturally.
// `Date.now` will progress as the timers fire.
await Page.Clock.InstallAsync(new
await Page.Clock.InstallAsync(new()
{
Time = new DateTime(2024, 2, 2, 8, 0, 0)
TimeDate = new DateTime(2024, 2, 2, 8, 0, 0)
});
await Page.GotoAsync("http://localhost:3333");

Expand Down Expand Up @@ -370,9 +370,9 @@ assertThat(locator).hasText("2/2/2024, 10:00:02 AM");

```csharp
// Initialize clock with a specific time, let the page load naturally.
await Page.Clock.InstallAsync(new
await Page.Clock.InstallAsync(new()
{
Time = new DateTime(2024, 2, 2, 8, 0, 0, DateTimeKind.Pst)
TimeDate = new DateTime(2024, 2, 2, 8, 0, 0, DateTimeKind.Pst)
});
await page.GotoAsync("http://localhost:3333");
var locator = page.GetByTestId("current-time");
Expand Down

0 comments on commit 1d93054

Please sign in to comment.