From: remillet Date: Mon, 29 Jan 2018 07:07:26 +0000 (-0800) Subject: DRYD-239: Make advanced search queries work on GET list request to /vocabularies X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=9e51f188c1c30cb1a0c7abb6afe2b69605e02518;p=tmp%2Fjakarta-migration.git DRYD-239: Make advanced search queries work on GET list request to /vocabularies --- diff --git a/services/IntegrationTests/src/main/java/org/collectionspace/services/IntegrationTests/xmlreplay/XmlReplay.java b/services/IntegrationTests/src/main/java/org/collectionspace/services/IntegrationTests/xmlreplay/XmlReplay.java index 1567c6c6a..82df0f659 100644 --- a/services/IntegrationTests/src/main/java/org/collectionspace/services/IntegrationTests/xmlreplay/XmlReplay.java +++ b/services/IntegrationTests/src/main/java/org/collectionspace/services/IntegrationTests/xmlreplay/XmlReplay.java @@ -551,7 +551,7 @@ public class XmlReplay { evalStruct.jexl = jexl; for (Node testgroup : testgroupNodes) { - String testGroupID = testgroup.valueOf("@autoDeletePOSTS"); + String testGroupID = testgroup.valueOf("@ID"); XmlReplayEval.MapContextWKeys jc = new XmlReplayEval.MapContextWKeys();//MapContext(); //Get a new JexlContext for each test group. evalStruct.jc = jc; autoDeletePOSTS = testgroup.valueOf("@autoDeletePOSTS"); diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyAdvancedSearch.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyAdvancedSearch.res.xml new file mode 100644 index 000000000..c958558f4 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyAdvancedSearch.res.xml @@ -0,0 +1,16 @@ + + 0 + ${itemsInPage} + ${totalItems} + + ${csid} + /vocabularies/${csid} + + urn:cspace:core.collectionspace.org:vocabularies:name(SearchItemsVocab)'SearchItems Vocabulary' + + project + 0 + SearchItemsVocab + SearchItems Vocabulary + + \ No newline at end of file diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyItemsAdvancedSearch.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyItemsAdvancedSearch.res.xml new file mode 100644 index 000000000..b8253d21c --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/responses/searchVocabularyItemsAdvancedSearch.res.xml @@ -0,0 +1,24 @@ + + 0 + ${itemsInPage} + ${totalItems} + + ${createItem2} + + /vocabularies/${csid}/items/${createItem2} + + + urn:cspace:core.collectionspace.org:vocabularies:name(ShowItemsVocab):item:name(ShowItemsItem2)'ShowsItems item ShowItemsItem2' + + project + 0 + The page should match the order:2 + false + true + This is a test vocabulary item + Some mythical book + 2 + ShowsItems item ShowItemsItem2 + ShowItemsItem2 + + \ No newline at end of file diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/searchItems-vocab.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/searchItems-vocab.xml new file mode 100644 index 000000000..349900ed5 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/ShowItems/searchItems-vocab.xml @@ -0,0 +1,11 @@ + + + + SearchItems Vocabulary + SearchItemsVocab + This is a test vocabulary for the ShowItems XMLReplay test group. + XML Replay SearchItems test group. + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/vocabulary.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/vocabulary.xml index 740711e35..00b29687a 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/vocabulary.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/vocabulary/vocabulary.xml @@ -411,6 +411,11 @@ /cspace-services/vocabularies/ vocabulary/ShowItems/showItems-vocab.xml + + POST + /cspace-services/vocabularies/ + vocabulary/ShowItems/searchItems-vocab.xml + POST /cspace-services/vocabularies/${createShowItemsVocab.CSID}/items/ @@ -504,6 +509,33 @@ vocabulary/ShowItems/responses/showVocabWithLastPage.res.xml + + GET + /cspace-services/vocabularies?as=(vocabularies_common:displayName+ILIKE+%22%25SearchItems%25%22) + + + 1 + 1 + ${searchShowItemsVocab.CSID} + + + vocabulary/ShowItems/responses/searchVocabularyAdvancedSearch.res.xml + + + + GET + /cspace-services/vocabularies/${createShowItemsVocab.CSID}/items?as=(vocabularyitems_common:displayName+ILIKE+%22%ShowItemsItem2%25%22) + + + 1 + 1 + ${createShowItemsVocab.CSID} + ${createItem2.CSID} + + + vocabulary/ShowItems/responses/searchVocabularyItemsAdvancedSearch.res.xml + +