diff --git a/src/Clientside/src/branding/indexHtmlBranding.spec.ts b/src/Clientside/src/branding/indexHtmlBranding.spec.ts new file mode 100644 index 0000000..c91930c --- /dev/null +++ b/src/Clientside/src/branding/indexHtmlBranding.spec.ts @@ -0,0 +1,14 @@ +import { test, expect } from '@playwright/experimental-ct-react'; +import { readFileSync } from 'fs'; +import { resolve } from 'path'; + +test('index.html uses DX title', async () => { + const html = readFileSync(resolve(process.cwd(), 'index.html'), 'utf8'); + expect(html).toContain('DX Telemetry Dashboard'); +}); + +test('index.html includes favicon links (svg + png fallback)', async () => { + const html = readFileSync(resolve(process.cwd(), 'index.html'), 'utf8'); + expect(html).toContain('rel="icon" type="image/svg+xml" href="/favicon.svg"'); + expect(html).toContain('rel="alternate icon" type="image/png" href="/favicon.png"'); +}); diff --git a/src/Clientside/src/components/layout/AppShell.spec.tsx b/src/Clientside/src/components/layout/AppShell.spec.tsx index 5d90504..4b77d7c 100644 --- a/src/Clientside/src/components/layout/AppShell.spec.tsx +++ b/src/Clientside/src/components/layout/AppShell.spec.tsx @@ -8,7 +8,9 @@ test('renders header logo', async ({ mount }) => { , { hooksConfig: { enableRouting: true } }, ); - await expect(component.getByRole('img', { name: 'DX Telemetry' })).toBeVisible(); + const logo = component.getByRole('img', { name: 'DX Telemetry' }); + await expect(logo).toBeVisible(); + await expect(logo).toHaveAttribute('src', /data:image\/svg\+xml|dx-telemetry-logo-header\.svg/); }); test('renders all navigation tabs', async ({ mount }) => {