@patternfly/react-core 4.199.1 → 4.199.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +5 -5
  3. package/src/components/AboutModal/__tests__/AboutModal.test.tsx +41 -60
  4. package/src/components/Accordion/__tests__/Accordion.test.tsx +23 -17
  5. package/src/components/Alert/__tests__/Alert.test.tsx +195 -184
  6. package/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx +19 -17
  7. package/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap +26 -4
  8. package/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +50 -700
  9. package/src/components/AlertGroup/__tests__/AlertGroup.test.tsx +68 -73
  10. package/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +1 -893
  11. package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx +13 -10
  12. package/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap +12 -1
  13. package/src/components/Button/__tests__/Button.test.tsx +116 -107
  14. package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +21 -21
  15. package/src/components/Card/__tests__/Card.test.tsx +119 -100
  16. package/src/components/Card/__tests__/CardBody.test.tsx +35 -28
  17. package/src/components/Card/__tests__/CardFooter.test.tsx +28 -24
  18. package/src/components/Card/__tests__/CardHeadMain.test.tsx +19 -14
  19. package/src/components/Card/__tests__/CardHeader.test.tsx +6 -22
  20. package/src/components/Card/__tests__/CardHeaderMain.test.tsx +19 -14
  21. package/src/components/Card/__tests__/CardTitle.test.tsx +25 -0
  22. package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +12 -28
  23. package/src/components/Card/__tests__/__snapshots__/CardBody.test.tsx.snap +2 -4
  24. package/src/components/Card/__tests__/__snapshots__/CardFooter.test.tsx.snap +1 -3
  25. package/src/components/Card/__tests__/__snapshots__/CardHeadMain.test.tsx.snap +1 -11
  26. package/src/components/Card/__tests__/__snapshots__/CardHeader.test.tsx.snap +1 -11
  27. package/src/components/Card/__tests__/__snapshots__/CardHeaderMain.test.tsx.snap +1 -11
  28. package/src/components/Card/__tests__/__snapshots__/CardTitle.test.tsx.snap +3 -0
  29. package/src/components/Checkbox/__tests__/Checkbox.test.tsx +66 -70
  30. package/src/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +9 -204
  31. package/src/components/Chip/examples/Chip.md +1 -73
  32. package/src/components/Chip/examples/ChipDefault.tsx +68 -0
  33. package/src/components/ClipboardCopy/examples/ClipboardCopy.md +11 -123
  34. package/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx +8 -0
  35. package/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx +9 -0
  36. package/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx +14 -0
  37. package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx +7 -0
  38. package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx +8 -0
  39. package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx +36 -0
  40. package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx +20 -0
  41. package/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx +18 -0
  42. package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx +8 -0
  43. package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx +9 -0
  44. package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx +9 -0
  45. package/src/layouts/Flex/examples/Flex.md +1 -1
@@ -1,105 +1,124 @@
1
1
  import React from 'react';
2
- import { Card } from '../Card';
3
- import { shallow } from 'enzyme';
4
-
5
- test('renders with PatternFly Core styles', () => {
6
- const view = shallow(<Card />).dive();
7
- expect(view).toMatchSnapshot();
8
- });
9
-
10
- test('className is added to the root element', () => {
11
- const view = shallow(<Card className="extra-class" />).dive();
12
- expect(view.prop('className')).toMatchSnapshot();
13
- });
14
-
15
- test('extra props are spread to the root element', () => {
16
- const testId = 'card';
17
- const view = shallow(<Card data-testid={testId} />).dive();
18
- expect(view.prop('data-testid')).toBe(testId);
19
- });
20
-
21
- test('allows passing in a string as the component', () => {
22
- const component = 'section';
23
- const view = shallow(<Card component={component} />).dive();
24
- expect(view.type()).toBe(component);
25
- });
26
-
27
- test('allows passing in a React Component as the component', () => {
28
- const Component = () => <div>im a div</div>;
29
- const view = shallow(<Card component={(Component as unknown) as keyof JSX.IntrinsicElements} />).dive();
30
- expect(view.type()).toBe(Component);
31
- });
32
-
33
- test('card with isHoverable applied ', () => {
34
- const view = shallow(<Card isHoverable />).dive();
35
- expect(view).toMatchSnapshot();
36
- });
37
-
38
- test('card with isCompact applied ', () => {
39
- const view = shallow(<Card isCompact />).dive();
40
- expect(view).toMatchSnapshot();
41
- });
42
-
43
- test('card with isSelectable applied ', () => {
44
- const view = shallow(<Card isSelectable />).dive();
45
- expect(view.prop('className')).toMatch(/selectable/);
46
- expect(view.prop('tabIndex')).toBe('0');
47
- });
48
2
 
49
- test('card with isSelectable and isSelected applied ', () => {
50
- const view = shallow(<Card isSelectable isSelected />).dive();
51
- expect(view.prop('className')).toMatch(/selectable/);
52
- expect(view.prop('className')).toMatch(/selected/);
53
- expect(view.prop('tabIndex')).toBe('0');
54
- });
55
-
56
- test('card with only isSelected applied - not change', () => {
57
- const view = shallow(<Card isSelected />).dive();
58
- expect(view.prop('className')).not.toMatch(/selected/);
59
- expect(view.prop('tabIndex')).toBe(undefined);
60
- });
61
-
62
- test('card with isDisabledRaised applied', () => {
63
- const view = shallow(<Card isDisabledRaised />).dive();
64
- expect(view.prop('className')).toMatch(/non-selectable-raised/);
65
- });
66
-
67
- test('card with isSelectableRaised applied - not change', () => {
68
- const view = shallow(<Card isSelectableRaised />).dive();
69
- expect(view.prop('className')).toMatch(/selectable-raised/);
70
- expect(view.prop('tabIndex')).toBe('0');
71
- });
72
-
73
- test('card with isSelectableRaised and isSelected applied ', () => {
74
- const view = shallow(<Card isSelected isSelectableRaised />).dive();
75
- expect(view.prop('className')).toMatch(/selectable-raised/);
76
- expect(view.prop('className')).toMatch(/selected-raised/);
77
- expect(view.prop('tabIndex')).toBe('0');
78
- });
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
79
5
 
80
- test('card with isFlat applied', () => {
81
- const view = shallow(<Card isFlat />).dive();
82
- expect(view.prop('className')).toMatch(/m-flat/);
83
- });
84
-
85
- test('card with isExpanded applied', () => {
86
- const view = shallow(<Card isExpanded />).dive();
87
- expect(view.prop('className')).toMatch(/m-expanded/);
88
- });
89
-
90
- test('card with isRounded applied', () => {
91
- const view = shallow(<Card isRounded />).dive();
92
- expect(view.prop('className')).toMatch(/m-rounded/);
93
- });
94
-
95
- test('card with isLarge applied', () => {
96
- const view = shallow(<Card isLarge />).dive();
97
- expect(view.prop('className')).toMatch(/m-display-lg/);
98
- });
6
+ import { Card } from '../Card';
99
7
 
100
- test('card warns when isLarge and isCompact', () => {
101
- const consoleWarnMock = jest.fn();
102
- global.console = { warn: consoleWarnMock } as any;
103
- shallow(<Card isLarge isCompact />);
104
- expect(consoleWarnMock).toBeCalled();
8
+ describe('Card', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ const view = render(<Card />);
11
+ expect(view.container).toMatchSnapshot();
12
+ });
13
+
14
+ test('className is added to the root element', () => {
15
+ render(<Card className="extra-class" />);
16
+ expect(screen.getByRole('article').className).toContain('extra-class');
17
+ });
18
+
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card';
21
+
22
+ render(<Card data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
25
+
26
+ test('allows passing in a string as the component', () => {
27
+ const component = 'section';
28
+
29
+ render(<Card component={component}>section content</Card>);
30
+ expect(screen.getByText('section content')).toBeInTheDocument();
31
+ });
32
+
33
+ test('allows passing in a React Component as the component', () => {
34
+ const Component = () => <div>im a div</div>;
35
+
36
+ render(<Card component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
37
+ expect(screen.getByText('im a div')).toBeInTheDocument();
38
+ });
39
+
40
+ test('card with isHoverable applied ', () => {
41
+ render(<Card isHoverable />);
42
+ expect(screen.getByRole('article').outerHTML).toMatchSnapshot();
43
+ });
44
+
45
+ test('card with isCompact applied ', () => {
46
+ render(<Card isCompact />);
47
+ expect(screen.getByRole('article').outerHTML).toMatchSnapshot();
48
+ });
49
+
50
+ test('card with isSelectable applied ', () => {
51
+ render(<Card isSelectable />);
52
+
53
+ const card = screen.getByRole('article');
54
+ expect(card.className).toContain('selectable');
55
+ expect(card.getAttribute('tabindex')).toEqual('0');
56
+ });
57
+
58
+ test('card with isSelectable and isSelected applied ', () => {
59
+ render(<Card isSelectable isSelected />);
60
+
61
+ const card = screen.getByRole('article');
62
+ expect(card.className).toContain('selectable');
63
+ expect(card.className).toContain('selected');
64
+ expect(card.getAttribute('tabindex')).toEqual('0');
65
+ });
66
+
67
+ test('card with only isSelected applied - not change', () => {
68
+ render(<Card isSelected />);
69
+
70
+ const card = screen.getByRole('article');
71
+ expect(card.className).not.toContain('selected');
72
+ expect(card.getAttribute('tabindex')).toBeNull();
73
+ });
74
+
75
+ test('card with isDisabledRaised applied', () => {
76
+ render(<Card isDisabledRaised />);
77
+ expect(screen.getByRole('article').className).toContain('non-selectable-raised');
78
+ });
79
+
80
+ test('card with isSelectableRaised applied - not change', () => {
81
+ render(<Card isSelectableRaised />);
82
+
83
+ const card = screen.getByRole('article');
84
+ expect(card.className).toContain('selectable-raised');
85
+ expect(card.getAttribute('tabindex')).toEqual('0');
86
+ });
87
+
88
+ test('card with isSelectableRaised and isSelected applied ', () => {
89
+ render(<Card isSelected isSelectableRaised />);
90
+
91
+ const card = screen.getByRole('article');
92
+ expect(card.className).toContain('selectable-raised');
93
+ expect(card.className).toContain('selected-raised');
94
+ expect(card.getAttribute('tabindex')).toEqual('0');
95
+ });
96
+
97
+ test('card with isFlat applied', () => {
98
+ render(<Card isFlat />);
99
+ expect(screen.getByRole('article').className).toContain('m-flat');
100
+ });
101
+
102
+ test('card with isExpanded applied', () => {
103
+ render(<Card isExpanded />);
104
+ expect(screen.getByRole('article').className).toContain('m-expanded');
105
+ });
106
+
107
+ test('card with isRounded applied', () => {
108
+ render(<Card isRounded />);
109
+ expect(screen.getByRole('article').className).toContain('m-rounded');
110
+ });
111
+
112
+ test('card with isLarge applied', () => {
113
+ render(<Card isLarge />);
114
+ expect(screen.getByRole('article').className).toContain('m-display-lg');
115
+ });
116
+
117
+ test('card warns when isLarge and isCompact', () => {
118
+ const consoleWarnMock = jest.fn();
119
+ global.console = { warn: consoleWarnMock } as any;
120
+
121
+ render(<Card isLarge isCompact />);
122
+ expect(consoleWarnMock).toBeCalled();
123
+ });
105
124
  });
@@ -1,37 +1,44 @@
1
1
  import React from 'react';
2
+
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+
2
6
  import { CardBody } from '../CardBody';
3
- import { render } from '@testing-library/react';
4
- import { shallow } from 'enzyme';
5
7
 
6
- test('renders with PatternFly Core styles', () => {
7
- const view = render(<CardBody />);
8
- expect(view.container).toMatchSnapshot();
9
- });
8
+ describe('CardBody', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ const view = render(<CardBody />);
11
+ expect(view.container).toMatchSnapshot();
12
+ });
10
13
 
11
- test('className is added to the root element', () => {
12
- const view = shallow(<CardBody className="extra-class" />);
13
- expect(view.prop('className')).toMatchSnapshot();
14
- });
14
+ test('className is added to the root element', () => {
15
+ render(<CardBody className="extra-class" data-testid="test-id" />);
16
+ expect(screen.getByTestId('test-id').className).toContain('extra-class');
17
+ });
15
18
 
16
- test('extra props are spread to the root element', () => {
17
- const testId = 'card-body';
18
- const view = shallow(<CardBody data-testid={testId} />);
19
- expect(view.prop('data-testid')).toBe(testId);
20
- });
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card-body';
21
21
 
22
- test('allows passing in a string as the component', () => {
23
- const component = 'section';
24
- const view = shallow(<CardBody component={component} />);
25
- expect(view.type()).toBe(component);
26
- });
22
+ render(<CardBody data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
27
25
 
28
- test('allows passing in a React Component as the component', () => {
29
- const Component = () => <div>im a div</div>;
30
- const view = shallow(<CardBody component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
31
- expect(view.type()).toBe(Component);
32
- });
26
+ test('allows passing in a string as the component', () => {
27
+ const component = 'section';
28
+
29
+ render(<CardBody component={component}>section content</CardBody>);
30
+ expect(screen.getByText('section content')).toBeInTheDocument();
31
+ });
32
+
33
+ test('allows passing in a React Component as the component', () => {
34
+ const Component = () => <div>im a div</div>;
35
+
36
+ render(<CardBody component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
37
+ expect(screen.getByText('im a div')).toBeInTheDocument();
38
+ });
33
39
 
34
- test('body with no-fill applied ', () => {
35
- const view = render(<CardBody isFilled={false} />);
36
- expect(view.container).toMatchSnapshot();
40
+ test('body with no-fill applied', () => {
41
+ const view = render(<CardBody isFilled={false} />);
42
+ expect(view.container).toMatchSnapshot();
43
+ });
37
44
  });
@@ -1,32 +1,36 @@
1
1
  import React from 'react';
2
+
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+
2
6
  import { CardFooter } from '../CardFooter';
3
- import { render } from '@testing-library/react';
4
- import { shallow } from 'enzyme';
5
7
 
6
- test('renders with PatternFly Core styles', () => {
7
- const view = render(<CardFooter />);
8
- expect(view.container).toMatchSnapshot();
9
- });
8
+ describe('CardFooter', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ const view = render(<CardFooter />);
11
+ expect(view.container).toMatchSnapshot();
12
+ });
10
13
 
11
- test('className is added to the root element', () => {
12
- const view = shallow(<CardFooter className="extra-class" />);
13
- expect(view.prop('className')).toMatchSnapshot();
14
- });
14
+ test('className is added to the root element', () => {
15
+ render(<CardFooter className="extra-class">text</CardFooter>);
16
+ expect(screen.getByText('text').className).toContain('extra-class');
17
+ });
15
18
 
16
- test('extra props are spread to the root element', () => {
17
- const testId = 'card-footer';
18
- const view = shallow(<CardFooter data-testid={testId} />);
19
- expect(view.prop('data-testid')).toBe(testId);
20
- });
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card-footer';
21
21
 
22
- test('allows passing in a string as the component', () => {
23
- const component = 'div';
24
- const view = shallow(<CardFooter component={component} />);
25
- expect(view.type()).toBe(component);
26
- });
22
+ render(<CardFooter data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
25
+
26
+ test('allows passing in a string as the component', () => {
27
+ render(<CardFooter component={'div'}>div content</CardFooter>);
28
+ expect(screen.getByText('div content')).toBeInTheDocument();
29
+ });
27
30
 
28
- test('allows passing in a React Component as the component', () => {
29
- const Component = () => <div>im a div</div>;
30
- const view = shallow(<CardFooter component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
31
- expect(view.type()).toBe(Component);
31
+ test('allows passing in a React Component as the component', () => {
32
+ const Component = () => <div>im a div</div>;
33
+ render(<CardFooter component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
34
+ expect(screen.getByText('im a div')).toBeInTheDocument();
35
+ });
32
36
  });
@@ -1,20 +1,25 @@
1
1
  import React from 'react';
2
+
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+
2
6
  import { CardHeadMain } from '../CardHeadMain';
3
- import { render } from '@testing-library/react';
4
- import { shallow } from 'enzyme';
5
7
 
6
- test('renders with PatternFly Core styles', () => {
7
- const view = render(<CardHeadMain>text</CardHeadMain>);
8
- expect(view.container).toMatchSnapshot();
9
- });
8
+ describe('CardHeadMain', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ render(<CardHeadMain>text</CardHeadMain>);
11
+ expect(screen.getByText('text').outerHTML).toMatchSnapshot();
12
+ });
10
13
 
11
- test('className is added to the root element', () => {
12
- const view = shallow(<CardHeadMain className="extra-class">text</CardHeadMain>);
13
- expect(view.prop('className')).toMatchSnapshot();
14
- });
14
+ test('className is added to the root element', () => {
15
+ render(<CardHeadMain className="extra-class">text</CardHeadMain>);
16
+ expect(screen.getByText('text').className).toContain('extra-class');
17
+ });
18
+
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card-head-main';
15
21
 
16
- test('extra props are spread to the root element', () => {
17
- const testId = 'card-head-main';
18
- const view = shallow(<CardHeadMain data-testid={testId} />);
19
- expect(view.prop('data-testid')).toBe(testId);
22
+ render(<CardHeadMain data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
20
25
  });
@@ -1,26 +1,10 @@
1
1
  import React from 'react';
2
- import { CardTitle } from '../CardTitle';
3
- import { CardHeader } from '../CardHeader';
4
2
  import { render } from '@testing-library/react';
5
- import { shallow } from 'enzyme';
6
-
7
- test('renders with PatternFly Core styles', () => {
8
- const view = render(<CardTitle />);
9
- expect(view.container).toMatchSnapshot();
10
- });
11
-
12
- test('className is added to the root element', () => {
13
- const view = shallow(<CardTitle className="extra-class" />);
14
- expect(view.prop('className')).toMatchSnapshot();
15
- });
16
-
17
- test('extra props are spread to the root element', () => {
18
- const testId = 'card-header';
19
- const view = shallow(<CardTitle data-testid={testId} />);
20
- expect(view.prop('data-testid')).toBe(testId);
21
- });
3
+ import { CardHeader } from '../CardHeader';
22
4
 
23
- test('onExpand adds the toggle button', () => {
24
- const view = render(<CardHeader onExpand={jest.fn()} />);
25
- expect(view.container).toMatchSnapshot();
5
+ describe('CardHeader', () => {
6
+ test('onExpand adds the toggle button', () => {
7
+ const view = render(<CardHeader onExpand={jest.fn()} />);
8
+ expect(view.container).toMatchSnapshot();
9
+ });
26
10
  });
@@ -1,20 +1,25 @@
1
1
  import React from 'react';
2
+
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+
2
6
  import { CardHeaderMain } from '../CardHeaderMain';
3
- import { render } from '@testing-library/react';
4
- import { shallow } from 'enzyme';
5
7
 
6
- test('renders with PatternFly Core styles', () => {
7
- const view = render(<CardHeaderMain>text</CardHeaderMain>);
8
- expect(view.container).toMatchSnapshot();
9
- });
8
+ describe('CardHeaderMain', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ render(<CardHeaderMain>text</CardHeaderMain>);
11
+ expect(screen.getByText('text').outerHTML).toMatchSnapshot();
12
+ });
10
13
 
11
- test('className is added to the root element', () => {
12
- const view = shallow(<CardHeaderMain className="extra-class">text</CardHeaderMain>);
13
- expect(view.prop('className')).toMatchSnapshot();
14
- });
14
+ test('className is added to the root element', () => {
15
+ render(<CardHeaderMain className="extra-class">text</CardHeaderMain>);
16
+ expect(screen.getByText('text').className).toContain('extra-class');
17
+ });
18
+
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card-head-main';
15
21
 
16
- test('extra props are spread to the root element', () => {
17
- const testId = 'card-head-main';
18
- const view = shallow(<CardHeaderMain data-testid={testId} />);
19
- expect(view.prop('data-testid')).toBe(testId);
22
+ render(<CardHeaderMain data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
20
25
  });
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+
3
+ import { render, screen } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+
6
+ import { CardTitle } from '../CardTitle';
7
+
8
+ describe('CardTitle', () => {
9
+ test('renders with PatternFly Core styles', () => {
10
+ render(<CardTitle>text</CardTitle>);
11
+ expect(screen.getByText('text').outerHTML).toMatchSnapshot();
12
+ });
13
+
14
+ test('className is added to the root element', () => {
15
+ render(<CardTitle className="extra-class">text</CardTitle>);
16
+ expect(screen.getByText('text').className).toContain('extra-class');
17
+ });
18
+
19
+ test('extra props are spread to the root element', () => {
20
+ const testId = 'card-header';
21
+
22
+ render(<CardTitle data-testid={testId} />);
23
+ expect(screen.getByTestId(testId)).toBeInTheDocument();
24
+ });
25
+ });
@@ -1,33 +1,17 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`card with isCompact applied 1`] = `
4
- <article
5
- className="pf-c-card pf-m-compact"
6
- data-ouia-component-id="OUIA-Generated-Card-7"
7
- data-ouia-component-type="PF4/Card"
8
- data-ouia-safe={true}
9
- id=""
10
- />
11
- `;
12
-
13
- exports[`card with isHoverable applied 1`] = `
14
- <article
15
- className="pf-c-card pf-m-selectable"
16
- data-ouia-component-id="OUIA-Generated-Card-6"
17
- data-ouia-component-type="PF4/Card"
18
- data-ouia-safe={true}
19
- id=""
20
- />
21
- `;
3
+ exports[`Card card with isCompact applied 1`] = `"<article id=\\"\\" class=\\"pf-c-card pf-m-compact\\" data-ouia-component-type=\\"PF4/Card\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Card-7\\"></article>"`;
22
4
 
23
- exports[`className is added to the root element 1`] = `"pf-c-card extra-class"`;
5
+ exports[`Card card with isHoverable applied 1`] = `"<article id=\\"\\" class=\\"pf-c-card pf-m-selectable\\" data-ouia-component-type=\\"PF4/Card\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Card-6\\"></article>"`;
24
6
 
25
- exports[`renders with PatternFly Core styles 1`] = `
26
- <article
27
- className="pf-c-card"
28
- data-ouia-component-id="OUIA-Generated-Card-1"
29
- data-ouia-component-type="PF4/Card"
30
- data-ouia-safe={true}
31
- id=""
32
- />
7
+ exports[`Card renders with PatternFly Core styles 1`] = `
8
+ <div>
9
+ <article
10
+ class="pf-c-card"
11
+ data-ouia-component-id="OUIA-Generated-Card-1"
12
+ data-ouia-component-type="PF4/Card"
13
+ data-ouia-safe="true"
14
+ id=""
15
+ />
16
+ </div>
33
17
  `;
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`body with no-fill applied 1`] = `
3
+ exports[`CardBody body with no-fill applied 1`] = `
4
4
  <div>
5
5
  <div
6
6
  class="pf-c-card__body pf-m-no-fill"
@@ -8,9 +8,7 @@ exports[`body with no-fill applied 1`] = `
8
8
  </div>
9
9
  `;
10
10
 
11
- exports[`className is added to the root element 1`] = `"pf-c-card__body extra-class"`;
12
-
13
- exports[`renders with PatternFly Core styles 1`] = `
11
+ exports[`CardBody renders with PatternFly Core styles 1`] = `
14
12
  <div>
15
13
  <div
16
14
  class="pf-c-card__body"
@@ -1,8 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-card__footer extra-class"`;
4
-
5
- exports[`renders with PatternFly Core styles 1`] = `
3
+ exports[`CardFooter renders with PatternFly Core styles 1`] = `
6
4
  <div>
7
5
  <div
8
6
  class="pf-c-card__footer"
@@ -1,13 +1,3 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-card__head-main extra-class"`;
4
-
5
- exports[`renders with PatternFly Core styles 1`] = `
6
- <div>
7
- <div
8
- class="pf-c-card__head-main"
9
- >
10
- text
11
- </div>
12
- </div>
13
- `;
3
+ exports[`CardHeadMain renders with PatternFly Core styles 1`] = `"<div class=\\"pf-c-card__head-main\\">text</div>"`;
@@ -1,8 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"pf-c-card__title extra-class"`;
4
-
5
- exports[`onExpand adds the toggle button 1`] = `
3
+ exports[`CardHeader onExpand adds the toggle button 1`] = `
6
4
  <div>
7
5
  <div
8
6
  class="pf-c-card__header"
@@ -40,11 +38,3 @@ exports[`onExpand adds the toggle button 1`] = `
40
38
  </div>
41
39
  </div>
42
40
  `;
43
-
44
- exports[`renders with PatternFly Core styles 1`] = `
45
- <div>
46
- <div
47
- class="pf-c-card__title"
48
- />
49
- </div>
50
- `;
@@ -1,13 +1,3 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`className is added to the root element 1`] = `"extra-class"`;
4
-
5
- exports[`renders with PatternFly Core styles 1`] = `
6
- <div>
7
- <div
8
- class=""
9
- >
10
- text
11
- </div>
12
- </div>
13
- `;
3
+ exports[`CardHeaderMain renders with PatternFly Core styles 1`] = `"<div class=\\"\\">text</div>"`;
@@ -0,0 +1,3 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`CardTitle renders with PatternFly Core styles 1`] = `"<div class=\\"pf-c-card__title\\">text</div>"`;