@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,20 +1,22 @@
1
- /**
2
- * This test was generated
3
- */
4
- import * as React from 'react';
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
- // any missing imports can usually be resolved by adding them here
8
- import {} from '../..';
6
+ import { AlertContext } from '../../AlertContext';
9
7
 
10
- it('AlertActionCloseButton should match snapshot (auto-generated)', () => {
11
- const view = shallow(
12
- <AlertActionCloseButton
13
- className={"''"}
14
- onClose={() => undefined as any}
15
- aria-label={"''"}
16
- variantLabel={'string'}
17
- />
18
- );
19
- expect(view).toMatchSnapshot();
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
  });
@@ -1,7 +1,29 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`AlertActionCloseButton should match snapshot (auto-generated) 1`] = `
4
- <ContextConsumer>
5
- <Component />
6
- </ContextConsumer>
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
  `;