diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e10cb07..0b3ddf9 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -37,27 +37,27 @@ jobs: - name: Dotnet Build run: dotnet build -c Release - #- name: Run App - # working-directory: ${{ matrix.path }} - # run: Start-Process dotnet 'run','-c','Release','--launch-profile','https' -PassThru - # shell: pwsh - - #- name: Install Playwright - # working-directory: tests/BlazorApplicationInsights.Tests/bin/Release/net9.0 - # run: ./playwright.ps1 install --with-deps - # shell: pwsh - - #- name: Run Tests - # working-directory: tests/BlazorApplicationInsights.Tests - # run: dotnet test -c Release --logger "trx;LogFileName=test-results.trx" - - #- name: Test Report - # uses: dorny/test-reporter@v2 - # if: success() || failure() - # with: - # name: KubeUI Tests - # path: tests/BlazorApplicationInsights.Tests/TestResults/test-results.trx - # reporter: dotnet-trx + - name: Run App + working-directory: ${{ matrix.path }} + run: Start-Process dotnet 'run','-c','Release','--launch-profile','https' -PassThru + shell: pwsh + + - name: Install Playwright + working-directory: tests/BlazorApplicationInsights.Tests/bin/Release/net9.0 + run: ./playwright.ps1 install --with-deps + shell: pwsh + + - name: Run Tests + working-directory: tests/BlazorApplicationInsights.Tests + run: dotnet test -c Release --logger "trx;LogFileName=test-results.trx" + + - name: Test Report + uses: dorny/test-reporter@v2 + if: success() || failure() + with: + name: KubeUI Tests + path: tests/BlazorApplicationInsights.Tests/TestResults/test-results.trx + reporter: dotnet-trx build: name: Create Release diff --git a/README.md b/README.md index b262cb5..5087108 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Application Insights for Blazor web applications - **Note:** Leave InstrumentationKey zero'd out and DisableTelemetry as true, they will be updated by Blazor on startup ```html """; + script = $$$$""""""; } /// diff --git a/tests/BlazorApplicationInsights.Tests/UnitTests.cs b/tests/BlazorApplicationInsights.Tests/UnitTests.cs index c0e1a00..3f0ce83 100644 --- a/tests/BlazorApplicationInsights.Tests/UnitTests.cs +++ b/tests/BlazorApplicationInsights.Tests/UnitTests.cs @@ -619,12 +619,21 @@ public async Task TestBlocked(string id) if (e.Type == "error" && e.Text != "Failed to load resource: net::ERR_FAILED" && !e.Text.Contains("Something wrong happened :(")) { hasError = true; + output.WriteLine(e.Text); } }; - await page.RouteAsync("https://dc.services.visualstudio.com/v2/track", async (x) => await x.AbortAsync()); - - await page.RouteAsync("https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js", async (x) => await x.AbortAsync()); + await page.RouteAsync("**", async r => + { + if (r.Request.Url == "https://dc.services.visualstudio.com/v2/track" || r.Request.Url == "https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js") + { + await r.AbortAsync(); + } + else + { + await r.ContinueAsync(); + } + }); page.RequestFailed += (sender, e) => {