import ArrowIcon from './Arrow/Arrow'; import BlogIcon from './Blog/Blog'; import CloseIcon from './Close/Close'; import CogIcon from './Cog/Cog'; import ContactIcon from './Contact/Contact'; import CopyrightIcon from './Copyright/Copyright'; import CVIcon from './CV/CV'; import HamburgerIcon from './Hamburger/Hamburger'; import HomeIcon from './Home/Home'; import MoonIcon from './Moon/Moon'; import ProjectsIcon from './Projects/Projects'; import SearchIcon from './Search/Search'; import SunIcon from './Sun/Sun'; export { ArrowIcon, BlogIcon, CloseIcon, CogIcon, ContactIcon, CopyrightIcon, CVIcon, HamburgerIcon, HomeIcon, MoonIcon, ProjectsIcon, SearchIcon, SunIcon, }; git'>
aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/card/card-actions.test.tsx
blob: 94c267732bfb37ee60fbb085f7e685b637ca0098 (plain)
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
32
33
34
35
36
37
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '@testing-library/react';
import { CardActions } from './card-actions';

describe('CardActions', () => {
  it('renders its children', () => {
    const actions = 'animi et omnis';

    render(<CardActions>{actions}</CardActions>);

    expect(rtlScreen.getByText(actions)).toBeInTheDocument();
  });

  it('can render its children with start alignment', () => {
    const actions = 'animi et omnis';

    render(<CardActions alignment="start">{actions}</CardActions>);

    expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: flex-start`);
  });

  it('can render its children with centered alignment', () => {
    const actions = 'animi et omnis';

    render(<CardActions alignment="center">{actions}</CardActions>);

    expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: center`);
  });

  it('can render its children with end alignment', () => {
    const actions = 'animi et omnis';

    render(<CardActions alignment="end">{actions}</CardActions>);

    expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: flex-end`);
  });
});