@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.
- package/CHANGELOG.md +24 -0
- package/package.json +5 -5
- package/src/components/AboutModal/__tests__/AboutModal.test.tsx +41 -60
- package/src/components/Accordion/__tests__/Accordion.test.tsx +23 -17
- package/src/components/Alert/__tests__/Alert.test.tsx +195 -184
- package/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx +19 -17
- package/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap +26 -4
- package/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +50 -700
- package/src/components/AlertGroup/__tests__/AlertGroup.test.tsx +68 -73
- package/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +1 -893
- package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx +13 -10
- package/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap +12 -1
- package/src/components/Button/__tests__/Button.test.tsx +116 -107
- package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +21 -21
- package/src/components/Card/__tests__/Card.test.tsx +119 -100
- package/src/components/Card/__tests__/CardBody.test.tsx +35 -28
- package/src/components/Card/__tests__/CardFooter.test.tsx +28 -24
- package/src/components/Card/__tests__/CardHeadMain.test.tsx +19 -14
- package/src/components/Card/__tests__/CardHeader.test.tsx +6 -22
- package/src/components/Card/__tests__/CardHeaderMain.test.tsx +19 -14
- package/src/components/Card/__tests__/CardTitle.test.tsx +25 -0
- package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +12 -28
- package/src/components/Card/__tests__/__snapshots__/CardBody.test.tsx.snap +2 -4
- package/src/components/Card/__tests__/__snapshots__/CardFooter.test.tsx.snap +1 -3
- package/src/components/Card/__tests__/__snapshots__/CardHeadMain.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardHeader.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardHeaderMain.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardTitle.test.tsx.snap +3 -0
- package/src/components/Checkbox/__tests__/Checkbox.test.tsx +66 -70
- package/src/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +9 -204
- package/src/components/Chip/examples/Chip.md +1 -73
- package/src/components/Chip/examples/ChipDefault.tsx +68 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopy.md +11 -123
- package/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx +9 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx +14 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx +7 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx +36 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx +20 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx +18 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx +9 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx +9 -0
- package/src/layouts/Flex/examples/Flex.md +1 -1
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { shallow } from 'enzyme';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { render } from '@testing-library/react';
|
|
4
|
+
|
|
6
5
|
import { AlertActionCloseButton } from '../../AlertActionCloseButton';
|
|
7
|
-
|
|
8
|
-
import {} from '../..';
|
|
6
|
+
import { AlertContext } from '../../AlertContext';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
describe('AlertActionCloseButton', () => {
|
|
9
|
+
it('should match snapshot', () => {
|
|
10
|
+
const view = render(
|
|
11
|
+
<AlertContext.Provider value={{ title: 'test title', variantLabel: 'some label' }}>
|
|
12
|
+
<AlertActionCloseButton
|
|
13
|
+
className=""
|
|
14
|
+
onClose={() => console.log('close clicked')}
|
|
15
|
+
aria-label=""
|
|
16
|
+
variantLabel=""
|
|
17
|
+
/>
|
|
18
|
+
</AlertContext.Provider>
|
|
19
|
+
);
|
|
20
|
+
expect(view.container).toMatchSnapshot();
|
|
21
|
+
});
|
|
20
22
|
});
|
package/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`AlertActionCloseButton should match snapshot
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
3
|
+
exports[`AlertActionCloseButton should match snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<button
|
|
6
|
+
aria-disabled="false"
|
|
7
|
+
aria-label="Close some label alert: test title"
|
|
8
|
+
class="pf-c-button pf-m-plain"
|
|
9
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-1"
|
|
10
|
+
data-ouia-component-type="PF4/Button"
|
|
11
|
+
data-ouia-safe="true"
|
|
12
|
+
type="button"
|
|
13
|
+
>
|
|
14
|
+
<svg
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
height="1em"
|
|
18
|
+
role="img"
|
|
19
|
+
style="vertical-align: -0.125em;"
|
|
20
|
+
viewBox="0 0 352 512"
|
|
21
|
+
width="1em"
|
|
22
|
+
>
|
|
23
|
+
<path
|
|
24
|
+
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
7
29
|
`;
|