diff --git a/airbyte-webapp/scripts/classname-serializer.js b/airbyte-webapp/scripts/classname-serializer.js index 40bb27a80cd67..a9f86a9f14a1b 100644 --- a/airbyte-webapp/scripts/classname-serializer.js +++ b/airbyte-webapp/scripts/classname-serializer.js @@ -5,8 +5,13 @@ import { prettyDOM } from "@testing-library/react"; * the count of classnames instead, e.g. "<3 classnames>" */ const traverseAndRedactClasses = (node) => { - if (node.className && typeof node.className === "string") { - node.className = ``; + if ( + node.className && + (typeof node.className === "string" || (node.className instanceof SVGAnimatedString && node.className.baseVal)) + ) { + // We need to use setAttribute here, since on SVGElement we can't + // set `className` to a string for the `SVGAnimatedString` case. + node.setAttribute("class", ``); } node.childNodes.forEach(traverseAndRedactClasses); }; diff --git a/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap b/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap index 4bd204d77b07a..19aca020b0a17 100644 --- a/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap +++ b/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap @@ -160,7 +160,7 @@ exports[`CreateConnectionForm should render 1`] = ` >