📦 EqualifyEverything / equalify-dashboard

📄 footer.test.tsx · 32 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32import { axe, toHaveNoViolations } from 'jest-axe';
import { describe, expect, it } from 'vitest';

import { Footer } from '~/components/layout';
import { render, screen } from '../customRender';

expect.extend(toHaveNoViolations);

describe('Footer Component', () => {
  it('renders version information and links correctly', () => {
    render(<Footer />);
    expect(
      screen.getByText(
        /Equalify Web App - Version 0.1.0 \(Development Preview\)/,
      ),
    ).toBeInTheDocument();
    expect(screen.getByText('Report an Issue')).toHaveAttribute(
      'href',
      'https://github.com/equalifyEverything/v1/issues',
    );
    expect(screen.getByText('Accessibility Statement')).toHaveAttribute(
      'href',
      'https://github.com/EqualifyEverything/v1/blob/main/ACCESSIBILITY.md',
    );
  });
  it('is accessible', async () => {
    const { container } = render(<Footer />);
    const results = await axe(container);
    expect(results).toHaveNoViolations();
  });
});