Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ValidationTableColumns_Severity=Schweregrad
ValidationTableColumns_ProblemType=Problemart
ValidationTableColumns_LineNumber=Zeilennummer
ValidationTableColumns_ObjectType=Objektart
ValidationTableColumns_ObjectDesignation=Objectbezeichnung
ValidationTableColumns_ObjectDesignation=Objektbezeichnung
ValidationTableColumns_AttributeGroup=Attribut/-gruppe
ValidationTableColumns_ObjectScope=Bereich
ValidationTableColumns_ObjectState=Zustand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class Messages {
public String ValidationTableColumns_ObjectType;

/**
* Objectbezeichnung
* Objektbezeichnung
*/
public String ValidationTableColumns_ObjectDesignation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ class ValidationTableColumns extends AbstractColumns {
ProblemType = createNew(messages.ValidationTableColumns_ProblemType)
LineNumber = createNew(messages.ValidationTableColumns_LineNumber)
ObjectType = createNew(messages.ValidationTableColumns_ObjectType)
AttributeGroup = createNew(
messages.ValidationTableColumns_AttributeGroup)
ObjectDesignation = createNew(messages.ValidationTableColumns_ObjectDesignation)
AttributeGroup = createNew(messages.ValidationTableColumns_AttributeGroup)
ObjectDesignation = createNew(messages.ValidationTableColumns_ObjectDesignation)
ObjectScope = createNew(messages.ValidationTableColumns_ObjectScope)
ObjectState = createNew(messages.ValidationTableColumns_ObjectState)
Message = createNew(messages.ValidationTableColumns_Message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ValidationTableView extends AbstractTreeLayerTable {
Validierung: %s
Werkzeugkofferversion: %s

"Lfd. Nr.";"Schweregrad";"Problemart";"Zeilennummer";"Objektart";"Attribut/-gruppe";"Bereich";"Zustand";"Meldung"
"Lfd. Nr.";"Schweregrad";"Problemart";"Zeilennummer";"Objektart";"Objekbezeichnung";"Attribut/-gruppe";"Bereich";"Zustand";"Meldung"
""";
private final Messages messages;
private final BasePart part;
Expand Down
4 changes: 3 additions & 1 deletion java/bundles/org.eclipse.set.swtbot/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Require-Bundle: org.eclipse.swt,
junit-jupiter-api,
junit-jupiter-params,
org.junit
Import-Package: jakarta.inject,
Import-Package: com.google.common.escape,
com.google.common.html,
jakarta.inject,
org.eclipse.e4.core.di,
org.eclipse.e4.ui.di,
org.eclipse.nebula.widgets.nattable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
package org.eclipse.set.swtbot;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;

Expand All @@ -18,6 +18,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import com.google.common.html.HtmlEscapers;

/**
* Test for changes in PlaZ Model
*/
Expand Down Expand Up @@ -59,7 +61,13 @@ protected void compareValue(final ILayer nattableLayer, final int startRow,
.get(columnIndex)
.replaceAll(CELL_VALUE_REPLACE_REGEX, "")
.replaceAll(ZERO_WIDTH_SPACE, "");
assertEquals(referenceValue, cellValue);
final String toHtmlString = HtmlEscapers.htmlEscaper()
.escape(referenceValue);
assertTrue(
referenceValue.equals(cellValue)
|| toHtmlString.equals(cellValue),
getErrorMessage(columnIndex, rowIndex, referenceValue,
toHtmlString));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,15 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.ExtensionContext;

import com.google.common.html.HtmlEscapers;

/**
* Test for changes in Validation View
*
* @author Truong
*/
@TestInstance(Lifecycle.PER_CLASS)
public class ValidationViewTest extends AbstractTableTest {
static List<Pair<String, String>> widgetItems = Arrays
.<Pair<String, String>> asList(new Pair<>("Geladene Datei", "MD5"),
new Pair<>("Geladene Datei", "GUID"),
new Pair<>("Verwendetes XML-Schema (in Datei)", "PlanPro"),
new Pair<>("Verwendetes XML-Schema (in Datei)",
"Signalbegriffe"),
new Pair<>("Unterstütztes XML-Schema", "PlanPro"),
new Pair<>("Unterstütztes XML-Schema", "Signalbegriffe"),
new Pair<>("Gültigkeit", "XSD-Gültigkeit"),
new Pair<>("Gültigkeit", "EMF-Gültigkeit"),
new Pair<>("Gültigkeit", "Verarbeitbar"),
new Pair<>("PlanPro-Container", "Enthalten"),
new Pair<>("Untergewerke", "Enthalten"));

private static class ValidationViewFailHandle extends TestFailHandle {
String csvHeader = "\"Item Group\";\"Item label\";\"Expect Value\""
+ System.lineSeparator();
Expand Down Expand Up @@ -104,17 +92,31 @@ private void exportWidgeValue(final ValidationViewTest testInstance) {
}

protected static final String RICHTEXT_REPLACE_REGEX = "<[^>]+>";

protected static final String VALIDATION_INFORMATION_CSV = "validation_information";
protected static final String VALIDATION_TABLE_NAME = "validation_view";

private String tableName = VALIDATION_TABLE_NAME;
static List<Pair<String, String>> widgetItems = Arrays
.<Pair<String, String>> asList(new Pair<>("Geladene Datei", "MD5"),
new Pair<>("Geladene Datei", "GUID"),
new Pair<>("Verwendetes XML-Schema (in Datei)", "PlanPro"),
new Pair<>("Verwendetes XML-Schema (in Datei)",
"Signalbegriffe"),
new Pair<>("Unterstütztes XML-Schema", "PlanPro"),
new Pair<>("Unterstütztes XML-Schema", "Signalbegriffe"),
new Pair<>("Gültigkeit", "XSD-Gültigkeit"),
new Pair<>("Gültigkeit", "EMF-Gültigkeit"),
new Pair<>("Gültigkeit", "Verarbeitbar"),
new Pair<>("PlanPro-Container", "Enthalten"),
new Pair<>("Untergewerke", "Enthalten"));

private static List<String> splitString(final String text,
final String regex) {
final List<String> asList = Arrays.asList(text.split(regex));
return asList.stream().map(e -> e.replaceAll(" ", "")).toList();
}

private String tableName = VALIDATION_TABLE_NAME;

protected List<CSVRecord> informationReference;

@BeforeEach
Expand Down Expand Up @@ -148,7 +150,13 @@ protected void compareValue(final ILayer nattableLayer, final int startRow,
.get(columnIndex)
.replaceAll(CELL_VALUE_REPLACE_REGEX, "")
.replaceAll(ZERO_WIDTH_SPACE, "");
assertEquals(referenceValue, cellValue);
final String toHtmlString = HtmlEscapers.htmlEscaper()
.escape(referenceValue);
assertTrue(
referenceValue.equals(cellValue)
|| toHtmlString.equals(cellValue),
getErrorMessage(columnIndex, rowIndex, referenceValue,
toHtmlString));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.provider.Arguments;

import com.google.common.html.HtmlEscapers;

/**
* Abstract class for table test
*
Expand Down Expand Up @@ -90,8 +92,13 @@ protected void compareValue(final ILayer nattableLayer, final int startRow,
// richtext
// value
.replace("\"\"", "\"");
assertEquals(referenceValue, cellValue, getErrorMessage(
columnIndex, rowIndex, referenceValue, cellValue));
final String toHtmlString = HtmlEscapers.htmlEscaper()
.escape(referenceValue);
assertTrue(
referenceValue.equals(cellValue)
|| toHtmlString.equals(cellValue),
getErrorMessage(columnIndex, rowIndex, referenceValue,
toHtmlString));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Validierungsmeldungen
Datei: validation_view_current.csv
Validierung: 2026-08-18 12:00:05
Validierung: 2026-08-19 08:59:33
Werkzeugkofferversion: ${application-version}

"Lfd. Nr.";"Schweregrad";"Problemart";"Zeilennummer";"Objektart";"Attribut/-gruppe";"Bereich";"Zustand";"Meldung"
"Lfd. Nr.";"Schweregrad";"Problemart";"Zeilennummer";"Objektart";"Objekbezeichnung";"Attribut/-gruppe";"Bereich";"Zustand";"Meldung"
"1";"Warnung";"Fachliche Vollständigkeit";"533";"Aussenelementansteuerung";"ESTW-A P-Hausen";"Datum_Regelwerk";"Planung";"Start";"Die nach Datenmodell erforderliche Angabe ist nicht vorhanden."
"2";"Warnung";"Fachliche Vollständigkeit";"610";"Aussenelementansteuerung";"P-Hausen Achszählrechner";"Datum_Regelwerk";"Planung";"Start";"Die nach Datenmodell erforderliche Angabe ist nicht vorhanden."
"3";"Warnung";"Fachliche Vollständigkeit";"647";"Aussenelementansteuerung";"ESTW-A Linksdorf";"Datum_Regelwerk";"Planung";"Start";"Die nach Datenmodell erforderliche Angabe ist nicht vorhanden."
Expand Down
Loading