mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 02:24:18 +00:00
Feedback on PR 2561
This commit is contained in:
@@ -13,8 +13,6 @@ import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
|
||||
/**
|
||||
@@ -128,14 +126,12 @@ public class SubmissionFormFieldMatcher {
|
||||
String relationshipType,
|
||||
String filter,
|
||||
String searchConfiguration,
|
||||
@Nullable Boolean nameVariants) {
|
||||
boolean nameVariants) {
|
||||
return allOf(
|
||||
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
||||
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
||||
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
||||
nameVariants != null ?
|
||||
hasJsonPath("$.selectableRelationship.nameVariants", is(nameVariants.toString()))
|
||||
: hasNoJsonPath("$.selectableRelationship.nameVariants"),
|
||||
hasJsonPath("$.selectableRelationship.nameVariants", is(String.valueOf(nameVariants))),
|
||||
matchFormFieldDefinition(type, label, mandatoryMessage, repeatable, hints, metadata));
|
||||
}
|
||||
|
||||
@@ -169,14 +165,12 @@ public class SubmissionFormFieldMatcher {
|
||||
String relationshipType,
|
||||
String filter,
|
||||
String searchConfiguration,
|
||||
@Nullable Boolean nameVariants) {
|
||||
boolean nameVariants) {
|
||||
return allOf(
|
||||
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
||||
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
||||
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
||||
nameVariants != null ?
|
||||
hasJsonPath("$.selectableRelationship.nameVariants", is(nameVariants.toString()))
|
||||
: hasNoJsonPath("$.selectableRelationship.nameVariants"),
|
||||
hasJsonPath("$.selectableRelationship.nameVariants", is(String.valueOf(nameVariants))),
|
||||
hasJsonPath("$.label", is(label)),
|
||||
mandatoryMessage != null ? hasJsonPath("$.mandatoryMessage", containsString(mandatoryMessage)) :
|
||||
hasNoJsonPath("$.mandatoryMessage"),
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<!-- Each form set contains an ordered set of pages; each page defines -->
|
||||
<!-- one submission metadata entry screen. Each page has an ordered list -->
|
||||
<!-- of field definitions, Each field definition corresponds to one -->
|
||||
<!-- metadata entry (a so-called row), which has a DC element name, a -->
|
||||
<!-- metadata entry (a so-called row), which has a DC element name, a -->
|
||||
<!-- displayed label, a text string prompt which is called a hint, and -->
|
||||
<!-- an input-type. Each field also may hold optional elements: DC -->
|
||||
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
|
||||
|
Reference in New Issue
Block a user