Skip to content

Commit 97bef30

Browse files
Repoint comments to xunit-reqnroll as canonical reference
Per the spirit of recent review feedback that all sample repos should look + work similarly, treat xunit-reqnroll-playwright-browserstack as the closest precedent for this sample (vs csharp-playwright-browserstack, the older reference). Refreshes inline comments to point at the right hooks/scenario in xunit-reqnroll. No behavioural changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent dd1530b commit 97bef30

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

NunitPlaywrightBrowserstack.Tests/BStackLocalSampleTest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
namespace NunitPlaywrightBrowserstack.Tests;
22

3-
// Mirrors browserstack/csharp-playwright-browserstack -> SampleLocalTest.cs:
3+
// Mirrors xunit-reqnroll-playwright-browserstack's Features/LocalSample.feature
4+
// + StepDefinitions/LocalSampleSteps.cs:
45
// page.GotoAsync("http://bs-local.com:45454/") + title.Contains("BrowserStack Local")
56
//
67
// Requires:
78
// * browserstack.yml has `browserstackLocal: true`
8-
// * a local HTTP server is serving a page with title "BrowserStack Local Test"
9+
// * a local HTTP server is serving a page with title containing "BrowserStack Local"
910
// on port 45454 (the sanity workflow stands up `python -m http.server 45454`
1011
// against a one-file index.html harness).
1112
[TestFixture]

NunitPlaywrightBrowserstack.Tests/PlaywrightFixtureBase.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
namespace NunitPlaywrightBrowserstack.Tests;
44

5-
// Base [SetUp]/[TearDown] for every NUnit fixture that needs an IPage.
6-
// Customer code calls `pw.Chromium.LaunchAsync()` unconditionally; the
7-
// BrowserStack SDK rewrites the launch at runtime to route to the per-platform
8-
// browser configured in browserstack.yml (chrome / playwright-webkit /
9-
// playwright-firefox / edge). No Chromium.ConnectAsync(wss_url) plumbing here.
5+
// NUnit equivalent of xunit-reqnroll-playwright-browserstack's
6+
// Hooks/PlaywrightHooks.cs (BeforeScenario / AfterScenario) -- a per-test
7+
// fixture that creates an IPage. Customer code calls
8+
// `pw.Chromium.LaunchAsync()` unconditionally; the BrowserStack SDK rewrites
9+
// the launch at runtime to route to the per-platform browser configured in
10+
// browserstack.yml (chrome / playwright-webkit / playwright-firefox / edge).
11+
// No Chromium.ConnectAsync(wss_url) plumbing here.
1012
public abstract class PlaywrightFixtureBase
1113
{
1214
private IPlaywright? _pw;

0 commit comments

Comments
 (0)