feat(web): marketing Home page and the product component library (ADR 0023)
Product UI components are built once at design size from the Figma file and reused by the marketing mockups and, later, the app. Text contrast tokens now meet WCAG AA in both themes, with a test. Pricing stays hidden until decided. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SdXCbrN5PtGExkpvMaMHx
This commit is contained in:
@@ -13,8 +13,21 @@ describe('Button', () => {
|
||||
expect(screen.getByRole('link', { name: 'Get started' })).toHaveClass('btn', 'btn-primary', 'btn-md');
|
||||
});
|
||||
|
||||
it('supports the ghost variant and the large size', () => {
|
||||
render(<Button href="/product" variant="ghost" size="lg">See how it works</Button>);
|
||||
it('supports the ghost and secondary variants and the large size', () => {
|
||||
const { rerender } = render(<Button href="/product" variant="ghost" size="lg">See how it works</Button>);
|
||||
expect(screen.getByRole('link', { name: 'See how it works' })).toHaveClass('btn-ghost', 'btn-lg');
|
||||
rerender(<Button href="/trust" variant="secondary">How approval works</Button>);
|
||||
expect(screen.getByRole('link', { name: 'How approval works' })).toHaveClass('btn-secondary');
|
||||
});
|
||||
|
||||
it('supports a light variant for use on the dark panel', () => {
|
||||
render(<Button href="/signup" variant="light" size="lg">Get started</Button>);
|
||||
expect(screen.getByRole('link', { name: 'Get started' })).toHaveClass('btn-light');
|
||||
});
|
||||
|
||||
it('can end with an arrow that is not announced', () => {
|
||||
render(<Button href="/how-it-works" variant="ghost" size="lg" trailingIcon="arrow-right">See how it works</Button>);
|
||||
const link = screen.getByRole('link', { name: 'See how it works' });
|
||||
expect(link.querySelector('.icon')).toHaveAttribute('aria-hidden', 'true');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user