Update test suite to reflect "Design System" renaming and improved navigation structure

- Replaced "Components" references with "Design System" in both links and test assertions.
- Adjusted `DemoCredentialsModal` tests to include separate links for user/admin login and updated text expectations.
- Enhanced `Home` tests with new demo content validation (`User Dashboard`) and renamed navigation elements.
This commit is contained in:
2025-11-12 17:48:22 +01:00
parent 228d12b379
commit 14e5839476
3 changed files with 17 additions and 12 deletions

View File

@@ -64,7 +64,8 @@ describe('Header', () => {
/>
);
expect(screen.getByRole('link', { name: 'Components' })).toHaveAttribute('href', '/dev');
expect(screen.getByRole('link', { name: 'Home' })).toHaveAttribute('href', '/');
expect(screen.getByRole('link', { name: 'Design System' })).toHaveAttribute('href', '/dev');
expect(screen.getByRole('link', { name: 'Admin Demo' })).toHaveAttribute('href', '/admin');
});
@@ -154,8 +155,8 @@ describe('Header', () => {
// Note: SheetContent is hidden by default in tests, but we can verify the links exist
// The actual mobile menu behavior is tested in E2E tests
const componentsLinks = screen.getAllByRole('link', { name: /components/i });
expect(componentsLinks.length).toBeGreaterThan(0);
const designSystemLinks = screen.getAllByRole('link', { name: /Design System/i });
expect(designSystemLinks.length).toBeGreaterThan(0);
});
it('mobile menu contains GitHub link', () => {