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

docs: improve dotnet getting started #30594

Merged
merged 7 commits into from
May 2, 2024

Conversation

debs-obrien
Copy link
Contributor

full re-write of dotnet guide

@debs-obrien debs-obrien requested a review from mxschmitt April 29, 2024 15:55
docs/src/ci-intro.md Outdated Show resolved Hide resolved
@@ -29,7 +29,7 @@ playwright codegen demo.playwright.dev/todomvc
```

```bash csharp
pwsh bin/Debug/netX/playwright.ps1 codegen demo.playwright.dev/todomvc
pwsh bin/Debug/net8.0/playwright.ps1 codegen demo.playwright.dev/todomvc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd not touch this, since either we should change it everywhere or leave it as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change it everywhere as it makes for a much better learning journey rather than having to manually modify it for each command, codegen, trace viewer etc

dotnet only changes version once per year so when we recommend version 9 we make a change and thats it

docs/src/intro-csharp.md Outdated Show resolved Hide resolved
docs/src/running-tests-csharp.md Outdated Show resolved Hide resolved
@@ -173,19 +172,19 @@ public class UnitTest1 : PageTest
public async Task TestCleanup()
{
// This will produce e.g.:
// bin/Debug/net8.0/playwright-traces/PlaywrightTests.UnitTest1.zip
// bin/Debug/net8.0/playwright-traces/PlaywrightTests.ExampleTest.GetStartedLink.zip
await Context.Tracing.StopAsync(new()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets adjust this snippet (MSTest and NUnit) or add it in a commented variant, so that users know how to implemented "retain-on-failure".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the comment as it is mentioned below.
Need guidelines on how to add retain on failure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also follow-up with that.

docs/src/trace-viewer-intro-csharp-java-python.md Outdated Show resolved Hide resolved
Playwright provides an async function called [Expect](./test-assertions) to assert and wait until the expected condition is met.

```csharp
await Expect(Page).ToHaveTitleAsync(new Regex("Playwright"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like ToHaveTitleAsync is the most useless one, lets give users an example which uses a locator, e.g. ToHaveTextAsync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, but it aligns with JS and Python so if we change it we should change it everywhere. should we?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should, lets follow-up with that.

debs-obrien and others added 2 commits April 30, 2024 10:16
Co-authored-by: Max Schmitt <[email protected]>
Signed-off-by: Debbie O'Brien <[email protected]>
@debs-obrien debs-obrien merged commit bf11c95 into microsoft:main May 2, 2024
3 checks passed
@debs-obrien debs-obrien deleted the dotnet-intro branch May 2, 2024 10:06
mxschmitt pushed a commit to mxschmitt/playwright that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants