@@ -0,0 +1,2181 @@
+package de.retest.recheck.ignore;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Mockito.mock;%0A%0Aimport java.nio.file.Paths;%0A%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport de.retest.recheck.ui.Path;%0Aimport de.retest.recheck.ui.descriptors.Element;%0Aimport de.retest.recheck.ui.descriptors.IdentifyingAttributes;%0Aimport de.retest.recheck.ui.descriptors.MutableAttributes;%0Aimport de.retest.recheck.ui.diff.AttributeDifference;%0A%0Aclass ContentFilterIT %7B%0A%0A%09@Test%0A%09void should_filter_img_src_and_alt_diffs() throws Exception %7B%0A%09%09final Filter filter = FilterLoader.load( Paths.get( %22src/main/resources/filter/web/content.filter%22 ) ).load();%0A%0A%09%09final Element element = Element.create( %22retestId%22, mock( Element.class ),%0A%09%09%09%09IdentifyingAttributes.create( Path.fromString( %22/html%5B1%5D/img%5B1%5D%22 ), %22img%22 ),%0A%09%09%09%09new MutableAttributes().immutable() );%0A%09%09final AttributeDifference srcDiff =%0A%09%09%09%09new AttributeDifference( %22src%22, %22https://old/img.jpg%22, %22https://new/img.jpg%22 );%0A%09%09final AttributeDifference altDiff = new AttributeDifference( %22alt%22, %22A house.%22, %22A dog.%22 );%0A%09%09final AttributeDifference clipDiff = new AttributeDifference( %22clip%22, %22bla%22, %22blub%22 );%0A%0A%09%09assertThat( filter.matches( element ) ).isFalse();%0A%09%09assertThat( filter.matches( element, srcDiff ) ).isTrue();%0A%09%09assertThat( filter.matches( element, altDiff ) ).isTrue();%0A%09%09assertThat( filter.matches( element, clipDiff ) ).isFalse();%0A%09%7D%0A%0A%09@Test%0A%09void should_filter_text_diffs() throws Exception %7B%0A%09%09final Filter filter = FilterLoader.load( Paths.get( %22src/main/resources/filter/web/content.filter%22 ) ).load();%0A%0A%09%09final Element element = Element.create( %22retestId%22, mock( Element.class ),%0A%09%09%09%09IdentifyingAttributes.create( Path.fromString( %22/html%5B1%5D/p%5B1%5D%22 ), %22p%22 ),%0A%09%09%09%09new MutableAttributes().immutable() );%0A%09%09final AttributeDifference textDiff = new AttributeDifference( %22text%22, %22An ancient text.%22, %22A hip new text.%22 );%0A%09%09final AttributeDifference otherDiff = new AttributeDifference( %22alt%22, %22A house.%22, %22A dog.%22 );%0A%0A%09%09assertThat( filter.matches( element ) ).isFalse();%0A%09%09assertThat( filter.matches( element, textDiff ) ).isTrue();%0A%09%09assertThat( filter.matches( element, otherDiff ) ).isFalse();%0A%09%7D%0A%7D%0A

Add some test for the filters...