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.containsString;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import org.hamcrest.Matcher;
|
import org.hamcrest.Matcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,14 +126,12 @@ public class SubmissionFormFieldMatcher {
|
|||||||
String relationshipType,
|
String relationshipType,
|
||||||
String filter,
|
String filter,
|
||||||
String searchConfiguration,
|
String searchConfiguration,
|
||||||
@Nullable Boolean nameVariants) {
|
boolean nameVariants) {
|
||||||
return allOf(
|
return allOf(
|
||||||
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
||||||
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
||||||
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
||||||
nameVariants != null ?
|
hasJsonPath("$.selectableRelationship.nameVariants", is(String.valueOf(nameVariants))),
|
||||||
hasJsonPath("$.selectableRelationship.nameVariants", is(nameVariants.toString()))
|
|
||||||
: hasNoJsonPath("$.selectableRelationship.nameVariants"),
|
|
||||||
matchFormFieldDefinition(type, label, mandatoryMessage, repeatable, hints, metadata));
|
matchFormFieldDefinition(type, label, mandatoryMessage, repeatable, hints, metadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,14 +165,12 @@ public class SubmissionFormFieldMatcher {
|
|||||||
String relationshipType,
|
String relationshipType,
|
||||||
String filter,
|
String filter,
|
||||||
String searchConfiguration,
|
String searchConfiguration,
|
||||||
@Nullable Boolean nameVariants) {
|
boolean nameVariants) {
|
||||||
return allOf(
|
return allOf(
|
||||||
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
hasJsonPath("$.selectableRelationship.relationshipType", is(relationshipType)),
|
||||||
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
hasJsonPath("$.selectableRelationship.filter", is(filter)),
|
||||||
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
hasJsonPath("$.selectableRelationship.searchConfiguration", is(searchConfiguration)),
|
||||||
nameVariants != null ?
|
hasJsonPath("$.selectableRelationship.nameVariants", is(String.valueOf(nameVariants))),
|
||||||
hasJsonPath("$.selectableRelationship.nameVariants", is(nameVariants.toString()))
|
|
||||||
: hasNoJsonPath("$.selectableRelationship.nameVariants"),
|
|
||||||
hasJsonPath("$.label", is(label)),
|
hasJsonPath("$.label", is(label)),
|
||||||
mandatoryMessage != null ? hasJsonPath("$.mandatoryMessage", containsString(mandatoryMessage)) :
|
mandatoryMessage != null ? hasJsonPath("$.mandatoryMessage", containsString(mandatoryMessage)) :
|
||||||
hasNoJsonPath("$.mandatoryMessage"),
|
hasNoJsonPath("$.mandatoryMessage"),
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<!-- Each form set contains an ordered set of pages; each page defines -->
|
<!-- Each form set contains an ordered set of pages; each page defines -->
|
||||||
<!-- one submission metadata entry screen. Each page has an ordered list -->
|
<!-- one submission metadata entry screen. Each page has an ordered list -->
|
||||||
<!-- of field definitions, Each field definition corresponds to one -->
|
<!-- 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 -->
|
<!-- displayed label, a text string prompt which is called a hint, and -->
|
||||||
<!-- an input-type. Each field also may hold optional elements: DC -->
|
<!-- an input-type. Each field also may hold optional elements: DC -->
|
||||||
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
|
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
|
||||||
|
Reference in New Issue
Block a user