[Sprint 2] Set Up Playwright E2E Infrastructure#111
Conversation
- Rename AppHost.Tests.Unit to AppHost.Tests.E2E - Update solution file, CI workflow, and pre-push hook references - Add Microsoft.Playwright.NUnit package to Directory.Packages.props - Add Playwright browser installation step to CI workflow - Update namespaces and copyright headers in test files Closes #108 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Introduces Playwright E2E testing infrastructure by renaming the AppHost test project to AppHost.Tests.E2E, aligning namespaces/root namespace, and updating developer/CI tooling to build and run the renamed executable (with Playwright browser installation in CI).
Changes:
- Renamed AppHost test project identity to
AppHost.Tests.E2E(solution entry, root namespace, code namespaces/usings, and header project names). - Added Playwright dependencies and xUnit runner configuration to support upcoming browser-based E2E tests.
- Updated pre-push hook and CI workflow to build/run the new
AppHost.Tests.E2Eexecutable and publish renamed artifacts.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/AppHost.Tests.E2E/xunit.runner.json | Adds xUnit runner settings for the E2E test project. |
| tests/AppHost.Tests.E2E/RedisServiceTests.cs | Updates header project name and namespace to AppHost.Tests.E2E. |
| tests/AppHost.Tests.E2E/OpenTelemetryExporterTests.cs | Updates header project name and namespace to AppHost.Tests.E2E. |
| tests/AppHost.Tests.E2E/GlobalUsings.cs | Updates header project name and fixture namespace import for E2E. |
| tests/AppHost.Tests.E2E/Fixtures/IntegrationTestCollection.cs | Moves fixtures into AppHost.Tests.E2E.Fixtures namespace. |
| tests/AppHost.Tests.E2E/Fixtures/DistributedApplicationFixture.cs | Moves fixture into AppHost.Tests.E2E.Fixtures namespace. |
| tests/AppHost.Tests.E2E/ExtensionsTests.cs | Updates header project name and namespace to AppHost.Tests.E2E. |
| tests/AppHost.Tests.E2E/DatabaseServiceTests.cs | Updates header project name and namespace to AppHost.Tests.E2E. |
| tests/AppHost.Tests.E2E/AppHostTests.cs | Updates header project name and namespace to AppHost.Tests.E2E. |
| tests/AppHost.Tests.E2E/AppHost.Tests.E2E.csproj | Renames root namespace and adds Playwright package references; ensures xunit.runner.json is copied to output. |
| scripts/hooks/pre-push | Updates project mapping to AppHost.Tests.E2E for header validation. |
| IssueManager.sln | Renames solution project entry to AppHost.Tests.E2E and updates csproj path. |
| Directory.Packages.props | Adds centralized version for Microsoft.Playwright.NUnit. |
| .squad/agents/boromir/history.md | Documents the E2E infrastructure setup and project rename. |
| .github/workflows/squad-test.yml | Renames CI job to test-apphost-e2e, installs Playwright Chromium, runs E2E exe directly, and updates dependencies/artifacts. |
Comments suppressed due to low confidence (1)
tests/AppHost.Tests.E2E/AppHost.Tests.E2E.csproj:23
Microsoft.Playwright.NUnitis referenced in this xUnit v3 test project, but there are no NUnit usages in the project (and xUnit won’t use NUnit’s Playwright fixtures). This extra dependency can be confusing and increases restore/build surface; please remove it unless you’re actually adding NUnit-based tests (in which case it likely belongs in a separate NUnit test project/workflow).
You can also share your feedback on Copilot code review. Take the survey.
Directory.Packages.props
Outdated
| <PackageVersion Include="Testcontainers" Version="4.10.0" /> | ||
| <PackageVersion Include="Testcontainers.MongoDB" Version="4.10.0" /> | ||
| <PackageVersion Include="Microsoft.Playwright" Version="1.58.0" /> | ||
| <PackageVersion Include="Microsoft.Playwright.NUnit" Version="1.58.0" /> |
There was a problem hiding this comment.
This adds a centralized package version for Microsoft.Playwright.NUnit, but the current test project is xUnit-based and doesn’t use NUnit. If Microsoft.Playwright.NUnit isn’t needed, please remove this entry to avoid carrying an unused dependency across the repo.
| <PackageVersion Include="Microsoft.Playwright.NUnit" Version="1.58.0" /> |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
=======================================
Coverage 55.52% 55.52%
=======================================
Files 124 124
Lines 2826 2826
Branches 313 313
=======================================
Hits 1569 1569
Misses 1027 1027
Partials 230 230 🚀 New features to boost your workflow:
|
The test project uses xUnit, not NUnit, so this dependency is unnecessary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Sets up the Playwright E2E testing infrastructure as requested in Sprint 2 of the Auth0 RBAC milestone.
Changes
Project Rename
AppHost.Tests.Unit→AppHost.Tests.E2EAppHost→AppHost.Tests.E2ENuGet Packages
Microsoft.Playwright.NUnittoDirectory.Packages.props(v1.58.0)Microsoft.Playwrightwas already presentCI Configuration
test-apphost-unit→test-apphost-e2epwsh playwright.ps1 install --with-deps chromium)Pre-Push Hook
AppHost.Tests.E2EWhat's Next (Sprint 3)
Gimli will write actual E2E tests in a future sprint. This PR only sets up the infrastructure.
Closes #108
Working as Boromir (DevOps)