diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml index 01be71ad..bc901da1 100644 --- a/.github/workflows/pull-request-validation.yml +++ b/.github/workflows/pull-request-validation.yml @@ -130,6 +130,11 @@ jobs: HELPDESK_E2E_AUTH_MODE: development run: tools/ci/run-ux-local.sh + - name: Run AI Assistant Playwright validation + env: + HELPDESK_AI_ASSISTANT_CONFIGURATION: Release + run: npm run test:ux:ai-assistant + - name: Upload Playwright reports and failure artifacts if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/playwright.ai-assistant.config.ts b/playwright.ai-assistant.config.ts index 5f5d7598..5cf535a0 100644 --- a/playwright.ai-assistant.config.ts +++ b/playwright.ai-assistant.config.ts @@ -1,6 +1,10 @@ import { defineConfig } from '@playwright/test'; import base from './playwright.config'; +const newWebCommand = process.env.HELPDESK_AI_ASSISTANT_CONFIGURATION === 'Release' + ? 'dotnet bin/Release/net10.0/HelpDesk.NewWeb.dll' + : 'dotnet run --no-build --no-launch-profile'; + export default defineConfig(base, { testMatch: '**/ai-assistant-chat.spec.ts', testIgnore: [], @@ -9,7 +13,8 @@ export default defineConfig(base, { webServer: [ { command: 'node tests/ux/ai-assistant-fixture-api.mjs', url: 'http://127.0.0.1:18299/fixture/health', reuseExistingServer: !process.env.CI }, { - command: 'dotnet run --project src/HelpDesk.NewWeb --no-build --no-launch-profile', + command: newWebCommand, + cwd: 'src/HelpDesk.NewWeb', url: 'https://127.0.0.1:5158/health', ignoreHTTPSErrors: true, timeout: 120_000, reuseExistingServer: !process.env.CI, env: { diff --git a/src/HelpDesk.NewWeb/Components/Shared/AiAssistantTurnActivity.razor b/src/HelpDesk.NewWeb/Components/Shared/AiAssistantTurnActivity.razor index a6cda452..f1cb5d1d 100644 --- a/src/HelpDesk.NewWeb/Components/Shared/AiAssistantTurnActivity.razor +++ b/src/HelpDesk.NewWeb/Components/Shared/AiAssistantTurnActivity.razor @@ -6,6 +6,13 @@