2026-04-23 20:52:43 +03:00
|
|
|
import { render, screen } from '@testing-library/react';
|
|
|
|
|
import { UtilityBar } from './UtilityBar';
|
2026-04-19 08:40:08 +03:00
|
|
|
|
|
|
|
|
describe('UtilityBar', () => {
|
|
|
|
|
describe('rendering', () => {
|
|
|
|
|
it('renders "Contact" label', () => {
|
2026-04-23 20:52:43 +03:00
|
|
|
render(<UtilityBar />);
|
|
|
|
|
expect(screen.getByText('Contact')).toBeInTheDocument();
|
|
|
|
|
});
|
2026-04-19 08:40:08 +03:00
|
|
|
|
|
|
|
|
it('renders email link with correct href', () => {
|
2026-04-23 20:52:43 +03:00
|
|
|
render(<UtilityBar />);
|
|
|
|
|
const link = screen.getByRole('link', { name: 'hello@allmy.work' });
|
|
|
|
|
expect(link).toBeInTheDocument();
|
|
|
|
|
expect(link).toHaveAttribute('href', 'mailto:hello@allmy.work');
|
|
|
|
|
});
|
2026-04-19 08:40:08 +03:00
|
|
|
|
|
|
|
|
it('renders "Download CV" button', () => {
|
2026-04-23 20:52:43 +03:00
|
|
|
render(<UtilityBar />);
|
|
|
|
|
expect(screen.getByRole('button', { name: /download cv/i })).toBeInTheDocument();
|
|
|
|
|
});
|
2026-04-19 08:40:08 +03:00
|
|
|
|
|
|
|
|
it('Download CV button has primary variant class', () => {
|
2026-04-23 20:52:43 +03:00
|
|
|
render(<UtilityBar />);
|
|
|
|
|
const btn = screen.getByRole('button', { name: /download cv/i });
|
|
|
|
|
expect(btn).toHaveClass('bg-burnt-oxide');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|