Skip to content

Infra: Rename to PlaywrightSharp, add CI/CD, migrate to NUnit (#70, #71)#74

Open
kblok wants to merge 12 commits intomainfrom
infra-combined
Open

Infra: Rename to PlaywrightSharp, add CI/CD, migrate to NUnit (#70, #71)#74
kblok wants to merge 12 commits intomainfrom
infra-combined

Conversation

@kblok
Copy link
Member

@kblok kblok commented Mar 20, 2026

Summary

Test plan

  • Verify dotnet build ./src/PlaywrightSharp.sln succeeds with 0 errors
  • Verify namespaces are consistently PlaywrightSharp.* throughout
  • Verify CI workflows trigger correctly on PR
  • Spot-check test files for correct NUnit patterns ([Test], Assert.That, [SetUp])

Closes #70, Closes #71

🤖 Generated with Claude Code

- Renamed all assemblies/namespaces from Microsoft.Playwright to PlaywrightSharp
- Added GitHub Actions CI/CD workflows (matrix testing, code style, NuGet publish)
- Migrated test framework from xUnit to NUnit 4.x
- Created PlaywrightSharp.Nunit project with PlaywrightTestAttribute

Closes #70, Closes #71

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kblok and others added 11 commits March 20, 2026 14:51
- Split HTTPS cert step into Linux/Windows variants (mkdir -p is bash-only)
- Run dotnet format to fix whitespace issues across test files
- Delete old workflows: docs.yml, nuget-package-tests.yml, nuget.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dotnet format in .NET 10 includes analyzer diagnostics (NUnit2007,
ASP0019, ASP0016, SA1600/SA1602) which cause --verify-no-changes to
exit with code 2 even when no actual formatting changes are needed.
Split into whitespace + style subcommands to check formatting without
failing on third-party analyzer warnings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename DefaultPuppeteerTimeout to DefaultContextTimeout and replace
PuppeteerSharp comments with PlaywrightSharp to pass the no-puppeteer
CI check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The --filter "Category=chromium/firefox" was an xUnit leftover. In the
NUnit migration, tests don't have [Category] attributes, so the filter
matched zero tests. The PRODUCT env variable already controls which
browser is used, and SkipBrowserAndPlatformFact handles skipping
incompatible browser tests at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TestServerSetup was in PlaywrightSharp.Tests.BaseTests namespace but
tests are in PlaywrightSharp.Tests. NUnit SetUpFixture only applies to
its own namespace and children, so the fixture never ran for the actual
tests, causing NullReferenceException on Server.Reset().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The DriverDownloader was hardcoded to download to src/Playwright/Drivers
but the project was renamed to src/PlaywrightSharp/. Also added the
missing download-drivers step before build, which downloads the
Playwright driver binaries needed for the MSBuild targets to copy
drivers and install browsers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The old driver version (1.10.0) tries to download browser builds from
CDN URLs that return 400 (ubuntu-18.04 suffix, old revision numbers).
Added PlaywrightSkipBrowserInstall property to skip the MSBuild
InstallBrowsers target, and install browsers via npx playwright which
handles modern OS versions correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dotnet test was re-triggering MSBuild targets including InstallBrowsers
(without PlaywrightSkipBrowserInstall=true), causing browser download
failures. Since the build step already compiled everything, pass
--no-build to skip the redundant rebuild.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 1.10.0-next driver uses placeholder revision 1234 for browser
paths (e.g. firefox-1234/) but npx playwright@1.10.0 install uses
real revisions. Create symlinks from *-1234 to the actual browser
directories so the driver can find them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Playwright 1.10.0's browser download CDN no longer serves old builds.
Use latest npx playwright install which has working CDN URLs, then
symlink to the revision-1234 paths the -next driver expects. Also
added ls -la for debugging browser directory state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant