diff --git a/src/components/SQForm/SQFormIconButton.js b/src/components/SQForm/SQFormIconButton.js
index 0b685ed7..dbdc5203 100644
--- a/src/components/SQForm/SQFormIconButton.js
+++ b/src/components/SQForm/SQFormIconButton.js
@@ -18,9 +18,13 @@ function SQFormIconButton({
onClick
);
+ function Icon() {
+ return ;
+ }
+
return (
{
describe('Button Only', () => {
it('should render a button with an icon', () => {
- const {container} = render(
-
- );
+ render();
const iconButton = screen.getByRole('button', {name: /form submission/i});
- const svg = container.getElementsByTagName('svg');
+ const svg = within(iconButton).getByTitle(/form submission/i);
expect(iconButton).toBeInTheDocument();
- expect(svg.length).toEqual(1);
+ expect(svg).toBeInTheDocument();
});
it('should render a submit button', () => {