From 63e9df74860b779ad192718196e7370b070c0bf7 Mon Sep 17 00:00:00 2001 From: Martin Weiler Date: Tue, 24 Sep 2024 16:21:40 -0600 Subject: [PATCH] Ignore namespace differences during SVG comparison --- .../main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kogito-test-utils/src/main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java b/kogito-test-utils/src/main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java index 9fb5413f295..f1c46be2126 100644 --- a/kogito-test-utils/src/main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java +++ b/kogito-test-utils/src/main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java @@ -21,6 +21,7 @@ import org.xmlunit.builder.DiffBuilder; import org.xmlunit.builder.Input; import org.xmlunit.diff.ComparisonResult; +import org.xmlunit.diff.ComparisonType; import org.xmlunit.diff.Diff; import org.xmlunit.diff.DifferenceEvaluators; @@ -41,6 +42,9 @@ public CustomSVGDiffer(String content) { if (comparison.getControlDetails().getTarget().getNodeName().equals("svg")) { return ComparisonResult.SIMILAR; } + if (comparison.getType() == ComparisonType.NAMESPACE_URI) { + return ComparisonResult.SIMILAR; + } return outcome; })); }