diff --git a/web/__tests__/marketing/Button.test.tsx b/web/__tests__/marketing/Button.test.tsx new file mode 100644 index 0000000..6ce9fed --- /dev/null +++ b/web/__tests__/marketing/Button.test.tsx @@ -0,0 +1,20 @@ +import { render, screen } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import { Button } from '../../src/marketing/Button.tsx'; + +describe('Button', () => { + it('renders a link with its label and destination', () => { + render(); + expect(screen.getByRole('link', { name: 'Get started' })).toHaveAttribute('href', '/signup'); + }); + + it('is the primary (inverse) pill by default', () => { + render(); + expect(screen.getByRole('link', { name: 'Get started' })).toHaveClass('btn', 'btn-primary', 'btn-md'); + }); + + it('supports the ghost variant and the large size', () => { + render(); + expect(screen.getByRole('link', { name: 'See how it works' })).toHaveClass('btn-ghost', 'btn-lg'); + }); +}); diff --git a/web/__tests__/marketing/Footer.test.tsx b/web/__tests__/marketing/Footer.test.tsx new file mode 100644 index 0000000..c1d1090 --- /dev/null +++ b/web/__tests__/marketing/Footer.test.tsx @@ -0,0 +1,42 @@ +import { render, screen, within } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import { Footer } from '../../src/marketing/Footer.tsx'; + +describe('Footer', () => { + it('shows the brand and tagline', () => { + render(