This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from IntersectAustralia/HCSVLAB-1185
HCSVLAB-1185 Fix redirections of web ingest actions
- Loading branch information
Showing
7 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.span9 | ||
|
||
%h1= @item.handle | ||
|
||
.well.clearfix | ||
.pull-left | ||
= link_back_to_catalog | ||
- if can? :delete_item_via_web_app, @item.collection | ||
= render "delete_item" | ||
.pull-right | ||
= link_to "#{t('blacklight.search.start_over')}", catalog_index_path, :id => "startOverLink", :class => "btn" | ||
|
||
%h3 | ||
%span Item Details | ||
%dl.dl-horizontal.dl-invert | ||
.alert.alert-warning.permanent | ||
This item is currently being indexed meaning the item and document metadata is currently unavailable. Please wait a few moments then refresh the page to try again. | ||
|
||
%h3 | ||
%span Documents | ||
%dl.dl-horizontal.dl-invert | ||
- if can? :web_add_document, @item.collection | ||
%br | ||
= link_to "Add New Document", web_add_document_path, :id => 'add_new_document', :class => "btn" | ||
|
||
= render 'shared/nectar_attribution' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
object @item | ||
node(:@context) { annotation_context_url } | ||
node(:"#{PROJECT_PREFIX_NAME}:catalog_url") { catalog_url(@item.collection.name, @item.get_name) } | ||
node(:"#{PROJECT_PREFIX_NAME}:metadata") { "processing" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2198,6 +2198,21 @@ Feature: Browsing via API | |
{"success":["item1"]} | ||
""" | ||
|
||
@api_add_item | ||
Scenario: Add item and view item via API while processing index | ||
Given I make a JSON post request for the collections page with the API token for "[email protected]" with JSON params | ||
| name | collection_metadata | | ||
| Test | {"@context": {"Test": "http://collection.test", "dc": "http://purl.org/dc/elements/1.1/", "dcmitype": "http://purl.org/dc/dcmitype/", "marcrel": "http://www.loc.gov/loc.terms/relators/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@id": "http://collection.test", "@type": "dcmitype:Collection", "dc:creator": "Pam Peters", "dc:rights": "All rights reserved to Data Owner", "dc:subject": "English Language", "dc:title": "A test collection", "marcrel:OWN": "Data Owner"} | | ||
When I make a JSON post request for the collection page for id "Test" with the API token for "[email protected]" with JSON params | ||
| items | | ||
| [ { "metadata": { "@context": { "ausnc": "http://ns.ausnc.org.au/schemas/ausnc_md_model/", "corpus": "http://ns.ausnc.org.au/corpora/", "dc": "http://purl.org/dc/terms/", "dcterms": "http://purl.org/dc/terms/", "foaf": "http://xmlns.com/foaf/0.1/", "hcsvlab": "http://hcsvlab.org/vocabulary/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@graph": [ { "@id": "item1", "@type": "ausnc:AusNCObject", "ausnc:document": [ { "@id": "document1", "@type": "foaf:Document", "dcterms:extent": 1234, "dcterms:identifier": "document1.txt", "dcterms:source": { "@id": "file:///data/test_collections/ausnc/test/document1.txt" }, "dcterms:title": "document1#Text", "dcterms:type": "Text" } ], "dcterms:identifier": "item1", "dcterms:isPartOf": { "@id": "corpus:Test" }, "hcsvlab:indexable_document": { "@id": "document1.txt" }, "hcsvlab:display_document": { "@id": "document1.txt" } } ] } } ] | | ||
And I should get a 200 response code | ||
And I make a JSON request for the catalog page for "test:item1" with the API token for "[email protected]" | ||
Then the JSON response should be: | ||
""" | ||
{"@context":"http://example.org/schema/json-ld", "alveo:catalog_url":"http://example.org/catalog/test/item1", "alveo:metadata":"processing"} | ||
""" | ||
|
||
@api_delete_item | ||
Scenario: Delete an item from a non-existing collection | ||
When I make a JSON delete request for the delete item "item1" from collection "Test" page with the API token for "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters