Skip to content

Commit b20f0da

Browse files
martinweilerrgdoliveira
authored andcommitted
Ignore namespace differences during SVG comparison (apache#3680)
1 parent 9205e59 commit b20f0da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kogito-test-utils/src/main/java/org/kie/kogito/test/utils/CustomSVGDiffer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.xmlunit.builder.DiffBuilder;
2222
import org.xmlunit.builder.Input;
2323
import org.xmlunit.diff.ComparisonResult;
24+
import org.xmlunit.diff.ComparisonType;
2425
import org.xmlunit.diff.Diff;
2526
import org.xmlunit.diff.DifferenceEvaluators;
2627

@@ -41,6 +42,9 @@ public CustomSVGDiffer(String content) {
4142
if (comparison.getControlDetails().getTarget().getNodeName().equals("svg")) {
4243
return ComparisonResult.SIMILAR;
4344
}
45+
if (comparison.getType() == ComparisonType.NAMESPACE_URI) {
46+
return ComparisonResult.SIMILAR;
47+
}
4448
return outcome;
4549
}));
4650
}

0 commit comments

Comments
 (0)