Skip to content

Commit

Permalink
test: fix bad IconButton test case, with invalid viewBox attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald authored and brian-smith-tcril committed Dec 6, 2024
1 parent ed695e8 commit 59a3634
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
10 changes: 8 additions & 2 deletions src/IconButton/IconButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ describe('<IconButton />', () => {
};
const deprecatedFontAwesomeExample = {
prefix: 'pgn',
iconName: 'InfoOutlineIcon',
icon: [InfoOutline],
iconName: 'copy',
icon: [
448,
512,
[],
'f0c5',
'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',
],
};
it('renders with required props', () => {
const tree = renderer.create((
Expand Down
18 changes: 4 additions & 14 deletions src/IconButton/__snapshots__/IconButton.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,17 @@ exports[`<IconButton /> renders with deprecated props 1`] = `
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-InfoOutlineIcon btn-icon__icon"
data-icon="InfoOutlineIcon"
className="svg-inline--fa fa-copy btn-icon__icon"
data-icon="copy"
data-prefix="pgn"
focusable="false"
role="img"
style={{}}
viewBox="0 0 function SvgInfoOutline(props) {
return /*#__PURE__*/React.createElement("svg", _extends({
width: 24,
height: 24,
viewBox: "0 0 24 24",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, props), /*#__PURE__*/React.createElement("path", {
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",
fill: "currentColor"
}));
} undefined"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
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"
fill="currentColor"
style={{}}
/>
Expand Down

0 comments on commit 59a3634

Please sign in to comment.