<uri>/cspace-services/personauthorities</uri>
<filename>authority/personauthority.xml</filename>
<vars>
- <!-- Nonsense words (terms, strings, tokens ...) to build short -->
- <!-- identifiers and display names, and to populate text field(s). -->
+ <!-- Nonsense words to build short identifiers and display -->
+ <!-- names, and to populate text field(s). -->
<var ID="word1">jlmbsoq</var>
<var ID="word2">tqbfjotld</var>
<!-- Partial term searches using one or more of those words. -->
</test>
<!-- Create one item in a vocabulary in the Location Authority -->
- <test ID="createLocationItem1">
+ <test ID="createLocationItem">
<expectedCodes>201</expectedCodes>
<method>POST</method>
<uri>/cspace-services/locationauthorities/${createLocationAuthority.CSID}/items</uri>
<var ID="itemShortIdentifier">${createPersonAuthority1.word1}item1</var>
</vars>
</test>
+ <test ID="verifyLocationItem">
+ <expectedCodes>200</expectedCodes>
+ <method>GET</method>
+ <uri>/cspace-services/locationauthorities/${createLocationAuthority.CSID}/items/${createLocationItem.CSID}</uri>
+ </test>
<!--
Perform 'all vocabularies' searches and verify that the
expected items were returned by each search.
-->
+ <!-- List (without searching) -->
+
+ <test ID="getPersonItems">
+ <expectedCodes>200</expectedCodes>
+ <method>GET</method>
+ <uri>/cspace-services/personauthorities/_ALL_/items?pgSz=3&pgNum=0</uri>
+ <response>
+ <expected level="TEXT"/>
+ <filename>authority/res/personItems.res.xml</filename>
+ </response>
+ </test>
+
<!-- Keyword searches -->
<!-- On first word -->
<uri>/cspace-services/personauthorities/_ALL_/items?kw=${createPersonAuthority1.word1}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord1.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord1.res.xml</filename>
</response>
</test>
<!-- On second word -->
<uri>/cspace-services/personauthorities/_ALL_/items?kw=${createPersonAuthority1.word2}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord2.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord2.res.xml</filename>
</response>
</test>
<uri>/cspace-services/personauthorities/_ALL_/items?pt=${createPersonAuthority1.word1PartialTermStem}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord1.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord1.res.xml</filename>
</response>
</test>
<!-- Stem matching on second word -->
<uri>/cspace-services/personauthorities/_ALL_/items?pt=${createPersonAuthority1.word2PartialTermStem}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord2.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord2.res.xml</filename>
</response>
</test>
<!-- Middle-of-term matching on second word -->
<uri>/cspace-services/personauthorities/_ALL_/items?pt=${createPersonAuthority1.word2PartialTermMid}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord2.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord2.res.xml</filename>
</response>
</test>
<uri>/cspace-services/personauthorities/_ALL_/items?as=persons_common%3AdisplayName%20ILIKE%20%27%25${createPersonAuthority1.word1}%25%27</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord1.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord1.res.xml</filename>
</response>
</test>
<!-- On second word -->
<uri>/cspace-services/personauthorities/_ALL_/items?as=persons_common%3AdisplayName%20ILIKE%20%27%25${createPersonAuthority1.word2}%25%27</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord2.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord2.res.xml</filename>
</response>
</test>
<!-- In a field other than display name -->
<uri>/cspace-services/personauthorities/_ALL_/items?as=persons_common%3AforeName%20ILIKE%20%27%25${createPersonAuthority1.word2}%25%27</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/personauthorityWord2.res.xml</filename>
+ <filename>authority/res/personItemsContainingWord2.res.xml</filename>
</response>
</test>
<!-- Verify that tests work in an authority other than Person Authority -->
- <!--
+ <test ID="getPersonItems">
+ <expectedCodes>200</expectedCodes>
+ <method>GET</method>
+ <uri>/cspace-services/locationauthorities/_ALL_/items?pgSz=1&pgNum=0</uri>
+ <response>
+ <expected level="TEXT"/>
+ <filename>authority/res/locationItems.res.xml</filename>
+ </response>
+ </test>
<test ID="kwSearchLocationItems">
<expectedCodes>200</expectedCodes>
<method>GET</method>
<uri>/cspace-services/locationauthorities/_ALL_/items?kw=${createPersonAuthority1.word1}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/locationauthorityWord1.res.xml</filename>
+ <filename>authority/res/locationItemsContainingWord1.res.xml</filename>
</response>
</test>
<test ID="ptStemSearchLocationItems">
<uri>/cspace-services/locationauthorities/_ALL_/items?pt=${createPersonAuthority1.word1PartialTermStem}</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/locationauthorityWord1.res.xml</filename>
+ <filename>authority/res/locationItemsContainingWord1.res.xml</filename>
</response>
</test>
<test ID="advSearchLocationItems">
<uri>/cspace-services/locationauthorities/_ALL_/items?as=locations_common%3AdisplayName%20ILIKE%20%27%25${createPersonAuthority1.word1}%25%27</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/locationauthorityWord1.res.xml</filename>
+ <filename>authority/res/locationItemsContainingWord1.res.xml</filename>
</response>
</test>
<test ID="advSearchLocationItems">
<expectedCodes>200</expectedCodes>
<method>GET</method>
- <uri>/cspace-services/locationauthorities/_ALL_/items?as=locations_common%3Adescription%20ILIKE%20%27%25${createPersonAuthority1.word1}%25%27</uri>
+ <uri>/cspace-services/locationauthorities/_ALL_/items?as=locations_common%3AaccessNote%20ILIKE%20%27%25${createPersonAuthority1.word1}%25%27</uri>
<response>
<expected level="TEXT"/>
- <filename>authority/res/locationauthorityWord1.res.xml</filename>
+ <filename>authority/res/locationItemsContainingWord1.res.xml</filename>
</response>
</test>
- -->
</testGroup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">\r
+ <totalItems>3</totalItems>\r
+ <!--\r
+ Note that tests verifying this specific response may either fail, or\r
+ return a non-fatal NESTED_ERROR, if the order of the list items below\r
+ changes. (This response assumes that items are both returned in reverse\r
+ chronological order by update timestamp (collectionspace_core:updatedAt),\r
+ and that they are created in timestamp order by the order of tests in\r
+ the control file.)\r
+ \r
+ If the list items order changes, you can: reorder the following\r
+ list-items appropriately; remove those items entirely, relying solely\r
+ on the <totalItems> value and not on the actual items returned; or\r
+ rewrite the test and/or response using more sophisticated techniques.\r
+ -->\r
+ <list-item>\r
+ <shortIdentifier>${createPersonAuthority1.word1}item3</shortIdentifier>\r
+ </list-item>\r
+ <list-item>\r
+ <shortIdentifier>${createPersonAuthority1.word1}item2</shortIdentifier>\r
+ </list-item>\r
+ <list-item>\r
+ <shortIdentifier>${createPersonAuthority1.word1}item1</shortIdentifier>\r
+ </list-item>\r
+</ns2:abstract-common-list>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">\r
+ <totalItems>2</totalItems>\r
+ <!--\r
+ Note that tests verifying this specific response may either fail, or\r
+ return a non-fatal NESTED_ERROR, if the order of the list items below\r
+ changes. (This response assumes that items are both returned in reverse\r
+ chronological order by update timestamp (collectionspace_core:updatedAt),\r
+ and that they are created in timestamp order by the order of tests in\r
+ the control file.)\r
+ \r
+ If the list items order changes, you can: reorder the following\r
+ list-items appropriately; remove those items entirely, relying solely\r
+ on the <totalItems> value and not on the actual items returned; or\r
+ rewrite the test and/or response using more sophisticated techniques.\r
+ -->\r
+ <list-item>\r
+ <shortIdentifier>${createPersonAuthority1.word1}item3</shortIdentifier>\r
+ </list-item>\r
+ <list-item>\r
+ <shortIdentifier>${createPersonAuthority1.word1}item1</shortIdentifier>\r
+ </list-item>\r
+</ns2:abstract-common-list>\r
+\r