fix(web): hygiene — OG image/metadataBase, Header a11y text + nav flag, dead code
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
- siteConfig.ogImage pointed to an existing asset; metadataBase added so relative OG/Twitter URLs resolve against the real origin instead of localhost - Header sr-only menu label moved to common.json (a11y.openMenu/closeMenu); navigation primary styling driven by a NavigationItem.primary flag instead of brittle 'Kapcsolat' string comparisons - remove dead code: lib/site-config.ts (unused hybrid config) and the unused, schema-divergent siteConfig.contact.form - ContactConfig type cleaned up (address/form removed) Closes MITHOME-77
This commit is contained in:
@@ -2,6 +2,7 @@ import { render, screen, fireEvent } from '@testing-library/react'
|
||||
import '@testing-library/jest-dom'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import Header from './Header'
|
||||
import { common } from '@/content'
|
||||
|
||||
// Mock Next.js Link component
|
||||
jest.mock('next/link', () => {
|
||||
@@ -52,14 +53,14 @@ describe('Header', () => {
|
||||
|
||||
// The hamburger menu button is hidden by default in desktop view
|
||||
// We can test its presence even if not visible
|
||||
const hamburgerButton = screen.getByRole('button', { name: /open main menu/i })
|
||||
const hamburgerButton = screen.getByRole('button', { name: new RegExp(common.a11y.openMenu, 'i') })
|
||||
expect(hamburgerButton).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should have proper accessibility attributes', () => {
|
||||
render(<Header />)
|
||||
|
||||
const hamburgerButton = screen.getByRole('button', { name: /open main menu/i })
|
||||
const hamburgerButton = screen.getByRole('button', { name: new RegExp(common.a11y.openMenu, 'i') })
|
||||
expect(hamburgerButton).toHaveAttribute('aria-expanded', 'false')
|
||||
})
|
||||
|
||||
@@ -82,7 +83,7 @@ describe('Header', () => {
|
||||
const user = userEvent.setup()
|
||||
render(<Header />)
|
||||
|
||||
const hamburgerButton = screen.getByRole('button', { name: /open main menu/i })
|
||||
const hamburgerButton = screen.getByRole('button', { name: new RegExp(common.a11y.openMenu, 'i') })
|
||||
|
||||
// Initially menu should be closed
|
||||
expect(hamburgerButton).toHaveAttribute('aria-expanded', 'false')
|
||||
@@ -100,7 +101,7 @@ describe('Header', () => {
|
||||
const user = userEvent.setup()
|
||||
render(<Header />)
|
||||
|
||||
const hamburgerButton = screen.getByRole('button', { name: /open main menu/i })
|
||||
const hamburgerButton = screen.getByRole('button', { name: new RegExp(common.a11y.openMenu, 'i') })
|
||||
|
||||
// Open the mobile menu
|
||||
await user.click(hamburgerButton)
|
||||
|
||||
Reference in New Issue
Block a user