Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Clientside/src/branding/indexHtmlBranding.spec.ts
Original file line number Diff line number Diff line change
@@ -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('<title>DX Telemetry Dashboard</title>');
});

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"');
});
4 changes: 3 additions & 1 deletion src/Clientside/src/components/layout/AppShell.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ test('renders header logo', async ({ mount }) => {
</AppShell>,
{ 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 }) => {
Expand Down
Loading