Iiif tests


Admin tests

Setup admin test case

variable defined: currentAuthToken=$divaSystemAdminAuthToken

Case 1: IIF protocol information must be present for all visibilities as an admin. Information must contain a server and identifier properties.

ChildComparerFixture
authToken type id testReadAndStoreRecord?
$divaSystemAdminAuthToken binary $publishedRecordId =~/"otherProtocols":\{"iiif":\{"server":"http://diva:8080/diva/iiif\/","identifier":"binary:\d*"/
$divaSystemAdminAuthToken binary $unpublishedRecordId =~/"otherProtocols":\{"iiif":\{"server":"http://diva:8080/diva/iiif\/","identifier":"binary:\d*"/
$divaSystemAdminAuthToken binary $hiddenRecordId =~/"otherProtocols":\{"iiif":\{"server":"http://diva:8080/diva/iiif\/","identifier":"binary:\d*"/

Guest tests

Setup guest test case

variable defined: currentAuthToken=$guestToken

Case 1: IIF protocol information must only be present for published binaries as a guest

ChildComparerFixture
authToken type id testReadAndStoreRecord?
$guestToken binary $publishedRecordId =~/"otherProtocols":\{"iiif":\{"server":"http://diva:8080/diva/iiif\/","identifier":"binary:\d*"/
$guestToken binary $unpublishedRecordId =~/^(?!.*(iiif).*).+$/
$guestToken binary $hiddenRecordId =~/^(?!.*(iiif).*).+$/