Skip to content

Commit 59a3634

Browse files
bradenmacdonaldbrian-smith-tcril
authored andcommitted
test: fix bad IconButton test case, with invalid viewBox attribute
1 parent ed695e8 commit 59a3634

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/IconButton/IconButton.test.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ describe('<IconButton />', () => {
2020
};
2121
const deprecatedFontAwesomeExample = {
2222
prefix: 'pgn',
23-
iconName: 'InfoOutlineIcon',
24-
icon: [InfoOutline],
23+
iconName: 'copy',
24+
icon: [
25+
448,
26+
512,
27+
[],
28+
'f0c5',
29+
'M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z',
30+
],
2531
};
2632
it('renders with required props', () => {
2733
const tree = renderer.create((

src/IconButton/__snapshots__/IconButton.test.tsx.snap

+4-14
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,17 @@ exports[`<IconButton /> renders with deprecated props 1`] = `
4949
>
5050
<svg
5151
aria-hidden="true"
52-
className="svg-inline--fa fa-InfoOutlineIcon btn-icon__icon"
53-
data-icon="InfoOutlineIcon"
52+
className="svg-inline--fa fa-copy btn-icon__icon"
53+
data-icon="copy"
5454
data-prefix="pgn"
5555
focusable="false"
5656
role="img"
5757
style={{}}
58-
viewBox="0 0 function SvgInfoOutline(props) {
59-
return /*#__PURE__*/React.createElement("svg", _extends({
60-
width: 24,
61-
height: 24,
62-
viewBox: "0 0 24 24",
63-
fill: "none",
64-
xmlns: "http://www.w3.org/2000/svg"
65-
}, props), /*#__PURE__*/React.createElement("path", {
66-
d: "M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z",
67-
fill: "currentColor"
68-
}));
69-
} undefined"
58+
viewBox="0 0 448 512"
7059
xmlns="http://www.w3.org/2000/svg"
7160
>
7261
<path
62+
d="M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"
7363
fill="currentColor"
7464
style={{}}
7565
/>

0 commit comments

Comments
 (0)