diff --git a/jest.config.js b/jest.config.js
index 5384a346758..4e28a21b5ff 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -12,6 +12,7 @@ module.exports = {
transform: {
'^.+\\.[jt]sx?$': 'babel-jest'
},
+ setupFilesAfterEnv: ['/packages/testSetup.ts'],
transformIgnorePatterns: ['node_modules/(?!@patternfly|@novnc|@popperjs|lodash|monaco-editor|react-monaco-editor)'],
testPathIgnorePatterns: ['/packages/react-integration/'],
coveragePathIgnorePatterns: ['/dist/'],
diff --git a/packages/eslint-plugin-patternfly-react/CHANGELOG.md b/packages/eslint-plugin-patternfly-react/CHANGELOG.md
index ec7dbfad277..5ed3dce8f4c 100644
--- a/packages/eslint-plugin-patternfly-react/CHANGELOG.md
+++ b/packages/eslint-plugin-patternfly-react/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 4.46.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 4.45.6 (2022-04-27)
+
+**Note:** Version bump only for package eslint-plugin-patternfly-react
+
+
+
+
+
+## 4.45.5 (2022-04-26)
+
+**Note:** Version bump only for package eslint-plugin-patternfly-react
+
+
+
+
+
+## 4.45.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 4.45.3 (2022-04-23)
+
+**Note:** Version bump only for package eslint-plugin-patternfly-react
+
+
+
+
+
+## 4.45.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 4.45.1 (2022-04-20)
**Note:** Version bump only for package eslint-plugin-patternfly-react
diff --git a/packages/eslint-plugin-patternfly-react/package.json b/packages/eslint-plugin-patternfly-react/package.json
index 670090b08ab..573cc3bd623 100644
--- a/packages/eslint-plugin-patternfly-react/package.json
+++ b/packages/eslint-plugin-patternfly-react/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-patternfly-react",
- "version": "4.45.1",
+ "version": "4.46.0",
"private": false,
"main": "./lib/index.js",
"license": "MIT",
diff --git a/packages/react-catalog-view-extension/CHANGELOG.md b/packages/react-catalog-view-extension/CHANGELOG.md
index 856e8e3f73f..71225878a3b 100644
--- a/packages/react-catalog-view-extension/CHANGELOG.md
+++ b/packages/react-catalog-view-extension/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 4.58.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 4.57.6 (2022-04-27)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## 4.57.5 (2022-04-26)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## 4.57.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 4.57.3 (2022-04-23)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## 4.57.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 4.57.1 (2022-04-20)
**Note:** Version bump only for package @patternfly/react-catalog-view-extension
diff --git a/packages/react-catalog-view-extension/buildSass.js b/packages/react-catalog-view-extension/buildSass.js
index b8035a2f859..79f3064892a 100644
--- a/packages/react-catalog-view-extension/buildSass.js
+++ b/packages/react-catalog-view-extension/buildSass.js
@@ -26,7 +26,7 @@ const res = sass.renderSync({
importer
});
if (!fs.existsSync(outDir)) {
- fs.mkdirSync(outDir);
+ fs.mkdirSync(outDir, { recursive: true });
}
fs.writeFileSync(path.join(outDir, 'react-catalog-view-extension.css'), res.css);
diff --git a/packages/react-catalog-view-extension/package.json b/packages/react-catalog-view-extension/package.json
index eb556eb954a..ccbe0cb3ca8 100644
--- a/packages/react-catalog-view-extension/package.json
+++ b/packages/react-catalog-view-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-catalog-view-extension",
- "version": "4.57.1",
+ "version": "4.58.0",
"description": "This library provides catalog view extensions for PatternFly 4 React.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -29,18 +29,17 @@
},
"homepage": "https://github.com/patternfly/patternfly-react/blob/main/packages/react-catalog-view-extension/README.md",
"scripts": {
- "generate": "concurrently \"yarn build:sass\" \"yarn copy:sass\"",
+ "generate": "yarn build:sass && yarn copy:sass",
"build:sass": "node buildSass.js",
"copy:sass": "shx mkdir -p dist/sass && shx cp -r sass/react-catalog-view-extension/* dist/sass",
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/patternfly": "4.192.1",
- "@patternfly/react-core": "^4.206.1",
- "@patternfly/react-styles": "^4.56.1"
+ "@patternfly/patternfly": "4.192.2",
+ "@patternfly/react-core": "^4.207.0",
+ "@patternfly/react-styles": "^4.57.0"
},
"devDependencies": {
- "concurrently": "^5.3.0",
"rimraf": "^2.6.2",
"sass": "^1.42.1",
"shx": "^0.3.2",
diff --git a/packages/react-catalog-view-extension/sass/react-catalog-view-extension/_filter-side-panel.scss b/packages/react-catalog-view-extension/sass/react-catalog-view-extension/_filter-side-panel.scss
index 9e488cf7fbd..9c9e3ef6dc4 100644
--- a/packages/react-catalog-view-extension/sass/react-catalog-view-extension/_filter-side-panel.scss
+++ b/packages/react-catalog-view-extension/sass/react-catalog-view-extension/_filter-side-panel.scss
@@ -14,7 +14,7 @@
.filter-panel-pf-category-title {
border: 0;
font-size: inherit;
- margin: 0;
+ margin: 0 0 8px 0;
font-weight: 700;
}
diff --git a/packages/react-catalog-view-extension/src/components/CatalogItemHeader/CatalogItemHeader.test.tsx b/packages/react-catalog-view-extension/src/components/CatalogItemHeader/CatalogItemHeader.test.tsx
index 90e3a3e2f31..d361ce50c3a 100644
--- a/packages/react-catalog-view-extension/src/components/CatalogItemHeader/CatalogItemHeader.test.tsx
+++ b/packages/react-catalog-view-extension/src/components/CatalogItemHeader/CatalogItemHeader.test.tsx
@@ -3,7 +3,7 @@ import React from 'react';
import { render } from '@testing-library/react';
test('simple catalog item header', () => {
- const view = render(
+ const { asFragment } = render(
{
}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-catalog-view-extension/src/components/CatalogItemHeader/__snapshots__/CatalogItemHeader.test.tsx.snap b/packages/react-catalog-view-extension/src/components/CatalogItemHeader/__snapshots__/CatalogItemHeader.test.tsx.snap
index bdf0c97855b..d79670ec7df 100644
--- a/packages/react-catalog-view-extension/src/components/CatalogItemHeader/__snapshots__/CatalogItemHeader.test.tsx.snap
+++ b/packages/react-catalog-view-extension/src/components/CatalogItemHeader/__snapshots__/CatalogItemHeader.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`simple catalog item header 1`] = `
-
+
-
+
`;
diff --git a/packages/react-catalog-view-extension/src/components/CatalogTile/CatalogTile.test.tsx b/packages/react-catalog-view-extension/src/components/CatalogTile/CatalogTile.test.tsx
index dd7d34d8e5e..97fed602682 100644
--- a/packages/react-catalog-view-extension/src/components/CatalogTile/CatalogTile.test.tsx
+++ b/packages/react-catalog-view-extension/src/components/CatalogTile/CatalogTile.test.tsx
@@ -1,9 +1,10 @@
import * as React from 'react';
-import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
-import OutlinedCheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-check-circle-icon';
+
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
+import OutlinedCheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-check-circle-icon';
import { CatalogTile } from './CatalogTile';
import { CatalogTileBadge } from './CatalogTileBadge';
@@ -90,7 +91,7 @@ test('CatalogTile renders properly', () => {
});
test('CatalogTile href renders properly', () => {
- const view = render(
+ const { asFragment } = render(
{
description="1234567890123"
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('CatalogTile onClick behaves properly', () => {
@@ -119,5 +120,5 @@ test('CatalogTile onClick behaves properly', () => {
);
userEvent.click(screen.getByText('Patternfly'));
- expect(onClickMock).toBeCalled();
+ expect(onClickMock).toHaveBeenCalled();
});
diff --git a/packages/react-catalog-view-extension/src/components/CatalogTile/__snapshots__/CatalogTile.test.tsx.snap b/packages/react-catalog-view-extension/src/components/CatalogTile/__snapshots__/CatalogTile.test.tsx.snap
index 220aff35688..6306e06ad6c 100644
--- a/packages/react-catalog-view-extension/src/components/CatalogTile/__snapshots__/CatalogTile.test.tsx.snap
+++ b/packages/react-catalog-view-extension/src/components/CatalogTile/__snapshots__/CatalogTile.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`CatalogTile href renders properly 1`] = `
-
-
+
`;
exports[`CatalogTile renders properly 1`] = `
diff --git a/packages/react-catalog-view-extension/src/components/FilterSidePanel/examples/filterSidePanel.css b/packages/react-catalog-view-extension/src/components/FilterSidePanel/examples/filterSidePanel.css
index bf5143d2d59..cd5da788c2f 100644
--- a/packages/react-catalog-view-extension/src/components/FilterSidePanel/examples/filterSidePanel.css
+++ b/packages/react-catalog-view-extension/src/components/FilterSidePanel/examples/filterSidePanel.css
@@ -14,7 +14,7 @@
.filter-panel-pf-category-title {
border: 0;
font-size: inherit;
- margin: 0;
+ margin: 0 0 8px 0;
font-weight: 700;
}
diff --git a/packages/react-catalog-view-extension/src/components/VerticalTabs/VerticalTabs.test.tsx b/packages/react-catalog-view-extension/src/components/VerticalTabs/VerticalTabs.test.tsx
index e182d255cb4..4a2d6f94661 100644
--- a/packages/react-catalog-view-extension/src/components/VerticalTabs/VerticalTabs.test.tsx
+++ b/packages/react-catalog-view-extension/src/components/VerticalTabs/VerticalTabs.test.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -90,7 +91,7 @@ test('Vertical Tabs Tab onActivate is called correctly', () => {
userEvent.click(screen.getByText('Click Me'));
expect(component.container).toMatchSnapshot();
- expect(onActivateMock).toBeCalled();
+ expect(onActivateMock).toHaveBeenCalled();
});
test('Vertical Tabs Tab wrap styling is set correctly', () => {
diff --git a/packages/react-charts/CHANGELOG.md b/packages/react-charts/CHANGELOG.md
index c61167f62df..0f9cf363f73 100644
--- a/packages/react-charts/CHANGELOG.md
+++ b/packages/react-charts/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 6.60.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 6.59.6 (2022-04-27)
+
+**Note:** Version bump only for package @patternfly/react-charts
+
+
+
+
+
+## 6.59.5 (2022-04-26)
+
+**Note:** Version bump only for package @patternfly/react-charts
+
+
+
+
+
+## 6.59.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 6.59.3 (2022-04-23)
+
+**Note:** Version bump only for package @patternfly/react-charts
+
+
+
+
+
+## 6.59.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 6.59.1 (2022-04-20)
**Note:** Version bump only for package @patternfly/react-charts
diff --git a/packages/react-charts/package.json b/packages/react-charts/package.json
index 73b3e83778e..7ec8dc97c7a 100644
--- a/packages/react-charts/package.json
+++ b/packages/react-charts/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-charts",
- "version": "6.59.1",
+ "version": "6.60.0",
"description": "This library provides a set of React chart components for use with the PatternFly reference implementation.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -29,8 +29,8 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"dependencies": {
- "@patternfly/react-styles": "^4.56.1",
- "@patternfly/react-tokens": "^4.58.1",
+ "@patternfly/react-styles": "^4.57.0",
+ "@patternfly/react-tokens": "^4.59.0",
"hoist-non-react-statics": "^3.3.0",
"lodash": "^4.17.19",
"tslib": "^2.0.0",
diff --git a/packages/react-charts/src/components/Chart/Chart.test.tsx b/packages/react-charts/src/components/Chart/Chart.test.tsx
index 83d360793a3..88432f4384d 100644
--- a/packages/react-charts/src/components/Chart/Chart.test.tsx
+++ b/packages/react-charts/src/components/Chart/Chart.test.tsx
@@ -6,13 +6,13 @@ import { ChartLine } from '../ChartLine';
Object.values([true, false]).forEach(() => {
test('Chart', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders axis and component children', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap b/packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap
index 8c19b5e3025..71da8d15841 100644
--- a/packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap
+++ b/packages/react-charts/src/components/Chart/__snapshots__/Chart.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Chart 1`] = `
-
-
+
`;
exports[`Chart 2`] = `
-
-
+
`;
exports[`renders axis and component children 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartArea/ChartArea.test.tsx b/packages/react-charts/src/components/ChartArea/ChartArea.test.tsx
index 6eabe19cb34..972e37ba4ca 100644
--- a/packages/react-charts/src/components/ChartArea/ChartArea.test.tsx
+++ b/packages/react-charts/src/components/ChartArea/ChartArea.test.tsx
@@ -4,13 +4,13 @@ import { ChartArea } from '../ChartArea';
Object.values([true, false]).forEach(() => {
test('ChartArea', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
]}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap b/packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap
index 3990c06f09b..4611b706ec7 100644
--- a/packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartArea/__snapshots__/ChartArea.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartArea 1`] = `
-
-
+
`;
exports[`ChartArea 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx b/packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
index da3b48cb9bc..bf8a233609a 100644
--- a/packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
+++ b/packages/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
@@ -7,13 +7,13 @@ import { ChartLine } from '../ChartLine';
Object.values([true, false]).forEach(() => {
test('ChartAxis', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap b/packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap
index 856709591a4..09230e4e047 100644
--- a/packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartAxis 1`] = `
-
-
+
`;
exports[`ChartAxis 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBar/ChartBar.test.tsx b/packages/react-charts/src/components/ChartBar/ChartBar.test.tsx
index 20dee94a345..afed8ec5832 100644
--- a/packages/react-charts/src/components/ChartBar/ChartBar.test.tsx
+++ b/packages/react-charts/src/components/ChartBar/ChartBar.test.tsx
@@ -6,13 +6,13 @@ import { ChartGroup } from '../ChartGroup';
Object.values([true, false]).forEach(() => {
test('ChartBar', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap b/packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap
index 27475dbf02c..8530ad2bd4a 100644
--- a/packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBar 1`] = `
-
-
+
`;
exports[`ChartBar 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBullet.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
index 55a7a50331a..10c21a55e60 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
@@ -4,13 +4,13 @@ import { ChartBullet } from './ChartBullet';
Object.values([true, false]).forEach(() => {
test('ChartBulletQualitativeRange', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
width={450}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
index 19f3869d93d..ee2e3468e30 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
@@ -4,12 +4,14 @@ import { ChartBulletComparativeErrorMeasure } from './ChartBulletComparativeErro
Object.values([true, false]).forEach(() => {
test('ChartBulletComparativeErrorMeasure', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(
+
+ );
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
index 37cae14d94c..065596c6bb9 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
@@ -4,12 +4,14 @@ import { ChartBulletComparativeMeasure } from './ChartBulletComparativeMeasure';
Object.values([true, false]).forEach(() => {
test('ChartBulletComparativeMeasure', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(
+
+ );
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
index 8b001002970..b1bb81c26f4 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
@@ -4,14 +4,14 @@ import { ChartBulletComparativeWarningMeasure } from './ChartBulletComparativeWa
Object.values([true, false]).forEach(() => {
test('ChartBulletComparativeZeroMeasure', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
index b0a8b09e051..bbae6e048e4 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
@@ -4,12 +4,12 @@ import { ChartBulletGroupTitle } from './ChartBulletGroupTitle';
Object.values([true, false]).forEach(() => {
test('ChartBulletGroupTitle', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
index 9055a648fe6..c795926f137 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
@@ -4,14 +4,14 @@ import { ChartBulletPrimaryDotMeasure } from './ChartBulletPrimaryDotMeasure';
Object.values([true, false]).forEach(() => {
test('ChartBulletPrimaryDotMeasure', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
index c6068abcd93..80b09370953 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
@@ -4,14 +4,14 @@ import { ChartBulletPrimarySegmentedMeasure } from './ChartBulletPrimarySegmente
Object.values([true, false]).forEach(() => {
test('ChartBulletPrimarySegmentedMeasure', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
index fb1b7982998..7eba951db01 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
@@ -4,14 +4,14 @@ import { ChartBulletQualitativeRange } from './ChartBulletQualitativeRange';
Object.values([true, false]).forEach(() => {
test('ChartBulletQualitativeRange', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx b/packages/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
index d57ff5bcd78..2259ce4000d 100644
--- a/packages/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
+++ b/packages/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
@@ -4,12 +4,12 @@ import { ChartBulletTitle } from './ChartBulletTitle';
Object.values([true, false]).forEach(() => {
test('ChartBulletTitle', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap
index 4badf7ccce8..3edab5a57e5 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletQualitativeRange 1`] = `
-
-
+
`;
exports[`ChartBulletQualitativeRange 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeErrorMeasure.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeErrorMeasure.test.tsx.snap
index b5b26acdad9..dc9006e634c 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeErrorMeasure.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeErrorMeasure.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletComparativeErrorMeasure 1`] = `
-
-
+
`;
exports[`ChartBulletComparativeErrorMeasure 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeMeasure.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeMeasure.test.tsx.snap
index 30789d28df3..a3b4ab2d0e1 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeMeasure.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeMeasure.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletComparativeMeasure 1`] = `
-
-
+
`;
exports[`ChartBulletComparativeMeasure 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeWarningMeasure.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeWarningMeasure.test.tsx.snap
index ab678e84965..c7add0824f8 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeWarningMeasure.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletComparativeWarningMeasure.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletComparativeZeroMeasure 1`] = `
-
-
+
`;
exports[`ChartBulletComparativeZeroMeasure 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletGroupTitle.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletGroupTitle.test.tsx.snap
index 2a02ee3fb94..72534609065 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletGroupTitle.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletGroupTitle.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletGroupTitle 1`] = `
-
-
+
`;
exports[`ChartBulletGroupTitle 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimaryDotMeasure.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimaryDotMeasure.test.tsx.snap
index aa88af457f4..d28365c38da 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimaryDotMeasure.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimaryDotMeasure.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletPrimaryDotMeasure 1`] = `
-
-
+
`;
exports[`ChartBulletPrimaryDotMeasure 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimarySegmentedMeasure.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimarySegmentedMeasure.test.tsx.snap
index 0fffa0ed46d..f7541aefacb 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimarySegmentedMeasure.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletPrimarySegmentedMeasure.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletPrimarySegmentedMeasure 1`] = `
-
-
+
`;
exports[`ChartBulletPrimarySegmentedMeasure 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletQualitativeRange.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletQualitativeRange.test.tsx.snap
index 8c4315e2ab2..711173d4f4c 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletQualitativeRange.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletQualitativeRange.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletQualitativeRange 1`] = `
-
-
+
`;
exports[`ChartBulletQualitativeRange 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletTitle.test.tsx.snap b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletTitle.test.tsx.snap
index fe0e2a90c6b..dd7810d0266 100644
--- a/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletTitle.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartBullet/__snapshots__/ChartBulletTitle.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartBulletTitle 1`] = `
-
-
+
`;
exports[`ChartBulletTitle 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartContainer/ChartContainer.test.tsx b/packages/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
index b2b39285b60..6fbdad04ca8 100644
--- a/packages/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
+++ b/packages/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
@@ -5,13 +5,13 @@ import { ChartLegend } from '../ChartLegend';
Object.values([true, false]).forEach(() => {
test('ChartContainer', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders container via ChartLegend', () => {
- const view = render(
+ const { asFragment } = render(
{
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap b/packages/react-charts/src/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap
index e07c160403c..dfcd7621cd5 100644
--- a/packages/react-charts/src/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartContainer 1`] = `
-
-
+
`;
exports[`ChartContainer 2`] = `
-
-
+
`;
exports[`renders container via ChartLegend 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartCursorContainer/ChartCursorContainer.test.tsx b/packages/react-charts/src/components/ChartCursorContainer/ChartCursorContainer.test.tsx
index c1b94337fa0..4edeb5735a5 100644
--- a/packages/react-charts/src/components/ChartCursorContainer/ChartCursorContainer.test.tsx
+++ b/packages/react-charts/src/components/ChartCursorContainer/ChartCursorContainer.test.tsx
@@ -6,13 +6,13 @@ import { ChartCursorContainer } from './ChartCursorContainer';
Object.values([true, false]).forEach(() => {
test('ChartVoronoiContainer', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders container via ChartGroup', () => {
- const view = render(
+ const { asFragment } = render(
} height={200} width={200}>
{
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartCursorContainer/__snapshots__/ChartCursorContainer.test.tsx.snap b/packages/react-charts/src/components/ChartCursorContainer/__snapshots__/ChartCursorContainer.test.tsx.snap
index 80ce36172c8..fc11d228383 100644
--- a/packages/react-charts/src/components/ChartCursorContainer/__snapshots__/ChartCursorContainer.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartCursorContainer/__snapshots__/ChartCursorContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartVoronoiContainer 1`] = `
-
-
+
`;
exports[`ChartVoronoiContainer 2`] = `
-
-
+
`;
exports[`renders container via ChartGroup 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorFlyout.test.tsx b/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorFlyout.test.tsx
index 736974e29af..793d60d474b 100644
--- a/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorFlyout.test.tsx
+++ b/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorFlyout.test.tsx
@@ -8,18 +8,20 @@ import { createContainer } from '../ChartUtils';
Object.values([true, false]).forEach(() => {
test('ChartTooltip', () => {
- const view = render(} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(
+ } />
+ );
+ expect(asFragment()).toMatchSnapshot();
});
});
test('allows tooltip via container component', () => {
const CursorVoronoiContainer = createContainer('cursor', 'voronoi');
- const view = render(
+ const { asFragment } = render(
'y: ' + point.y}
+ labels={(point: { y: number }) => 'y: ' + point.y}
labelComponent={} />}
/>
}
@@ -45,5 +47,5 @@ test('allows tooltip via container component', () => {
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorTooltip.test.tsx b/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorTooltip.test.tsx
index b6b8ae48d14..fa0d1d0cbce 100644
--- a/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorTooltip.test.tsx
+++ b/packages/react-charts/src/components/ChartCursorTooltip/ChartCursorTooltip.test.tsx
@@ -7,17 +7,20 @@ import { createContainer } from '../ChartUtils';
Object.values([true, false]).forEach(() => {
test('ChartCursorTooltip', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('allows tooltip via container component', () => {
const CursorVoronoiContainer = createContainer('cursor', 'voronoi');
- const view = render(
+ const { asFragment } = render(
'y: ' + point.y} labelComponent={} />
+ 'y: ' + point.y}
+ labelComponent={}
+ />
}
height={200}
width={200}
@@ -41,5 +44,5 @@ test('allows tooltip via container component', () => {
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorFlyout.test.tsx.snap b/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorFlyout.test.tsx.snap
index 667f8be8dc4..bffba397c22 100644
--- a/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorFlyout.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorFlyout.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartTooltip 1`] = ``;
+exports[`ChartTooltip 1`] = ``;
-exports[`ChartTooltip 2`] = ``;
+exports[`ChartTooltip 2`] = ``;
exports[`allows tooltip via container component 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorTooltip.test.tsx.snap b/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorTooltip.test.tsx.snap
index 5931a8596f2..adf80dfea39 100644
--- a/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorTooltip.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartCursorTooltip/__snapshots__/ChartCursorTooltip.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartCursorTooltip 1`] = ``;
+exports[`ChartCursorTooltip 1`] = ``;
-exports[`ChartCursorTooltip 2`] = ``;
+exports[`ChartCursorTooltip 2`] = ``;
exports[`allows tooltip via container component 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartDonut/ChartDonut.test.tsx b/packages/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
index 84c116a1de8..03f4b6cbe4c 100644
--- a/packages/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
+++ b/packages/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
@@ -4,13 +4,13 @@ import { ChartDonut } from './ChartDonut';
Object.values([true, false]).forEach(() => {
test('ChartDonut', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
width={200}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap b/packages/react-charts/src/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap
index bdb6aa1af4b..9bd924a2a4e 100644
--- a/packages/react-charts/src/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartDonut 1`] = `
-
-
+
`;
exports[`ChartDonut 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx b/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
index a1dc4b4f386..913f69b374e 100644
--- a/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
+++ b/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
@@ -4,13 +4,13 @@ import { ChartDonutThreshold } from './ChartDonutThreshold';
Object.values([true, false]).forEach(() => {
test('ChartDonutThreshold', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
width={200}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx b/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
index 00372224013..82e564ed53c 100644
--- a/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
+++ b/packages/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
@@ -4,12 +4,12 @@ import { ChartDonutUtilization } from './ChartDonutUtilization';
Object.values([true, false]).forEach(() => {
test('ChartDonutUtilization', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap b/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap
index 0ea8ca9a6bc..81650b1eb5f 100644
--- a/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartDonutThreshold 1`] = `
-
-
+
`;
exports[`ChartDonutThreshold 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap b/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap
index 698651870fc..bcfbcb98139 100644
--- a/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartDonutUtilization 1`] = `
-
-
+
`;
exports[`ChartDonutUtilization 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartGroup/ChartGroup.test.tsx b/packages/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
index 0b0f7decc42..94b3107f887 100644
--- a/packages/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
+++ b/packages/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
@@ -5,13 +5,13 @@ import { ChartGroup } from './ChartGroup';
Object.values([true, false]).forEach(() => {
test('ChartGroup', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders container children', () => {
- const view = render(
+ const { asFragment } = render(
{
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartGroup/__snapshots__/ChartGroup.test.tsx.snap b/packages/react-charts/src/components/ChartGroup/__snapshots__/ChartGroup.test.tsx.snap
index 8ac7f11b85a..099d5a292ed 100644
--- a/packages/react-charts/src/components/ChartGroup/__snapshots__/ChartGroup.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartGroup/__snapshots__/ChartGroup.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartGroup 1`] = `
-
-
+
`;
exports[`ChartGroup 2`] = `
-
-
+
`;
exports[`renders container children 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLabel/ChartLabel.test.tsx b/packages/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
index 90042cd94e9..591cf5ea333 100644
--- a/packages/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
+++ b/packages/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
@@ -4,12 +4,12 @@ import { ChartLabel } from './ChartLabel';
Object.values([true, false]).forEach(() => {
test('ChartLabel', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component text', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLabel/__snapshots__/ChartLabel.test.tsx.snap b/packages/react-charts/src/components/ChartLabel/__snapshots__/ChartLabel.test.tsx.snap
index 6703b6ffabf..505940e4f56 100644
--- a/packages/react-charts/src/components/ChartLabel/__snapshots__/ChartLabel.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLabel/__snapshots__/ChartLabel.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartLabel 1`] = ``;
+exports[`ChartLabel 1`] = ``;
-exports[`ChartLabel 2`] = ``;
+exports[`ChartLabel 2`] = ``;
exports[`renders component text 1`] = `
-
+
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLegend/ChartLegend.test.tsx b/packages/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
index 06e9a8cbffc..bf8d1243ef0 100644
--- a/packages/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
+++ b/packages/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
@@ -4,14 +4,14 @@ import { ChartLegend } from './ChartLegend';
Object.values([true, false]).forEach(() => {
test('ChartLegend', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap b/packages/react-charts/src/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap
index 583f07b629a..5c0c232cd4b 100644
--- a/packages/react-charts/src/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartLegend 1`] = `
-
-
+
`;
exports[`ChartLegend 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.test.tsx b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.test.tsx
index f147085cc69..ade032dddc0 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.test.tsx
+++ b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.test.tsx
@@ -10,8 +10,8 @@ import { ChartLegendTooltip } from './ChartLegendTooltip';
Object.values([true, false]).forEach(() => {
test('ChartLegendTooltip', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
@@ -23,14 +23,16 @@ test('allows tooltip via container component', () => {
{ name: 'Birds' },
{ name: 'Mice' }
];
- const view = render(
+ const { asFragment } = render(
`${datum.y !== null ? datum.y : 'no data'}`}
- labelComponent={ datum.x} />}
+ labels={({ datum }: { datum: { y: number } }) => `${datum.y !== null ? datum.y : 'no data'}`}
+ labelComponent={
+ datum.x} />
+ }
mouseFollowTooltips
voronoiDimension="x"
voronoiPadding={50}
@@ -93,5 +95,5 @@ test('allows tooltip via container component', () => {
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipContent.test.tsx b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipContent.test.tsx
index 56896b08ee9..480a43e19b0 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipContent.test.tsx
+++ b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipContent.test.tsx
@@ -4,8 +4,8 @@ import { ChartLegendTooltipContent } from './ChartLegendTooltipContent';
Object.values([true, false]).forEach(() => {
test('ChartLegendTooltipContent', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
@@ -16,6 +16,6 @@ test('renders component text', () => {
{ name: 'Birds' },
{ name: 'Mice' }
];
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipLabel.test.tsx b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipLabel.test.tsx
index 6ae265c849b..9826af32eea 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipLabel.test.tsx
+++ b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltipLabel.test.tsx
@@ -4,8 +4,8 @@ import { ChartLegendTooltipLabel } from './ChartLegendTooltipLabel';
Object.values([true, false]).forEach(() => {
test('ChartLegendTooltipLabel', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
@@ -16,6 +16,6 @@ test('renders component text', () => {
{ name: 'Birds' },
{ name: 'Mice' }
];
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap
index 4b087cbdebb..3ad3963ecf8 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartLegendTooltip 1`] = ``;
+exports[`ChartLegendTooltip 1`] = ``;
-exports[`ChartLegendTooltip 2`] = ``;
+exports[`ChartLegendTooltip 2`] = ``;
exports[`allows tooltip via container component 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipContent.test.tsx.snap b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipContent.test.tsx.snap
index 4a3f98cb872..9f9db62b2bc 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipContent.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipContent.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartLegendTooltipContent 1`] = `
-
+
-
+
`;
exports[`ChartLegendTooltipContent 2`] = `
-
+
-
+
`;
exports[`renders component text 1`] = `
-
+
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipLabel.test.tsx.snap b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipLabel.test.tsx.snap
index 86fdfc4786b..a742b97c77f 100644
--- a/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipLabel.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltipLabel.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartLegendTooltipLabel 1`] = ``;
+exports[`ChartLegendTooltipLabel 1`] = ``;
-exports[`ChartLegendTooltipLabel 2`] = ``;
+exports[`ChartLegendTooltipLabel 2`] = ``;
exports[`renders component text 1`] = `
-
+
-
+
`;
diff --git a/packages/react-charts/src/components/ChartLine/ChartLine.test.tsx b/packages/react-charts/src/components/ChartLine/ChartLine.test.tsx
index 7b6eacb68e5..bec331c202e 100644
--- a/packages/react-charts/src/components/ChartLine/ChartLine.test.tsx
+++ b/packages/react-charts/src/components/ChartLine/ChartLine.test.tsx
@@ -6,13 +6,13 @@ import { ChartLine } from './ChartLine';
Object.values([true, false]).forEach(() => {
test('ChartLine', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap b/packages/react-charts/src/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap
index 08f74b8c0a1..32a05673086 100644
--- a/packages/react-charts/src/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartLine 1`] = `
-
-
+
`;
exports[`ChartLine 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartPie/ChartPie.test.tsx b/packages/react-charts/src/components/ChartPie/ChartPie.test.tsx
index 4a88a854d42..03406cfeb54 100644
--- a/packages/react-charts/src/components/ChartPie/ChartPie.test.tsx
+++ b/packages/react-charts/src/components/ChartPie/ChartPie.test.tsx
@@ -4,13 +4,13 @@ import { ChartPie } from './ChartPie';
Object.values([true, false]).forEach(() => {
test('ChartPie', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
width={200}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartPie/__snapshots__/ChartPie.test.tsx.snap b/packages/react-charts/src/components/ChartPie/__snapshots__/ChartPie.test.tsx.snap
index feb6d674d7b..7c119a80ae5 100644
--- a/packages/react-charts/src/components/ChartPie/__snapshots__/ChartPie.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartPie/__snapshots__/ChartPie.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartPie 1`] = `
-
-
+
`;
exports[`ChartPie 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartPoint/ChartPoint.test.tsx b/packages/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
index 25ad77ea003..50b3c978cd9 100644
--- a/packages/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
+++ b/packages/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
@@ -5,13 +5,13 @@ import { ChartPoint } from './ChartPoint';
Object.values([true, false]).forEach(() => {
test('ChartPoint', () => {
- const view = render(} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(} />);
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
width={200}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap b/packages/react-charts/src/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap
index 54e63c4c3ef..6be8426422d 100644
--- a/packages/react-charts/src/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartPoint 1`] = `
-
-
+
`;
exports[`ChartPoint 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartScatter/ChartScatter.test.tsx b/packages/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
index 05d10e30cc8..841d25a4c67 100644
--- a/packages/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
+++ b/packages/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
@@ -6,13 +6,13 @@ import { ChartScatter } from './ChartScatter';
Object.values([true, false]).forEach(() => {
test('ChartScatter', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap b/packages/react-charts/src/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap
index 8e08a2f02f2..513ad57c411 100644
--- a/packages/react-charts/src/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartScatter 1`] = `
-
-
+
`;
exports[`ChartScatter 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartStack/ChartStack.test.tsx b/packages/react-charts/src/components/ChartStack/ChartStack.test.tsx
index 75be6401854..041e16164bc 100644
--- a/packages/react-charts/src/components/ChartStack/ChartStack.test.tsx
+++ b/packages/react-charts/src/components/ChartStack/ChartStack.test.tsx
@@ -6,13 +6,13 @@ import { ChartStack } from './ChartStack';
Object.values([true, false]).forEach(() => {
test('ChartStack', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders component data', () => {
- const view = render(
+ const { asFragment } = render(
{
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap b/packages/react-charts/src/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap
index bbe559b68ca..ec362981cfd 100644
--- a/packages/react-charts/src/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartStack 1`] = `
-
-
+
`;
exports[`ChartStack 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx b/packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx
index 9a2b2e807cb..bcd09f0bfe7 100644
--- a/packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx
+++ b/packages/react-charts/src/components/ChartThreshold/ChartThreshold.test.tsx
@@ -6,8 +6,8 @@ import { ChartThreshold } from './ChartThreshold';
Object.values([true, false]).forEach(() => {
test('ChartThreshold', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
@@ -18,12 +18,12 @@ test('renders component data', () => {
{ name: 'Birds Threshold', x: 2, y: 3 },
{ name: 'Birds Threshold', x: 5, y: 3 }
];
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap b/packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap
index 608957aca2d..2ff05a801c7 100644
--- a/packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartThreshold 1`] = `
-
-
+
`;
exports[`ChartThreshold 2`] = `
-
-
+
`;
exports[`renders component data 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx b/packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
index 7d753205662..f5dd1195add 100644
--- a/packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
+++ b/packages/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
@@ -7,15 +7,15 @@ import { ChartTooltip } from './ChartTooltip';
Object.values([true, false]).forEach(() => {
test('ChartTooltip', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('allows tooltip via container component', () => {
- const view = render(
+ const { asFragment } = render(
'y: ' + point.y} />}
+ containerComponent={ 'y: ' + point.y} />}
height={200}
width={200}
>
@@ -38,5 +38,5 @@ test('allows tooltip via container component', () => {
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap b/packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap
index ab54202bead..0cc6eb2ccca 100644
--- a/packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartTooltip/__snapshots__/ChartTooltip.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ChartTooltip 1`] = ``;
+exports[`ChartTooltip 1`] = ``;
-exports[`ChartTooltip 2`] = ``;
+exports[`ChartTooltip 2`] = ``;
exports[`allows tooltip via container component 1`] = `
-
-
+
`;
diff --git a/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx b/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
index 817ec8a31fa..482bfaf5594 100644
--- a/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
+++ b/packages/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
@@ -6,13 +6,13 @@ import { ChartVoronoiContainer } from './ChartVoronoiContainer';
Object.values([true, false]).forEach(() => {
test('ChartVoronoiContainer', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('renders container via ChartGroup', () => {
- const view = render(
+ const { asFragment } = render(
} height={200} width={200}>
{
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap b/packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap
index 80ce36172c8..fc11d228383 100644
--- a/packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap
+++ b/packages/react-charts/src/components/ChartVoronoiContainer/__snapshots__/ChartVoronoContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChartVoronoiContainer 1`] = `
-
-
+
`;
exports[`ChartVoronoiContainer 2`] = `
-
-
+
`;
exports[`renders container via ChartGroup 1`] = `
-
-
+
`;
diff --git a/packages/react-code-editor/CHANGELOG.md b/packages/react-code-editor/CHANGELOG.md
index f8121afecd6..27731bad461 100644
--- a/packages/react-code-editor/CHANGELOG.md
+++ b/packages/react-code-editor/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 4.48.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 4.47.6 (2022-04-27)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## 4.47.5 (2022-04-26)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## 4.47.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 4.47.3 (2022-04-23)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## 4.47.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 4.47.1 (2022-04-20)
**Note:** Version bump only for package @patternfly/react-code-editor
diff --git a/packages/react-code-editor/package.json b/packages/react-code-editor/package.json
index bf5e8003b65..c35c98ee78b 100644
--- a/packages/react-code-editor/package.json
+++ b/packages/react-code-editor/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-code-editor",
- "version": "4.47.1",
+ "version": "4.48.0",
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -30,9 +30,9 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.206.1",
- "@patternfly/react-icons": "^4.57.1",
- "@patternfly/react-styles": "^4.56.1",
+ "@patternfly/react-core": "^4.207.0",
+ "@patternfly/react-icons": "^4.58.0",
+ "@patternfly/react-styles": "^4.57.0",
"react-dropzone": "9.0.0",
"tslib": "^2.0.0"
},
diff --git a/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx
index 5ef5014bcd0..f8927aa6e3a 100644
--- a/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx
+++ b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx
@@ -8,12 +8,12 @@ describe('CodeEditor', () => {
});
test('matches snapshot without props', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('matches snapshot with all props', () => {
- const view = render(
+ const { asFragment } = render(
{
language={Language.javascript}
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap b/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap
index bc17554226f..37266ab9584 100644
--- a/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap
+++ b/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`CodeEditor matches snapshot with all props 1`] = `
-
+
@@ -342,11 +342,11 @@ exports[`CodeEditor matches snapshot with all props 1`] = `
-
+
`;
exports[`CodeEditor matches snapshot without props 1`] = `
-
+
@@ -574,5 +574,5 @@ exports[`CodeEditor matches snapshot without props 1`] = `
-
+
`;
diff --git a/packages/react-console/CHANGELOG.md b/packages/react-console/CHANGELOG.md
index 930ec3a2220..c2ce7766a5e 100644
--- a/packages/react-console/CHANGELOG.md
+++ b/packages/react-console/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 4.58.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 4.57.6 (2022-04-27)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## 4.57.5 (2022-04-26)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## 4.57.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 4.57.3 (2022-04-23)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## 4.57.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 4.57.1 (2022-04-20)
**Note:** Version bump only for package @patternfly/react-console
diff --git a/packages/react-console/package.json b/packages/react-console/package.json
index 194fa46c731..09e75adbe8e 100644
--- a/packages/react-console/package.json
+++ b/packages/react-console/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-console",
- "version": "4.57.1",
+ "version": "4.58.0",
"description": "This package provides VncConsole, SerialConsole and DesktopViewer React components to be used alongside patternfly-react to access virtual machine or server consoles.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -33,8 +33,8 @@
},
"dependencies": {
"@novnc/novnc": "^1.2.0",
- "@patternfly/patternfly": "4.192.1",
- "@patternfly/react-core": "^4.206.1",
+ "@patternfly/patternfly": "4.192.2",
+ "@patternfly/react-core": "^4.207.0",
"@spice-project/spice-html5": "^0.2.1",
"@types/file-saver": "^2.0.1",
"file-saver": "^1.3.8",
diff --git a/packages/react-console/src/components/AccessConsoles/__tests__/AccessConsoles.test.tsx b/packages/react-console/src/components/AccessConsoles/__tests__/AccessConsoles.test.tsx
index 1290ce52c55..6207f69d4fb 100644
--- a/packages/react-console/src/components/AccessConsoles/__tests__/AccessConsoles.test.tsx
+++ b/packages/react-console/src/components/AccessConsoles/__tests__/AccessConsoles.test.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import '@testing-library/jest-dom';
import { AccessConsoles } from '../AccessConsoles';
import { SerialConsole } from '../../SerialConsole';
diff --git a/packages/react-console/src/components/DesktopViewer/__tests__/DesktopViewer.test.tsx b/packages/react-console/src/components/DesktopViewer/__tests__/DesktopViewer.test.tsx
index 7d32eade352..8c6cb469dc7 100644
--- a/packages/react-console/src/components/DesktopViewer/__tests__/DesktopViewer.test.tsx
+++ b/packages/react-console/src/components/DesktopViewer/__tests__/DesktopViewer.test.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import '@testing-library/jest-dom';
import { DesktopViewer } from '../DesktopViewer';
import { MoreInformationDefaultContent } from '../MoreInformationDefaultContent';
@@ -90,8 +89,8 @@ describe('DesktopViewer', () => {
});
test('default MoreInformationContent', () => {
- render();
- expect(screen.getByText(/Launch Remote Viewer/).outerHTML).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('default implementation of generateVVFile()', () => {
diff --git a/packages/react-console/src/components/DesktopViewer/__tests__/__snapshots__/DesktopViewer.test.tsx.snap b/packages/react-console/src/components/DesktopViewer/__tests__/__snapshots__/DesktopViewer.test.tsx.snap
index ed545b28d0c..b2f253e6077 100644
--- a/packages/react-console/src/components/DesktopViewer/__tests__/__snapshots__/DesktopViewer.test.tsx.snap
+++ b/packages/react-console/src/components/DesktopViewer/__tests__/__snapshots__/DesktopViewer.test.tsx.snap
@@ -1,6 +1,122 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`DesktopViewer default MoreInformationContent 1`] = `"Clicking \\"Launch Remote Viewer\\" will download a .vv file and launch Remote Viewer
"`;
+exports[`DesktopViewer default MoreInformationContent 1`] = `
+
+
+ Clicking "Launch Remote Viewer" will download a .vv file and launch
+
+ Remote Viewer
+
+
+
+
+ Remote Viewer
+
+ is available for most operating systems. To install it, search for it in GNOME Software or run the following:
+
+
+
+
-
+
+ RHEL, CentOS
+
+
+
-
+
+ sudo yum install virt-viewer
+
+
+
+
+
-
+
+ Fedora
+
+
+
-
+
+ sudo dnf install virt-viewer
+
+
+
+
+
-
+
+ Ubuntu, Debian
+
+
+
-
+
+ sudo apt-get install virt-viewer
+
+
+
+
+
-
+
+ Windows
+
+
+
-
+
+
+
+
+
+`;
exports[`DesktopViewer empty 1`] = `
diff --git a/packages/react-console/src/components/SerialConsole/__tests__/SerialConsoleActions.test.tsx b/packages/react-console/src/components/SerialConsole/__tests__/SerialConsoleActions.test.tsx
index 2ca5ed3a8a3..03d24179cd1 100644
--- a/packages/react-console/src/components/SerialConsole/__tests__/SerialConsoleActions.test.tsx
+++ b/packages/react-console/src/components/SerialConsole/__tests__/SerialConsoleActions.test.tsx
@@ -2,20 +2,13 @@ import React from 'react';
import { render } from '@testing-library/react';
import { SerialConsoleActions } from '../SerialConsoleActions';
-test('placeholder render test', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
-});
-
test('Render SerialConsoleActions', () => {
- const view = render(
-
- );
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('Render SerialConsoleActions with custom texts', () => {
- const view = render(
+ const { asFragment } = render(
{
textReset="My Reconnect Text"
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-console/src/components/SerialConsole/__tests__/__snapshots__/SerialConsoleActions.test.tsx.snap b/packages/react-console/src/components/SerialConsole/__tests__/__snapshots__/SerialConsoleActions.test.tsx.snap
index 6d3be72febd..0ce105d4e9d 100644
--- a/packages/react-console/src/components/SerialConsole/__tests__/__snapshots__/SerialConsoleActions.test.tsx.snap
+++ b/packages/react-console/src/components/SerialConsole/__tests__/__snapshots__/SerialConsoleActions.test.tsx.snap
@@ -1,14 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render SerialConsoleActions 1`] = `
-
+
`;
exports[`Render SerialConsoleActions with custom texts 1`] = `
-
-`;
-
-exports[`placeholder render test 1`] = `
-
-
-
-
-
-
+
`;
diff --git a/packages/react-console/src/components/VncConsole/__tests__/VncActions.test.tsx b/packages/react-console/src/components/VncConsole/__tests__/VncActions.test.tsx
index 4a92dc90f35..a6d0a8adc40 100644
--- a/packages/react-console/src/components/VncConsole/__tests__/VncActions.test.tsx
+++ b/packages/react-console/src/components/VncConsole/__tests__/VncActions.test.tsx
@@ -13,28 +13,24 @@ describe('VncActions', () => {
test('VncActions renders correctly component hierarchy', () => {
const { asFragment } = render(
-
-
-
+
);
expect(asFragment()).toMatchSnapshot();
});
test('VncActions renders correctly html', () => {
const { asFragment } = render(
-
-
-
+
);
expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-console/src/components/VncConsole/__tests__/VncConsole.test.tsx b/packages/react-console/src/components/VncConsole/__tests__/VncConsole.test.tsx
index 52d5c6a07f1..cfef7c874a7 100644
--- a/packages/react-console/src/components/VncConsole/__tests__/VncConsole.test.tsx
+++ b/packages/react-console/src/components/VncConsole/__tests__/VncConsole.test.tsx
@@ -4,6 +4,6 @@ import { render } from '@testing-library/react';
import { VncConsole } from '../../VncConsole';
test('placeholder render test', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncActions.test.tsx.snap b/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncActions.test.tsx.snap
index 72659be4b6b..ed30aef0d13 100644
--- a/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncActions.test.tsx.snap
+++ b/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncActions.test.tsx.snap
@@ -3,63 +3,59 @@
exports[`VncActions VncActions renders correctly component hierarchy 1`] = `
-
-
-
+
`;
@@ -67,63 +63,59 @@ exports[`VncActions VncActions renders correctly component hierarchy 1`] = `
exports[`VncActions VncActions renders correctly html 1`] = `
-
-
-
+
`;
diff --git a/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncConsole.test.tsx.snap b/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncConsole.test.tsx.snap
index 2221815cb3c..2334ecb85f3 100644
--- a/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncConsole.test.tsx.snap
+++ b/packages/react-console/src/components/VncConsole/__tests__/__snapshots__/VncConsole.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`placeholder render test 1`] = `
-
+
@@ -42,5 +42,5 @@ exports[`placeholder render test 1`] = `
-
+
`;
diff --git a/packages/react-core/CHANGELOG.md b/packages/react-core/CHANGELOG.md
index b4284730e1f..25c00486b4d 100644
--- a/packages/react-core/CHANGELOG.md
+++ b/packages/react-core/CHANGELOG.md
@@ -3,6 +3,63 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# 4.207.0 (2022-04-28)
+
+
+### Features
+
+* **CodeBlock:** add class to code component ([#7281](https://github.com/patternfly/patternfly-react/issues/7281)) ([844e162](https://github.com/patternfly/patternfly-react/commit/844e1621bc695c97f911f5cc64998c5d36911a4d))
+
+
+
+
+
+## 4.206.6 (2022-04-27)
+
+**Note:** Version bump only for package @patternfly/react-core
+
+
+
+
+
+## 4.206.5 (2022-04-26)
+
+**Note:** Version bump only for package @patternfly/react-core
+
+
+
+
+
+## 4.206.4 (2022-04-25)
+
+
+### Bug Fixes
+
+* **DateTimePicker:** update date placeholder ([#7266](https://github.com/patternfly/patternfly-react/issues/7266)) ([4e9a73e](https://github.com/patternfly/patternfly-react/commit/4e9a73e8f7645b7a885d15754f99b9e078449806))
+
+
+
+
+
+## 4.206.3 (2022-04-23)
+
+**Note:** Version bump only for package @patternfly/react-core
+
+
+
+
+
+## 4.206.2 (2022-04-21)
+
+
+### Bug Fixes
+
+* **DataListCheck:** revert checked prop ([#7284](https://github.com/patternfly/patternfly-react/issues/7284)) ([d9889fc](https://github.com/patternfly/patternfly-react/commit/d9889fc86f224533f81457f384954e6a299c5677))
+
+
+
+
+
## 4.206.1 (2022-04-20)
**Note:** Version bump only for package @patternfly/react-core
diff --git a/packages/react-core/package.json b/packages/react-core/package.json
index 56ee803ced5..821029cd3b0 100644
--- a/packages/react-core/package.json
+++ b/packages/react-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-core",
- "version": "4.206.1",
+ "version": "4.207.0",
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -34,16 +34,16 @@
"generate": "node scripts/copyStyles.js"
},
"dependencies": {
- "@patternfly/react-icons": "^4.57.1",
- "@patternfly/react-styles": "^4.56.1",
- "@patternfly/react-tokens": "^4.58.1",
+ "@patternfly/react-icons": "^4.58.0",
+ "@patternfly/react-styles": "^4.57.0",
+ "@patternfly/react-tokens": "^4.59.0",
"focus-trap": "6.2.2",
"react-dropzone": "9.0.0",
"tippy.js": "5.1.2",
"tslib": "^2.0.0"
},
"devDependencies": {
- "@patternfly/patternfly": "4.192.1",
+ "@patternfly/patternfly": "4.192.2",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^3.0.0",
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx
index fe68390a106..6f03b9422b5 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx
@@ -19,7 +19,7 @@ describe('AboutModal', () => {
render();
userEvent.type(screen.getByRole('dialog'), '{esc}');
- expect(props.onClose).toBeCalled();
+ expect(props.onClose).toHaveBeenCalled();
});
test('does not render the modal when isOpen is not specified', () => {
@@ -48,6 +48,6 @@ describe('AboutModal', () => {
global.console = { error: myMock } as any;
render(Test About Modal);
- expect(myMock).toBeCalled();
+ expect(myMock).toHaveBeenCalled();
});
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx
index 7540481d510..f824409ef9d 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx
@@ -3,10 +3,10 @@ import { render } from '@testing-library/react';
import { AboutModalBox } from '../AboutModalBox';
test('AboutModalBox Test', () => {
- const view = render(
+ const { asFragment } = render(
This is a AboutModalBox
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx
index d10dc66425a..a764474aaab 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx
@@ -3,6 +3,6 @@ import { render } from '@testing-library/react';
import { AboutModalBoxBrand } from '../AboutModalBoxBrand';
test('test About Modal Brand', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx
index 7f6a82c010b..817b526a15b 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx
@@ -3,18 +3,18 @@ import { render } from '@testing-library/react';
import { AboutModalBoxCloseButton } from '../AboutModalBoxCloseButton';
test('AboutModalBoxCloseButton Test', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('AboutModalBoxCloseButton Test onclose', () => {
const onClose = jest.fn();
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('AboutModalBoxCloseButton Test close button aria label', () => {
const closeButtonAriaLabel = 'Klose Daylok';
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx
index cf163527829..62bf982fae7 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx
@@ -3,10 +3,10 @@ import { render } from '@testing-library/react';
import { AboutModalBoxContent } from '../AboutModalBoxContent';
test('AboutModalBoxContent Test', () => {
- const view = render(
+ const { asFragment } = render(
This is a AboutModalBoxContent
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx
index 042b66aa2af..5e12a89f70f 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx
@@ -3,10 +3,10 @@ import { render } from '@testing-library/react';
import { AboutModalBoxHeader } from '../AboutModalBoxHeader';
test('AboutModalBoxHeader Test', () => {
- const view = render(
+ const { asFragment } = render(
This is a AboutModalBox header
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHero.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHero.test.tsx
index 4fe38a7970e..deab24d340d 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHero.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHero.test.tsx
@@ -3,6 +3,6 @@ import { render } from '@testing-library/react';
import { AboutModalBoxHero } from '../AboutModalBoxHero';
test('test About Modal Box SHero', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalContainer.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalContainer.test.tsx
index 984ed9b1db2..a45993c9f69 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalContainer.test.tsx
+++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalContainer.test.tsx
@@ -10,27 +10,29 @@ const props = {
brandImageAlt: 'Brand Image',
backgroundImageSrc: 'backgroundImageSrc...',
'aria-labelledby': 'ariaLablledbyId',
- 'aria-describedby': 'ariaDescribedById'
+ 'aria-describedby': 'ariaDescribedById',
+ aboutModalBoxHeaderId: 'header-id',
+ aboutModalBoxContentId: 'content-id'
};
test('About Modal Container Test simple', () => {
- const view = render(This is ModalBox content);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(This is ModalBox content);
+ expect(asFragment()).toMatchSnapshot();
});
test('About Modal Container Test isOpen', () => {
- const view = render(
+ const { asFragment } = render(
This is ModalBox content
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('About Modal Container Test with onlose', () => {
- const view = render(
+ const { asFragment } = render(
undefined} {...props}>
This is ModalBox content
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBox.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBox.test.tsx.snap
index 1b25f1fea3e..19df35aa60b 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBox.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBox.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AboutModalBox Test 1`] = `
-
+
This is a AboutModalBox
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxBrand.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxBrand.test.tsx.snap
index 2ad630971bf..4cdb1989a81 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxBrand.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxBrand.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test About Modal Brand 1`] = `
-
+
@@ -11,5 +11,5 @@ exports[`test About Modal Brand 1`] = `
src="testimage.."
/>
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxCloseButton.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxCloseButton.test.tsx.snap
index df8a6b40ea6..5d9ec226908 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxCloseButton.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxCloseButton.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AboutModalBoxCloseButton Test 1`] = `
-
+
@@ -29,11 +29,11 @@ exports[`AboutModalBoxCloseButton Test 1`] = `
-
+
`;
exports[`AboutModalBoxCloseButton Test close button aria label 1`] = `
-
+
@@ -61,11 +61,11 @@ exports[`AboutModalBoxCloseButton Test close button aria label 1`] = `
-
+
`;
exports[`AboutModalBoxCloseButton Test onclose 1`] = `
-
+
@@ -93,5 +93,5 @@ exports[`AboutModalBoxCloseButton Test onclose 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxContent.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxContent.test.tsx.snap
index 185ba240824..913bbd382b8 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxContent.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxContent.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AboutModalBoxContent Test 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHeader.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHeader.test.tsx.snap
index 32348ed7e29..c3703b6f6ed 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHeader.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHeader.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AboutModalBoxHeader Test 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHero.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHero.test.tsx.snap
index 790bb5cd1c3..0a304021eed 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHero.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHero.test.tsx.snap
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test About Modal Box SHero 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalContainer.test.tsx.snap b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalContainer.test.tsx.snap
index 632cfcc6e6d..484ebe2a411 100644
--- a/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalContainer.test.tsx.snap
+++ b/packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`About Modal Container Test isOpen 1`] = `
-
+
@@ -9,6 +9,8 @@ exports[`About Modal Container Test isOpen 1`] = `
class="pf-l-bullseye"
>
-
+
`;
-exports[`About Modal Container Test simple 1`] = `
`;
+exports[`About Modal Container Test simple 1`] = `
`;
-exports[`About Modal Container Test with onlose 1`] = `
`;
+exports[`About Modal Container Test with onlose 1`] = `
`;
diff --git a/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx b/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx
index 9c151100671..0416efdf08e 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx
+++ b/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
-import '@testing-library/jest-dom';
import { Accordion } from '../Accordion';
import { AccordionToggle } from '../AccordionToggle';
@@ -11,12 +10,12 @@ import { AccordionExpandedContentBody } from '../AccordionExpandedContentBody';
describe('Accordion', () => {
test('Accordion default', () => {
- const view = render(
);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(
);
+ expect(asFragment()).toMatchSnapshot();
});
test('Accordion with non-default headingLevel', () => {
- const view = render(
+ const { asFragment } = render(
Item One
@@ -24,7 +23,7 @@ describe('Accordion', () => {
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('It should pass optional aria props', () => {
@@ -35,9 +34,9 @@ describe('Accordion', () => {
);
const button = screen.getByRole('button');
- expect(button.getAttribute('aria-label')).toEqual('Toggle details for');
- expect(button.getAttribute('aria-labelledby')).toEqual('ex-toggle2 ex-item2');
- expect(button.getAttribute('aria-expanded')).toEqual('false');
+ expect(button).toHaveAttribute('aria-label', 'Toggle details for');
+ expect(button).toHaveAttribute('aria-labelledby', 'ex-toggle2 ex-item2');
+ expect(button).toHaveAttribute('aria-expanded', 'false');
});
test('Toggle expanded', () => {
@@ -48,14 +47,14 @@ describe('Accordion', () => {
);
const button = screen.getByRole('button');
- expect(button.getAttribute('aria-expanded')).toEqual('true');
- expect(button.className).toContain('pf-m-expanded');
+ expect(button).toHaveAttribute('aria-expanded', 'true');
+ expect(button).toHaveClass('pf-m-expanded');
});
test('renders content with custom Toggle and Content containers', () => {
const container = 'a';
- const view = render(
+ const { asFragment } = render(
@@ -71,7 +70,7 @@ describe('Accordion', () => {
});
test('Accordion bordered', () => {
- const view = render(
+ const { asFragment } = render(
Item One
@@ -79,11 +78,11 @@ describe('Accordion', () => {
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Accordion display large', () => {
- const view = render(
+ const { asFragment } = render(
Item One
@@ -91,11 +90,11 @@ describe('Accordion', () => {
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Accordion custom content', () => {
- const view = render(
+ const { asFragment } = render(
Item One
@@ -106,6 +105,6 @@ describe('Accordion', () => {
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionContent.test.tsx b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionContent.test.tsx
index a35f15e76e0..e89d520984c 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionContent.test.tsx
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionContent.test.tsx
@@ -8,7 +8,7 @@ import { AccordionContent } from '../../AccordionContent';
import {} from '../..';
it('AccordionContent should match snapshot (auto-generated)', () => {
- const view = render(
+ const { asFragment } = render(
ReactNode>}
className={"''"}
@@ -19,5 +19,5 @@ it('AccordionContent should match snapshot (auto-generated)', () => {
component={() => }
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionItem.test.tsx b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionItem.test.tsx
index 9e370c32c73..ba6e6f5b939 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionItem.test.tsx
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionItem.test.tsx
@@ -8,6 +8,6 @@ import { AccordionItem } from '../../AccordionItem';
import {} from '../..';
it('AccordionItem should match snapshot (auto-generated)', () => {
- const view = render(ReactNode>} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(ReactNode>} />);
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionToggle.test.tsx b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionToggle.test.tsx
index dea3730d1de..ee320cdd12b 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionToggle.test.tsx
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/AccordionToggle.test.tsx
@@ -8,7 +8,7 @@ import { AccordionToggle } from '../../AccordionToggle';
import {} from '../..';
it('AccordionToggle should match snapshot (auto-generated)', () => {
- const view = render(
+ const { asFragment } = render(
ReactNode>}
className={"''"}
@@ -17,5 +17,5 @@ it('AccordionToggle should match snapshot (auto-generated)', () => {
component={() => }
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionContent.test.tsx.snap b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionContent.test.tsx.snap
index 7891a9ee4e1..37bfce90533 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionContent.test.tsx.snap
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionContent.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AccordionContent should match snapshot (auto-generated) 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionItem.test.tsx.snap b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionItem.test.tsx.snap
index 1affeb4e2e1..6731e404674 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionItem.test.tsx.snap
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionItem.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AccordionItem should match snapshot (auto-generated) 1`] = `
-
+
ReactNode
-
+
`;
diff --git a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionToggle.test.tsx.snap b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionToggle.test.tsx.snap
index 68b3a392903..53562f03e49 100644
--- a/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionToggle.test.tsx.snap
+++ b/packages/react-core/src/components/Accordion/__tests__/Generated/__snapshots__/AccordionToggle.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AccordionToggle should match snapshot (auto-generated) 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap b/packages/react-core/src/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap
index b20d7847778..4e4121ce518 100644
--- a/packages/react-core/src/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap
+++ b/packages/react-core/src/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Accordion Accordion bordered 1`] = `
-
+
`;
exports[`Accordion Accordion custom content 1`] = `
-
+
`;
exports[`Accordion Accordion default 1`] = `
-
+
`;
exports[`Accordion Accordion display large 1`] = `
-
+
`;
exports[`Accordion Accordion with non-default headingLevel 1`] = `
-
-
+
`;
diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx
index a531f44d10e..ae5da51e036 100644
--- a/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx
+++ b/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx
@@ -4,11 +4,11 @@ import { ActionList } from '../ActionList';
describe('action list', () => {
test('renders successfully', () => {
- const view = render(test);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(test);
+ expect(asFragment()).toMatchSnapshot();
});
test('isIconList flag adds modifier', () => {
- const view = render(test);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(test);
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx
index 8744d36ecd1..4f1f2ddd74b 100644
--- a/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx
+++ b/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx
@@ -4,7 +4,7 @@ import { ActionListGroup } from '../ActionListGroup';
describe('action list group', () => {
test('renders successfully', () => {
- const view = render(test);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(test);
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx
index 7d84d727eb7..7be807a1ecb 100644
--- a/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx
+++ b/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx
@@ -4,7 +4,7 @@ import { ActionListItem } from '../ActionListItem';
describe('action list item', () => {
test('renders successfully', () => {
- const view = render(test);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(test);
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionList.test.tsx.snap b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionList.test.tsx.snap
index c24a4e5c800..d010d4a0f0b 100644
--- a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionList.test.tsx.snap
+++ b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionList.test.tsx.snap
@@ -1,21 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`action list isIconList flag adds modifier 1`] = `
-
+
`;
exports[`action list renders successfully 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListGroup.test.tsx.snap b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListGroup.test.tsx.snap
index 40020482ddc..c1cc0d63d80 100644
--- a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListGroup.test.tsx.snap
+++ b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListGroup.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`action list group renders successfully 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListItem.test.tsx.snap b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListItem.test.tsx.snap
index f2b20743a09..8999e1b84a4 100644
--- a/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListItem.test.tsx.snap
+++ b/packages/react-core/src/components/ActionList/__tests__/__snapshots__/ActionListItem.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`action list item renders successfully 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx b/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx
index a982f2fb497..006095e89b0 100644
--- a/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx
+++ b/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx
@@ -1,4 +1,5 @@
import * as React from 'react';
+
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -10,45 +11,45 @@ import { UsersIcon } from '@patternfly/react-icons';
describe('Alert', () => {
test('default Alert variant is default', () => {
render(Alert testing);
- expect(screen.getByText('this is a test').className).toContain('pf-c-alert');
+ expect(screen.getByText('this is a test')).toHaveClass('pf-c-alert__title');
});
Object.values(AlertVariant).forEach(variant => {
describe(`Alert - ${variant}`, () => {
test('Description', () => {
- const view = render(
+ const { asFragment } = render(
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Title', () => {
- const view = render(
+ const { asFragment } = render(
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Heading level', () => {
- const view = render(
+ const { asFragment } = render(
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Action Link', () => {
- const view = render(
+ const { asFragment } = render(
test]} title="">
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Action Close Button', () => {
@@ -69,7 +70,7 @@ describe('Alert', () => {
});
test('Action and Title', () => {
- const view = render(
+ const { asFragment } = render(
test]}
@@ -78,11 +79,11 @@ describe('Alert', () => {
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Custom aria label', () => {
- const view = render(
+ const { asFragment } = render(
{
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('inline variation', () => {
- const view = render(
+ const { asFragment } = render(
Some alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('expandable variation', () => {
- const view = render(
+ const { asFragment } = render(
Success alert description. This should tell the user more information about the alert.
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('expandable variation description hidden', () => {
@@ -126,12 +127,12 @@ describe('Alert', () => {
});
test('Toast alerts match snapsnot', () => {
- const view = render(
+ const { asFragment } = render(
Some toast alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Toast alerts contain default live region', () => {
@@ -143,7 +144,7 @@ describe('Alert', () => {
);
- expect(screen.getByLabelText(ariaLabel).getAttribute('aria-live')).toEqual('polite');
+ expect(screen.getByLabelText(ariaLabel)).toHaveAttribute('aria-live', 'polite');
});
test('Toast alert live regions are not atomic', () => {
@@ -155,7 +156,7 @@ describe('Alert', () => {
);
- expect(screen.getByLabelText(ariaLabel).getAttribute('aria-atomic')).toEqual('false');
+ expect(screen.getByLabelText(ariaLabel)).toHaveAttribute('aria-atomic', 'false');
});
test('Non-toast alerts can have custom live region settings', () => {
@@ -175,13 +176,13 @@ describe('Alert', () => {
);
const alert = screen.getByLabelText(ariaLabel);
- expect(alert.getAttribute('aria-live')).toEqual('assertive');
- expect(alert.getAttribute('aria-relevant')).toEqual('all');
- expect(alert.getAttribute('aria-atomic')).toEqual('true');
+ expect(alert).toHaveAttribute('aria-live', 'assertive');
+ expect(alert).toHaveAttribute('aria-relevant', 'all');
+ expect(alert).toHaveAttribute('aria-atomic', 'true');
});
test('Custom icon', () => {
- const view = render(
+ const { asFragment } = render(
}
variant={variant}
@@ -191,7 +192,7 @@ describe('Alert', () => {
Some noisy alert
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
});
@@ -203,6 +204,6 @@ describe('Alert', () => {
);
- expect(screen.getByText('this is a test').className).toContain('pf-m-truncate');
+ expect(screen.getByText('this is a test')).toHaveClass('pf-m-truncate');
});
});
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx
index e02b22c56ce..5bbd710608a 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx
@@ -7,7 +7,7 @@ import { AlertContext } from '../../AlertContext';
describe('AlertActionCloseButton', () => {
it('should match snapshot', () => {
- const view = render(
+ const { asFragment } = render(
{
/>
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionLink.test.tsx b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionLink.test.tsx
index 861c033b6ff..21600743628 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionLink.test.tsx
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionLink.test.tsx
@@ -8,6 +8,6 @@ import { AlertActionLink } from '../../AlertActionLink';
import {} from '../..';
it('AlertActionLink should match snapshot (auto-generated)', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/AlertIcon.test.tsx b/packages/react-core/src/components/Alert/__tests__/Generated/AlertIcon.test.tsx
index 606eed7f023..fd0fb6005b3 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/AlertIcon.test.tsx
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/AlertIcon.test.tsx
@@ -8,6 +8,6 @@ import { AlertIcon } from '../../AlertIcon';
import {} from '../..';
it('AlertIcon should match snapshot (auto-generated)', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap
index cc0841b3d4d..d3038015afb 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlertActionCloseButton should match snapshot 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionLink.test.tsx.snap b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionLink.test.tsx.snap
index 5d1275789fe..3182c7b493e 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionLink.test.tsx.snap
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionLink.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlertActionLink should match snapshot (auto-generated) 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertIcon.test.tsx.snap b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertIcon.test.tsx.snap
index c29860e3421..ceca9c159b0 100644
--- a/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertIcon.test.tsx.snap
+++ b/packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertIcon.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlertIcon should match snapshot (auto-generated) 1`] = `
-
+
@@ -19,5 +19,5 @@ exports[`AlertIcon should match snapshot (auto-generated) 1`] = `
/>
-
+
`;
diff --git a/packages/react-core/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap b/packages/react-core/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap
index 4f2118a687b..6d3f59a100e 100644
--- a/packages/react-core/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap
+++ b/packages/react-core/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Alert Alert - danger Action Link 1`] = `
-
+
`;
exports[`Alert Alert - danger Action and Title 1`] = `
-
-
+
`;
exports[`Alert Alert - danger Custom aria label 1`] = `
-
-
+
`;
exports[`Alert Alert - danger Custom icon 1`] = `
-
+
`;
exports[`Alert Alert - danger Description 1`] = `
-
+
+
`;
exports[`Alert Alert - danger Heading level 1`] = `
-
+
`;
exports[`Alert Alert - danger Title 1`] = `
-
+
`;
exports[`Alert Alert - danger Toast alerts match snapsnot 1`] = `
-
+
`;
exports[`Alert Alert - danger expandable variation 1`] = `
-
+
`;
exports[`Alert Alert - danger inline variation 1`] = `
-
+
`;
exports[`Alert Alert - default Action Link 1`] = `
-
+
`;
exports[`Alert Alert - default Action and Title 1`] = `
-
-
+
`;
exports[`Alert Alert - default Custom aria label 1`] = `
-
-
+
`;
exports[`Alert Alert - default Custom icon 1`] = `
-
+
`;
exports[`Alert Alert - default Description 1`] = `
-
+
+
`;
exports[`Alert Alert - default Heading level 1`] = `
-
+
`;
exports[`Alert Alert - default Title 1`] = `
-
+
`;
exports[`Alert Alert - default Toast alerts match snapsnot 1`] = `
-
+
`;
exports[`Alert Alert - default expandable variation 1`] = `
-
+
`;
exports[`Alert Alert - default inline variation 1`] = `
-
+
`;
exports[`Alert Alert - info Action Link 1`] = `
-
+
`;
exports[`Alert Alert - info Action and Title 1`] = `
-
-
+
`;
exports[`Alert Alert - info Custom aria label 1`] = `
-
-
+
`;
exports[`Alert Alert - info Custom icon 1`] = `
-
+
`;
exports[`Alert Alert - info Description 1`] = `
-
+
+
`;
exports[`Alert Alert - info Heading level 1`] = `
-
+
`;
exports[`Alert Alert - info Title 1`] = `
-
+
`;
exports[`Alert Alert - info Toast alerts match snapsnot 1`] = `
-
+
`;
exports[`Alert Alert - info expandable variation 1`] = `
-
+
`;
exports[`Alert Alert - info inline variation 1`] = `
-
+
`;
exports[`Alert Alert - success Action Link 1`] = `
-
+
`;
exports[`Alert Alert - success Action and Title 1`] = `
-
-
+
`;
exports[`Alert Alert - success Custom aria label 1`] = `
-
-
+
`;
exports[`Alert Alert - success Custom icon 1`] = `
-
+
`;
exports[`Alert Alert - success Description 1`] = `
-
+
+
`;
exports[`Alert Alert - success Heading level 1`] = `
-
+
`;
exports[`Alert Alert - success Title 1`] = `
-
+
`;
exports[`Alert Alert - success Toast alerts match snapsnot 1`] = `
-
+
`;
exports[`Alert Alert - success expandable variation 1`] = `
-
+
`;
exports[`Alert Alert - success inline variation 1`] = `
-
+
`;
exports[`Alert Alert - warning Action Link 1`] = `
-
+
`;
exports[`Alert Alert - warning Action and Title 1`] = `
-
-
+
`;
exports[`Alert Alert - warning Custom aria label 1`] = `
-
-
+
`;
exports[`Alert Alert - warning Custom icon 1`] = `
-
+
`;
exports[`Alert Alert - warning Description 1`] = `
-
+
+
`;
exports[`Alert Alert - warning Heading level 1`] = `
-
+
`;
exports[`Alert Alert - warning Title 1`] = `
-
+
`;
exports[`Alert Alert - warning Toast alerts match snapsnot 1`] = `
-
+
`;
exports[`Alert Alert - warning expandable variation 1`] = `
-
+
`;
exports[`Alert Alert - warning inline variation 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/AlertGroup.test.tsx b/packages/react-core/src/components/AlertGroup/__tests__/AlertGroup.test.tsx
index fcf8fd70895..d34d82d8381 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/AlertGroup.test.tsx
+++ b/packages/react-core/src/components/AlertGroup/__tests__/AlertGroup.test.tsx
@@ -2,7 +2,6 @@ import * as React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import '@testing-library/jest-dom';
import { Alert } from '../../Alert';
import { AlertGroup } from '../../AlertGroup';
@@ -10,18 +9,18 @@ import { AlertActionCloseButton } from '../../../components/Alert/AlertActionClo
describe('AlertGroup', () => {
test('Alert Group renders without children', () => {
- const view = render(
);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(
);
+ expect(asFragment()).toMatchSnapshot();
});
test('Alert Group works with n children', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view).toBeTruthy();
+ expect(asFragment()).toBeTruthy();
});
test('Alert group overflow shows up', () => {
@@ -40,7 +39,7 @@ describe('AlertGroup', () => {
expect(overflowButton).toBeInTheDocument();
userEvent.click(overflowButton);
- expect(onOverflowClick).toBeCalled();
+ expect(onOverflowClick).toHaveBeenCalled();
});
test('Standard Alert Group is not a toast alert group', () => {
@@ -77,6 +76,6 @@ describe('AlertGroup', () => {
);
userEvent.click(screen.getByLabelText('Close'));
- expect(onClose).toBeCalled();
+ expect(onClose).toHaveBeenCalled();
});
});
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroup.test.tsx b/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroup.test.tsx
index 343a29efe32..b88c41d42bf 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroup.test.tsx
+++ b/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroup.test.tsx
@@ -8,8 +8,8 @@ import { AlertGroup } from '../../AlertGroup';
import {} from '../..';
it('AlertGroup should match snapshot (auto-generated)', () => {
- const view = render(
+ const { asFragment } = render(
ReactNode } isToast={true} appendTo={undefined} />
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroupInline.test.tsx b/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroupInline.test.tsx
index e52e2776498..4cdec220359 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroupInline.test.tsx
+++ b/packages/react-core/src/components/AlertGroup/__tests__/Generated/AlertGroupInline.test.tsx
@@ -8,6 +8,6 @@ import { AlertGroupInline } from '../../AlertGroupInline';
import {} from '../..';
it('AlertGroupInline should match snapshot (auto-generated)', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroup.test.tsx.snap b/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroup.test.tsx.snap
index b46feaf5cc5..c704bee01bc 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroup.test.tsx.snap
+++ b/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroup.test.tsx.snap
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`AlertGroup should match snapshot (auto-generated) 1`] = ``;
+exports[`AlertGroup should match snapshot (auto-generated) 1`] = ``;
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroupInline.test.tsx.snap b/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroupInline.test.tsx.snap
index cfa118d32f4..cfc521424a7 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroupInline.test.tsx.snap
+++ b/packages/react-core/src/components/AlertGroup/__tests__/Generated/__snapshots__/AlertGroupInline.test.tsx.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlertGroupInline should match snapshot (auto-generated) 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap
index 26368230b48..ecd04b19c1c 100644
--- a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap
+++ b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`AlertGroup Alert Group renders without children 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/ApplicationLauncher.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/ApplicationLauncher.test.tsx
index b5a94993cc7..49eac289b72 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/ApplicationLauncher.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/ApplicationLauncher.test.tsx
@@ -27,40 +27,36 @@ const dropdownItems = [
describe('ApplicationLauncher', () => {
test('regular', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('right aligned', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('dropup', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('dropup + right aligned', () => {
- const view = render(
-
+ const { asFragment } = render(
+
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('expanded', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('custom icon', () => {
- const view = render(
+ const { asFragment } = render(
} />
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherContent.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherContent.test.tsx
index 43b7534fc24..4d76648527c 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherContent.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherContent.test.tsx
@@ -8,6 +8,6 @@ import { ApplicationLauncherContent } from '../../ApplicationLauncherContent';
import {} from '../..';
it('ApplicationLauncherContent should match snapshot (auto-generated)', () => {
- const view = render(ReactNode} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(ReactNode} />);
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherGroup.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherGroup.test.tsx
index 80094ea727c..d84f9c59175 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherGroup.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherGroup.test.tsx
@@ -8,6 +8,6 @@ import { ApplicationLauncherGroup } from '../../ApplicationLauncherGroup';
import {} from '../..';
it('ApplicationLauncherGroup should match snapshot (auto-generated)', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherIcon.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherIcon.test.tsx
index 9b6474dd322..3a4b6a72b8f 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherIcon.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherIcon.test.tsx
@@ -8,6 +8,6 @@ import { ApplicationLauncherIcon } from '../../ApplicationLauncherIcon';
import {} from '../..';
it('ApplicationLauncherIcon should match snapshot (auto-generated)', () => {
- const view = render(ReactNode} className={"''"} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(ReactNode} className={"''"} />);
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx
index 02971bcbc9c..fbba4de4795 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx
@@ -6,11 +6,11 @@ import { DropdownArrowContext } from '../../../Dropdown/dropdownConstants';
describe('ApplicationLauncherSeparator', () => {
it('should match snapshot', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherText.test.tsx b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherText.test.tsx
index 7f38890f9a6..4208c3b4e63 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherText.test.tsx
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherText.test.tsx
@@ -8,6 +8,6 @@ import { ApplicationLauncherText } from '../../ApplicationLauncherText';
import {} from '../..';
it('ApplicationLauncherText should match snapshot (auto-generated)', () => {
- const view = render(ReactNode} className={"''"} />);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(ReactNode} className={"''"} />);
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherContent.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherContent.test.tsx.snap
index 2fc0d996162..eaaeceb4bb3 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherContent.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherContent.test.tsx.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncherContent should match snapshot (auto-generated) 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherGroup.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherGroup.test.tsx.snap
index 7de502c5ecd..cac805c9416 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherGroup.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherGroup.test.tsx.snap
@@ -1,14 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncherGroup should match snapshot (auto-generated) 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherIcon.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherIcon.test.tsx.snap
index ed9ab5746b3..46112bf757d 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherIcon.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherIcon.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncherIcon should match snapshot (auto-generated) 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap
index fa9744a96ac..d69c576a95e 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncherSeparator should match snapshot 1`] = `
-
+
@@ -10,5 +10,5 @@ exports[`ApplicationLauncherSeparator should match snapshot 1`] = `
role="separator"
/>
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherText.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherText.test.tsx.snap
index 69d202d634f..ab032302c3c 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherText.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherText.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncherText should match snapshot (auto-generated) 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap
index 2e3d115d837..ed8e5f70afe 100644
--- a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap
+++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ApplicationLauncher custom icon 1`] = `
-
+
-
+
`;
exports[`ApplicationLauncher dropup + right aligned 1`] = `
-
+
-
+
`;
exports[`ApplicationLauncher dropup 1`] = `
-
+
-
+
`;
exports[`ApplicationLauncher expanded 1`] = `
-
+
-
+
`;
exports[`ApplicationLauncher regular 1`] = `
-
+
-
+
`;
exports[`ApplicationLauncher right aligned 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx b/packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
index 2084d601b38..179f7d61085 100644
--- a/packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
+++ b/packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
@@ -3,6 +3,6 @@ import { render } from '@testing-library/react';
import { Avatar } from '../Avatar';
test('simple avatar', () => {
- const view: any = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap b/packages/react-core/src/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap
index fcb59a50915..6ac2a939af3 100644
--- a/packages/react-core/src/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap
+++ b/packages/react-core/src/components/Avatar/__tests__/__snapshots__/Avatar.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`simple avatar 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/BackToTop/__tests__/BackToTop.test.tsx b/packages/react-core/src/components/BackToTop/__tests__/BackToTop.test.tsx
index ae900b39a62..68703145014 100644
--- a/packages/react-core/src/components/BackToTop/__tests__/BackToTop.test.tsx
+++ b/packages/react-core/src/components/BackToTop/__tests__/BackToTop.test.tsx
@@ -4,19 +4,19 @@ import { BackToTop } from '../BackToTop';
describe('BackToTop', () => {
test('verify basic', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('verify custom class', () => {
- const view = render(test);
+ const { asFragment } = render(test);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('verify always show', () => {
- const view = render(test);
+ const { asFragment } = render(test);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
-});
\ No newline at end of file
+});
diff --git a/packages/react-core/src/components/BackToTop/__tests__/__snapshots__/BackToTop.test.tsx.snap b/packages/react-core/src/components/BackToTop/__tests__/__snapshots__/BackToTop.test.tsx.snap
index 8e75151e503..396367f61a4 100644
--- a/packages/react-core/src/components/BackToTop/__tests__/__snapshots__/BackToTop.test.tsx.snap
+++ b/packages/react-core/src/components/BackToTop/__tests__/__snapshots__/BackToTop.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`BackToTop verify always show 1`] = `
-
+
@@ -33,11 +33,11 @@ exports[`BackToTop verify always show 1`] = `
-
+
`;
exports[`BackToTop verify basic 1`] = `
-
+
@@ -69,11 +69,11 @@ exports[`BackToTop verify basic 1`] = `
-
+
`;
exports[`BackToTop verify custom class 1`] = `
-
+
@@ -105,5 +105,5 @@ exports[`BackToTop verify custom class 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Backdrop/__tests__/Backdrop.test.tsx b/packages/react-core/src/components/Backdrop/__tests__/Backdrop.test.tsx
index 02d81d85356..3307faacceb 100644
--- a/packages/react-core/src/components/Backdrop/__tests__/Backdrop.test.tsx
+++ b/packages/react-core/src/components/Backdrop/__tests__/Backdrop.test.tsx
@@ -3,6 +3,6 @@ import { render } from '@testing-library/react';
import { Backdrop } from '../Backdrop';
test('Backdrop Test', () => {
- const view = render(Backdrop);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Backdrop);
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Backdrop/__tests__/__snapshots__/Backdrop.test.tsx.snap b/packages/react-core/src/components/Backdrop/__tests__/__snapshots__/Backdrop.test.tsx.snap
index 545a3c9ded5..c341a6f53f4 100644
--- a/packages/react-core/src/components/Backdrop/__tests__/__snapshots__/Backdrop.test.tsx.snap
+++ b/packages/react-core/src/components/Backdrop/__tests__/__snapshots__/Backdrop.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Backdrop Test 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx b/packages/react-core/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
index 3d922f91c68..e8ab030a4ea 100644
--- a/packages/react-core/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
+++ b/packages/react-core/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
@@ -3,19 +3,19 @@ import * as React from 'react';
import { render } from '@testing-library/react';
const images = {
- 'lg': '/assets/images/pfbg_1200.jpg',
- 'sm': '/assets/images/pfbg_768.jpg',
- 'sm2x': '/assets/images/pfbg_768@2x.jpg',
- 'xs': '/assets/images/pfbg_576.jpg',
- 'xs2x': '/assets/images/pfbg_576@2x.jpg'
+ lg: '/assets/images/pfbg_1200.jpg',
+ sm: '/assets/images/pfbg_768.jpg',
+ sm2x: '/assets/images/pfbg_768@2x.jpg',
+ xs: '/assets/images/pfbg_576.jpg',
+ xs2x: '/assets/images/pfbg_576@2x.jpg'
};
test('BackgroundImage', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('allows passing in a single string as the image src', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/BackgroundImage/__tests__/__snapshots__/BackgroundImage.test.tsx.snap b/packages/react-core/src/components/BackgroundImage/__tests__/__snapshots__/BackgroundImage.test.tsx.snap
index fe0cb3bcae9..6d2c7cf1122 100644
--- a/packages/react-core/src/components/BackgroundImage/__tests__/__snapshots__/BackgroundImage.test.tsx.snap
+++ b/packages/react-core/src/components/BackgroundImage/__tests__/__snapshots__/BackgroundImage.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`BackgroundImage 1`] = `
-
+
`;
exports[`allows passing in a single string as the image src 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Badge/__tests__/Badge.test.tsx b/packages/react-core/src/components/Badge/__tests__/Badge.test.tsx
index d41ddeff3b8..492bc03ec83 100644
--- a/packages/react-core/src/components/Badge/__tests__/Badge.test.tsx
+++ b/packages/react-core/src/components/Badge/__tests__/Badge.test.tsx
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react';
Object.values([true, false]).forEach(isRead => {
test(`${isRead} Badge`, () => {
- const view = render({isRead ? 'read' : 'unread'} Badge);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render({isRead ? 'read' : 'unread'} Badge);
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap b/packages/react-core/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap
index 126e5157eb8..69ff36ba72e 100644
--- a/packages/react-core/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap
+++ b/packages/react-core/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap
@@ -1,23 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`false Badge 1`] = `
-
+
- unread
- Badge
+ unread Badge
-
+
`;
exports[`true Badge 1`] = `
-
+
- read
- Badge
+ read Badge
-
+
`;
diff --git a/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx b/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
index 182cef9728e..3378df00675 100644
--- a/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
+++ b/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
@@ -2,24 +2,22 @@ import { Banner } from '../Banner';
import React from 'react';
import { render } from '@testing-library/react';
-['default', 'info', 'success', 'warning', 'danger'].forEach(
- (variant: 'default' | 'info' | 'success' | 'warning' | 'danger') => {
- test(`${variant} banner`, () => {
- const view = render(
-
- {variant} Banner
-
- );
- expect(view.container).toMatchSnapshot();
- });
- }
-);
+['default', 'info', 'success', 'warning', 'danger'].forEach((variant: string) => {
+ test(`${variant} banner`, () => {
+ const { asFragment } = render(
+
+ {variant} Banner
+
+ );
+ expect(asFragment()).toMatchSnapshot();
+ });
+});
test(`sticky banner`, () => {
- const view = render(
+ const { asFragment } = render(
Sticky Banner
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap b/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
index 366a8041ad2..902f1fca6ad 100644
--- a/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
+++ b/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
@@ -1,72 +1,67 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`danger banner 1`] = `
-
+
- danger
- Banner
+ danger Banner
-
+
`;
exports[`default banner 1`] = `
-
+
- default
- Banner
+ default Banner
-
+
`;
exports[`info banner 1`] = `
-
+
- info
- Banner
+ info Banner
-
+
`;
exports[`sticky banner 1`] = `
-
+
`;
exports[`success banner 1`] = `
-
+
- success
- Banner
+ success Banner
-
+
`;
exports[`warning banner 1`] = `
-
+
- warning
- Banner
+ warning Banner
-
+
`;
diff --git a/packages/react-core/src/components/Brand/__tests__/Brand.test.tsx b/packages/react-core/src/components/Brand/__tests__/Brand.test.tsx
index 48a2fb30a79..102e8510429 100644
--- a/packages/react-core/src/components/Brand/__tests__/Brand.test.tsx
+++ b/packages/react-core/src/components/Brand/__tests__/Brand.test.tsx
@@ -5,12 +5,13 @@ import '@testing-library/jest-dom';
describe('Brand', () => {
test('simple brand', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
+
test('passing children creates picture brand', () => {
- const view = render(
-
+ render(
+
test
);
diff --git a/packages/react-core/src/components/Brand/__tests__/__snapshots__/Brand.test.tsx.snap b/packages/react-core/src/components/Brand/__tests__/__snapshots__/Brand.test.tsx.snap
index 36f357fe594..5adddc3b108 100644
--- a/packages/react-core/src/components/Brand/__tests__/__snapshots__/Brand.test.tsx.snap
+++ b/packages/react-core/src/components/Brand/__tests__/__snapshots__/Brand.test.tsx.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Brand simple brand 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/Breadcrumb.test.tsx b/packages/react-core/src/components/Breadcrumb/__tests__/Breadcrumb.test.tsx
index 13b88ab727f..bc793f7313f 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/Breadcrumb.test.tsx
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/Breadcrumb.test.tsx
@@ -5,26 +5,26 @@ import { render } from '@testing-library/react';
describe('Breadcrumb component', () => {
test('should render default breadcrumb', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumb with className', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumb with aria-label', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumb with children', () => {
- const view = render(
+ const { asFragment } = render(
Item 1 Item 1
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbHeading.test.tsx b/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbHeading.test.tsx
index 25c4e4aab55..a1c1f89c778 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbHeading.test.tsx
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbHeading.test.tsx
@@ -4,31 +4,31 @@ import { render } from '@testing-library/react';
describe('BreadcrumbHeading component', () => {
test('should render default breadcrumbHeading', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should pass classname', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should pass custom id', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render link breadcrumbTitle', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbHeading with target', () => {
- const view = render(
+ const { asFragment } = render(
Item
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbItem.test.tsx b/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbItem.test.tsx
index 9721ed242a1..d333bfda427 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbItem.test.tsx
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/BreadcrumbItem.test.tsx
@@ -4,51 +4,49 @@ import { render } from '@testing-library/react';
describe('BreadcrumbItem component', () => {
test('should render default breadcrumbItem', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with className', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with id', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render active breadcrumbItem', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render link breadcrumbItem', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with target', () => {
- const view = render(Item);
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Item);
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with custom element', () => {
- const view = render(
+ const { asFragment } = render(
Header
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with component', () => {
const MyComponent = () => My component contents
;
const consoleError = jest.spyOn(console, 'error').mockImplementation();
- const view = render(
- Stuff
- );
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render(Stuff);
+ expect(asFragment()).toMatchSnapshot();
expect(consoleError).not.toHaveBeenCalled();
});
});
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/Breadcrumb.test.tsx.snap b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/Breadcrumb.test.tsx.snap
index e0b7c8682c5..0a30b033145 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/Breadcrumb.test.tsx.snap
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/Breadcrumb.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Breadcrumb component should render breadcrumb with aria-label 1`] = `
-
+
-
+
`;
exports[`Breadcrumb component should render breadcrumb with children 1`] = `
-
+
-
+
`;
exports[`Breadcrumb component should render breadcrumb with className 1`] = `
-
+
-
+
`;
exports[`Breadcrumb component should render default breadcrumb 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbHeading.test.tsx.snap b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbHeading.test.tsx.snap
index eeb48c1317c..f441c0c16a5 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbHeading.test.tsx.snap
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbHeading.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`BreadcrumbHeading component should pass classname 1`] = `
-
+
@@ -11,11 +11,11 @@ exports[`BreadcrumbHeading component should pass classname 1`] = `
Item
-
+
`;
exports[`BreadcrumbHeading component should pass custom id 1`] = `
-
+
-
+
`;
exports[`BreadcrumbHeading component should render breadcrumbHeading with target 1`] = `
-
+
@@ -47,11 +47,11 @@ exports[`BreadcrumbHeading component should render breadcrumbHeading with target
-
+
`;
exports[`BreadcrumbHeading component should render default breadcrumbHeading 1`] = `
-
+
@@ -61,11 +61,11 @@ exports[`BreadcrumbHeading component should render default breadcrumbHeading 1`]
Item
-
+
`;
exports[`BreadcrumbHeading component should render link breadcrumbTitle 1`] = `
-
+
@@ -81,5 +81,5 @@ exports[`BreadcrumbHeading component should render link breadcrumbTitle 1`] = `
-
+
`;
diff --git a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbItem.test.tsx.snap b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbItem.test.tsx.snap
index ddcfdc28697..9bc113a9dba 100644
--- a/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbItem.test.tsx.snap
+++ b/packages/react-core/src/components/Breadcrumb/__tests__/__snapshots__/BreadcrumbItem.test.tsx.snap
@@ -1,37 +1,37 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`BreadcrumbItem component should render active breadcrumbItem 1`] = `
-
+
Item
-
+
`;
exports[`BreadcrumbItem component should render breadcrumbItem with className 1`] = `
-
+
Item
-
+
`;
exports[`BreadcrumbItem component should render breadcrumbItem with component 1`] = `
-
+
Stuff
-
+
`;
exports[`BreadcrumbItem component should render breadcrumbItem with custom element 1`] = `
-
+
@@ -39,42 +39,42 @@ exports[`BreadcrumbItem component should render breadcrumbItem with custom eleme
Header
-
+
`;
exports[`BreadcrumbItem component should render breadcrumbItem with id 1`] = `
-
+
Item
-
+
`;
exports[`BreadcrumbItem component should render breadcrumbItem with target 1`] = `
-
+
Item
-
+
`;
exports[`BreadcrumbItem component should render default breadcrumbItem 1`] = `
-
+
Item
-
+
`;
exports[`BreadcrumbItem component should render link breadcrumbItem 1`] = `
-
+
@@ -85,5 +85,5 @@ exports[`BreadcrumbItem component should render link breadcrumbItem 1`] = `
Item
-
+
`;
diff --git a/packages/react-core/src/components/Button/__tests__/Button.test.tsx b/packages/react-core/src/components/Button/__tests__/Button.test.tsx
index 26fcfb993de..b8d19a3472e 100644
--- a/packages/react-core/src/components/Button/__tests__/Button.test.tsx
+++ b/packages/react-core/src/components/Button/__tests__/Button.test.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
-import '@testing-library/jest-dom';
import CartArrowDownIcon from '@patternfly/react-icons/dist/esm/icons/cart-arrow-down-icon';
import { Button, ButtonVariant } from '../Button';
@@ -9,12 +8,12 @@ import { Button, ButtonVariant } from '../Button';
describe('Button', () => {
Object.values(ButtonVariant).forEach(variant => {
test(`${variant} button`, () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
@@ -26,82 +25,82 @@ describe('Button', () => {
});
test('link with icon', () => {
- const view = render(
+ const { asFragment } = render(
}>
Block Button
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('isBlock', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('isDisabled', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('isDanger secondary', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('isDanger link', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('isAriaDisabled button', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('isAriaDisabled link button', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('isInline', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('isSmall', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('isLarge', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('isLoading', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('allows passing in a string as the component', () => {
@@ -119,23 +118,23 @@ describe('Button', () => {
});
test('aria-disabled is set to true and tabIndex to -1 if component is not a button and is disabled', () => {
- const view = render(
+ const { asFragment } = render(
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('setting tab index through props', () => {
render();
- expect(screen.getByRole('button').getAttribute('tabindex')).toEqual('0');
+ expect(screen.getByRole('button')).toHaveAttribute('tabindex', '0');
});
test('isLoading icon only', () => {
- const view = render(
+ const { asFragment } = render(
"`;
+exports[`FormHelperText LoginFooterItem with custom node 1`] = `
+
+
+
+ My custom node
+
+
+
+`;
-exports[`FormHelperText className is added to the root element 1`] = `"test
"`;
+exports[`FormHelperText className is added to the root element 1`] = `
+
+
+
+`;
-exports[`FormHelperText renders with PatternFly Core styles 1`] = `"test
"`;
+exports[`FormHelperText renders with PatternFly Core styles 1`] = `
+
+
+ test
+
+
+`;
-exports[`FormHelperText renders with icon 1`] = `"test
"`;
+exports[`FormHelperText renders with icon 1`] = `
+
+
+
+
+
+ test
+
+
+`;
diff --git a/packages/react-core/src/components/Form/__tests__/__snapshots__/FormSection.test.tsx.snap b/packages/react-core/src/components/Form/__tests__/__snapshots__/FormSection.test.tsx.snap
index 08724d3e83e..ca8bb447a09 100644
--- a/packages/react-core/src/components/Form/__tests__/__snapshots__/FormSection.test.tsx.snap
+++ b/packages/react-core/src/components/Form/__tests__/__snapshots__/FormSection.test.tsx.snap
@@ -1,17 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Check form section example against snapshot 1`] = `
-
+
-
+ />
+
`;
exports[`Check form section example with title 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx b/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx
index b3f650e5688..a8aad0a2f65 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx
+++ b/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import '@testing-library/jest-dom';
import { FormSelect } from '../FormSelect';
import { FormSelectOption } from '../FormSelectOption';
@@ -54,18 +53,18 @@ const groupedProps = {
describe('FormSelect', () => {
test('Simple FormSelect input', () => {
- render(
+ const { asFragment } = render(
{props.options.map((option, index) => (
))}
);
- expect(screen.getByLabelText('simple FormSelect').outerHTML).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Grouped FormSelect input', () => {
- render(
+ const { asFragment } = render(
{groupedProps.groups.map((group, index) => (
@@ -76,71 +75,71 @@ describe('FormSelect', () => {
))}
);
- expect(screen.getByLabelText('grouped FormSelect').outerHTML).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('Disabled FormSelect input ', () => {
- render(
+ const { asFragment } = render(
);
- expect(screen.getByLabelText('disabled FormSelect').outerHTML).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('FormSelect input with aria-label does not generate console error', () => {
const myMock = jest.fn() as any;
global.console = { error: myMock } as any;
- render(
+ const { asFragment } = render(
);
- expect(screen.getByLabelText('label').outerHTML).toMatchSnapshot();
- expect(myMock).not.toBeCalled();
+ expect(asFragment()).toMatchSnapshot();
+ expect(myMock).not.toHaveBeenCalled();
});
test('FormSelect input with id does not generate console error', () => {
const myMock = jest.fn() as any;
global.console = { error: myMock } as any;
- render(
+ const { asFragment } = render(
);
- expect(screen.getByLabelText('label').outerHTML).toMatchSnapshot();
- expect(myMock).not.toBeCalled();
+ expect(asFragment()).toMatchSnapshot();
+ expect(myMock).not.toHaveBeenCalled();
});
test('FormSelect input with no aria-label or id generates console error', () => {
const myMock = jest.fn() as any;
global.console = { error: myMock } as any;
- render(
-
+ const { asFragment } = render(
+
);
- expect(screen.getByTestId('test-id').outerHTML).toMatchSnapshot();
- expect(myMock).toBeCalled();
+ expect(asFragment()).toMatchSnapshot();
+ expect(myMock).toHaveBeenCalled();
});
test('invalid FormSelect input', () => {
- render(
+ const { asFragment } = render(
);
- expect(screen.getByLabelText('invalid FormSelect').outerHTML).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('validated success FormSelect input', () => {
- render(
+ const { asFragment } = render(
@@ -148,12 +147,12 @@ describe('FormSelect', () => {
const formSelect = screen.getByLabelText('validated FormSelect');
- expect(formSelect.className).toContain('pf-m-success');
- expect(formSelect.outerHTML).toMatchSnapshot();
+ expect(formSelect).toHaveClass('pf-m-success');
+ expect(asFragment()).toMatchSnapshot();
});
test('validated warning FormSelect input', () => {
- render(
+ const { asFragment } = render(
@@ -161,8 +160,8 @@ describe('FormSelect', () => {
const formSelect = screen.getByLabelText('validated FormSelect');
- expect(formSelect.className).toContain('pf-m-warning');
- expect(formSelect.outerHTML).toMatchSnapshot();
+ expect(formSelect).toHaveClass('pf-m-warning');
+ expect(asFragment()).toMatchSnapshot();
});
test('required FormSelect input', () => {
@@ -186,7 +185,7 @@ describe('FormSelect', () => {
userEvent.selectOptions(screen.getByLabelText('Some label'), 'Mr');
- expect(myMock).toBeCalled();
+ expect(myMock).toHaveBeenCalled();
expect(myMock.mock.calls[0][0]).toEqual('mr');
});
});
diff --git a/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOption.test.tsx b/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOption.test.tsx
index 52d4f8d32ef..8592d0a9dfc 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOption.test.tsx
+++ b/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOption.test.tsx
@@ -8,6 +8,6 @@ import { FormSelectOption } from '../../FormSelectOption';
import {} from '../..';
it('FormSelectOption should match snapshot (auto-generated)', () => {
- const view = render();
- expect(view.container).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOptionGroup.test.tsx b/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOptionGroup.test.tsx
index f1336e3bb06..fcb1a57b6f7 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOptionGroup.test.tsx
+++ b/packages/react-core/src/components/FormSelect/__tests__/Generated/FormSelectOptionGroup.test.tsx
@@ -8,8 +8,8 @@ import { FormSelectOptionGroup } from '../../FormSelectOptionGroup';
import {} from '../..';
it('FormSelectOptionGroup should match snapshot (auto-generated)', () => {
- const view = render(
+ const { asFragment } = render(
ReactNode>} className={"''"} label={'string'} isDisabled={false} />
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOption.test.tsx.snap b/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOption.test.tsx.snap
index 9b44beabe4e..333bd0012a8 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOption.test.tsx.snap
+++ b/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOption.test.tsx.snap
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FormSelectOption should match snapshot (auto-generated) 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOptionGroup.test.tsx.snap b/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOptionGroup.test.tsx.snap
index edd43ce9483..2aa0cf1ec40 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOptionGroup.test.tsx.snap
+++ b/packages/react-core/src/components/FormSelect/__tests__/Generated/__snapshots__/FormSelectOptionGroup.test.tsx.snap
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FormSelectOptionGroup should match snapshot (auto-generated) 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/FormSelect/__tests__/__snapshots__/FormSelect.test.tsx.snap b/packages/react-core/src/components/FormSelect/__tests__/__snapshots__/FormSelect.test.tsx.snap
index 2cf1a416d87..3a97adeaca3 100644
--- a/packages/react-core/src/components/FormSelect/__tests__/__snapshots__/FormSelect.test.tsx.snap
+++ b/packages/react-core/src/components/FormSelect/__tests__/__snapshots__/FormSelect.test.tsx.snap
@@ -1,19 +1,266 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`FormSelect Disabled FormSelect input 1`] = `""`;
+exports[`FormSelect Disabled FormSelect input 1`] = `
+
+
+
+`;
-exports[`FormSelect FormSelect input with aria-label does not generate console error 1`] = `""`;
+exports[`FormSelect FormSelect input with aria-label does not generate console error 1`] = `
+
+
+
+`;
-exports[`FormSelect FormSelect input with id does not generate console error 1`] = `""`;
+exports[`FormSelect FormSelect input with id does not generate console error 1`] = `
+
+
+
+`;
-exports[`FormSelect FormSelect input with no aria-label or id generates console error 1`] = `""`;
+exports[`FormSelect FormSelect input with no aria-label or id generates console error 1`] = `
+
+
+
+`;
-exports[`FormSelect Grouped FormSelect input 1`] = `""`;
+exports[`FormSelect Grouped FormSelect input 1`] = `
+
+
+
+`;
-exports[`FormSelect Simple FormSelect input 1`] = `""`;
+exports[`FormSelect Simple FormSelect input 1`] = `
+
+
+
+`;
-exports[`FormSelect invalid FormSelect input 1`] = `""`;
+exports[`FormSelect invalid FormSelect input 1`] = `
+
+
+
+`;
-exports[`FormSelect validated success FormSelect input 1`] = `""`;
+exports[`FormSelect validated success FormSelect input 1`] = `
+
+
+
+`;
-exports[`FormSelect validated warning FormSelect input 1`] = `""`;
+exports[`FormSelect validated warning FormSelect input 1`] = `
+
+
+
+`;
diff --git a/packages/react-core/src/components/HelperText/__tests__/HelperText.test.tsx b/packages/react-core/src/components/HelperText/__tests__/HelperText.test.tsx
index de882946619..e552b46f90c 100644
--- a/packages/react-core/src/components/HelperText/__tests__/HelperText.test.tsx
+++ b/packages/react-core/src/components/HelperText/__tests__/HelperText.test.tsx
@@ -6,61 +6,61 @@ import { CheckIcon } from '@patternfly/react-icons';
describe('HelperText', () => {
test('simple helper text renders successfully', () => {
- const view = render(
+ const { asFragment } = render(
help test text
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
Object.values(['default', 'indeterminate', 'warning', 'success', 'invalid']).forEach(variant => {
test(`${variant} helper text variant applies successfully`, () => {
- const view = render(
-
+ const { asFragment } = render(
+
{variant} help test text
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
test('variant comonent helper text renders properly', () => {
- const view = render(
+ const { asFragment } = render(
help test text 1
help test text 2
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('icon helper text renders properly', () => {
- const view = render(
+ const { asFragment } = render(
}>help test text
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('dynamic helper text renders successfully', () => {
- const view = render(
+ const { asFragment } = render(
help test text
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('helper text block renders successfully', () => {
- const view = render(
+ const { asFragment } = render(
help test text 1
help test text 2
help test text 3
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
});
diff --git a/packages/react-core/src/components/HelperText/__tests__/__snapshots__/HelperText.test.tsx.snap b/packages/react-core/src/components/HelperText/__tests__/__snapshots__/HelperText.test.tsx.snap
index 4f8c4d9d25e..c7f1dec8744 100644
--- a/packages/react-core/src/components/HelperText/__tests__/__snapshots__/HelperText.test.tsx.snap
+++ b/packages/react-core/src/components/HelperText/__tests__/__snapshots__/HelperText.test.tsx.snap
@@ -1,22 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`HelperText default helper text variant applies successfully 1`] = `
-
+
- default
- help test text
+ default help test text
-
+
`;
exports[`HelperText dynamic helper text renders successfully 1`] = `
-
+
@@ -48,11 +47,11 @@ exports[`HelperText dynamic helper text renders successfully 1`] = `
-
+
`;
exports[`HelperText helper text block renders successfully 1`] = `
-
+
@@ -84,11 +83,11 @@ exports[`HelperText helper text block renders successfully 1`] = `
-
+
`;
exports[`HelperText icon helper text renders properly 1`] = `
-
+
@@ -120,41 +119,39 @@ exports[`HelperText icon helper text renders properly 1`] = `
-
+
`;
exports[`HelperText indeterminate helper text variant applies successfully 1`] = `
-
+
- indeterminate
- help test text
+ indeterminate help test text
-
+
`;
exports[`HelperText invalid helper text variant applies successfully 1`] = `
-
+
- invalid
- help test text
+ invalid help test text
-
+
`;
exports[`HelperText simple helper text renders successfully 1`] = `
-
+
@@ -168,26 +165,25 @@ exports[`HelperText simple helper text renders successfully 1`] = `
-
+
`;
exports[`HelperText success helper text variant applies successfully 1`] = `
-
+
- success
- help test text
+ success help test text
-
+
`;
exports[`HelperText variant comonent helper text renders properly 1`] = `
-
+
@@ -210,20 +206,19 @@ exports[`HelperText variant comonent helper text renders properly 1`] = `
-
+
`;
exports[`HelperText warning helper text variant applies successfully 1`] = `
-
+
- warning
- help test text
+ warning help test text
-
+
`;
diff --git a/packages/react-core/src/components/Hint/__tests__/Hint.test.tsx b/packages/react-core/src/components/Hint/__tests__/Hint.test.tsx
index 81d0f2f4b2a..c59ce9a96fa 100644
--- a/packages/react-core/src/components/Hint/__tests__/Hint.test.tsx
+++ b/packages/react-core/src/components/Hint/__tests__/Hint.test.tsx
@@ -6,12 +6,12 @@ import { HintTitle } from '../HintTitle';
import { HintFooter } from '../HintFooter';
test('simple hint', () => {
- const view = render(
+ const { asFragment } = render(
Title
Body
Footer
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Hint/__tests__/__snapshots__/Hint.test.tsx.snap b/packages/react-core/src/components/Hint/__tests__/__snapshots__/Hint.test.tsx.snap
index 13d39c9092e..e70e2dc0a55 100644
--- a/packages/react-core/src/components/Hint/__tests__/__snapshots__/Hint.test.tsx.snap
+++ b/packages/react-core/src/components/Hint/__tests__/__snapshots__/Hint.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`simple hint 1`] = `
-
+
@@ -24,5 +24,5 @@ exports[`simple hint 1`] = `
Footer
-
+
`;
diff --git a/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx b/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx
index b040974b2eb..7580d6d0070 100644
--- a/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx
+++ b/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx
@@ -11,13 +11,13 @@ describe('InputGroup', () => {
// In this test, TextInput is a form-control component and Button is not.
// If Button has an id props, this should be used in aria-describedby.
render(
-
+
hello
);
- expect(screen.getByLabelText('some text').getAttribute('aria-describedby')).toEqual('button-id');
+ expect(screen.getByLabelText('some text')).toHaveAttribute('aria-describedby', 'button-id');
});
});
diff --git a/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx b/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx
index de445aa93cf..a4ad334dc0e 100644
--- a/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx
+++ b/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
-import '@testing-library/jest-dom';
import { InputGroupText, InputGroupTextVariant } from '../InputGroupText';
diff --git a/packages/react-core/src/components/JumpLinks/__tests__/JumpLinks.test.tsx b/packages/react-core/src/components/JumpLinks/__tests__/JumpLinks.test.tsx
index 1f41ba70aec..705d27a572b 100644
--- a/packages/react-core/src/components/JumpLinks/__tests__/JumpLinks.test.tsx
+++ b/packages/react-core/src/components/JumpLinks/__tests__/JumpLinks.test.tsx
@@ -5,51 +5,51 @@ import { JumpLinksItem } from '../JumpLinksItem';
import { JumpLinksList } from '../JumpLinksList';
test('simple jumplinks', () => {
- const view = render(
+ const { asFragment } = render(
Inactive section
Active section
Inactive section
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('jumplinks centered', () => {
- const view = render(
+ const { asFragment } = render(
Inactive section
Active section
Inactive section
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('jumplinks with label', () => {
- const view = render(
+ const { asFragment } = render(
Inactive section
Active section
Inactive section
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('vertical with label', () => {
- const view = render(
+ const { asFragment } = render(
Inactive section
Active section
Inactive section
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
test('expandable vertical with subsection', () => {
- const view = render(
+ const { asFragment } = render(
Inactive section
@@ -64,5 +64,5 @@ test('expandable vertical with subsection', () => {
Inactive section
);
- expect(view.container).toMatchSnapshot();
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap b/packages/react-core/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap
index 66186fe296d..a31adaba723 100644
--- a/packages/react-core/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap
+++ b/packages/react-core/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`expandable vertical with subsection 1`] = `
-
+
@@ -159,11 +157,11 @@ exports[`expandable vertical with subsection 1`] = `
-
+
`;
exports[`jumplinks centered 1`] = `
-
+
-
+
`;
exports[`jumplinks with label 1`] = `
-
+
-
+
`;
exports[`simple jumplinks 1`] = `
-
+
-
+
`;
exports[`vertical with label 1`] = `
-
+
-
+
`;
diff --git a/packages/react-core/src/components/Label/__tests__/Label.test.tsx b/packages/react-core/src/components/Label/__tests__/Label.test.tsx
index 5f34065ce53..9e62765bbc1 100644
--- a/packages/react-core/src/components/Label/__tests__/Label.test.tsx
+++ b/packages/react-core/src/components/Label/__tests__/Label.test.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import '@testing-library/jest-dom';
import { Label } from '../Label';
@@ -10,123 +9,91 @@ const labelColors = ['blue', 'cyan', 'green', 'orange', 'purple', 'red', 'grey']
describe('Label', () => {
test('renders', () => {
- render();
- expect(screen.getByTestId('label-test-id').outerHTML).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('renders with outline variant', () => {
- render(
-
- );
- expect(screen.getByTestId('label-test-id').outerHTML).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('renders with isCompact', () => {
- render(
-
- );
- expect(screen.getByTestId('label-test-id').outerHTML).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('label with href', () => {
- render(
-
- );
- expect(screen.getByTestId('label-test-id').outerHTML).toMatchSnapshot();
+ const { asFragment } = render();
+ expect(asFragment()).toMatchSnapshot();
});
test('label with href with outline variant', () => {
- render(
-