@@ -49,21 +49,26 @@ jobs:
4949 - name : Run Unit Tests
5050 run : dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests/ProductApp.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=unit-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 5m
5151
52- # E2E Tests with proper Playwright setup
52+ # E2E Tests with proper Playwright setup and web app hosting
53+ - name : Build Web Application (for E2E tests)
54+ run : dotnet build ${{ env.PROJECT_PATH }}/ProductApp.Web/ProductApp.Web.csproj --configuration Debug --no-restore
55+
5356 - name : Build E2E Tests Project
5457 run : dotnet build ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release
5558
56- - name : Install Playwright
59+ - name : Install Playwright Browsers
5760 run : |
5861 cd ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E
59- dotnet tool install --global Microsoft.Playwright.CLI
60- playwright install chromium
62+ dotnet tool install --global Microsoft.Playwright.CLI || true
63+ playwright install chromium --with-deps
6164 shell : bash
6265
63- - name : Run E2E Tests
64- run : dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=e2e-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 10m
66+ - name : Run E2E Tests (with integrated web app)
67+ run : dotnet test ${{ env.PROJECT_PATH }}/ProductApp.Tests.E2E/ProductApp.Tests.E2E.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=e2e-test-results.trx" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --blame --blame-hang-timeout 15m
6568 env :
6669 ASPNETCORE_ENVIRONMENT : Development
70+ DOTNET_ENVIRONMENT : Development
71+ CI : true
6772
6873 - name : Upload test results
6974 uses : actions/upload-artifact@v4
0 commit comments