Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #92 from futures/HTMLIntegrationTests
Html integration tests
  • Loading branch information
cbeer committed Jul 4, 2013
2 parents f95ce86 + 156d0cb commit cbd2103
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 41 deletions.
14 changes: 10 additions & 4 deletions fcrepo-http-api/pom.xml
Expand Up @@ -124,10 +124,16 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<!-- This dependency is for compile-time: it keeps this module independent of
any given choice of JAX-RS implementation. It must be _after_ the test gear. Otherwise
it will get loaded during test phase, but because this is just an API, the tests
will not be able to execute. -->
<dependency>
<groupId>nu.validator.htmlparser</groupId>
<artifactId>htmlparser</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<!-- This dependency is for compile-time: it keeps this module independent
of any given choice of JAX-RS implementation. It must be _after_ the test
gear. Otherwise it will get loaded during test phase, but because this is
just an API, the tests will not be able to execute. -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
Expand Down
Expand Up @@ -14,9 +14,9 @@
</label>


<label id="datastream_payload">
<label for="datastream_payload">
File
<input type="file" id="update_file"/>
<input type="file" id="datastream_payload"/>
</label>
<button type="submit" class="btn btn-primary">Add</button>
<hr />
Expand Down
3 changes: 1 addition & 2 deletions fcrepo-http-api/src/main/resources/views/common.js
Expand Up @@ -21,8 +21,7 @@ function addChild()
}

if (mixin == "fedora:datastream") {
var update_file = document.getElementById("update_file").files[0];
var reader = new FileReader();
var update_file = document.getElementById("datastream_payload").files[0];var reader = new FileReader();
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
Expand Down
Expand Up @@ -2,7 +2,7 @@
#* @vtlvariable name="subjects" type="com.hp.hpl.jena.rdf.model.ResIterator" *#
#* @vtlvariable name="nodeany" type="com.hp.hpl.jena.graph.Node" *#
#* @vtlvariable name="topic" type="com.hp.hpl.jena.graph.Node" *#
<!DOCTYPE HTML>
<!DOCTYPE html>
#parse("views/common.vsl")
<html>
<head>
Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/mode-root.vsl
@@ -1,11 +1,12 @@
#* @vtlvariable name="uriInfo" type="javax.ws.rs.core.UriInfo" *#
<!DOCTYPE HTML>
<!DOCTYPE html>
#set( $title = $helpers.getObjectTitle($rdf, $topic) )

#parse("views/common.vsl")
<html>
<head>
<title>$title</title>
<meta charset="UTF-8">
#parse("views/common-head.vsl")
</head>

Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/nt-file.vsl
@@ -1,9 +1,10 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
#set( $title = $helpers.getObjectTitle($rdf, $topic) )

#parse("views/common.vsl")
<html>
<head>
<meta charset="UTF-8">
<title>$title</title>
#parse("views/common-head.vsl")
</head>
Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/nt-folder.vsl
@@ -1,10 +1,11 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
#set( $title = $helpers.getObjectTitle($rdf, $topic) )

#parse("views/common.vsl")
<html>
<head>
<title>$title</title>
<meta charset="UTF-8">
#parse("views/common-head.vsl")
</head>

Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/nt-resource.vsl
@@ -1,10 +1,11 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
#set( $title = $helpers.getObjectTitle($rdf, $topic) )

#parse("views/common.vsl")
<html>
<head>
<title>$title</title>
<meta charset="UTF-8">
#parse("views/common-head.vsl")
</head>

Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/search-form.vsl
@@ -1,8 +1,9 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
#parse("views/common.vsl")
<html>
<head>
<title>Search</title>
<meta charset="UTF-8">
#parse("views/common-head.vsl")
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion fcrepo-http-api/src/main/resources/views/search-results.vsl
Expand Up @@ -2,11 +2,12 @@
#* @vtlvariable name="subjects" type="com.hp.hpl.jena.rdf.model.ResIterator" *#
#* @vtlvariable name="nodeany" type="com.hp.hpl.jena.graph.Node" *#
#* @vtlvariable name="topic" type="com.hp.hpl.jena.graph.Node" *#
<!DOCTYPE HTML>
<!DOCTYPE html>
#parse("views/common.vsl")
<html>
<head>
<title>Search results</title>
<meta charset="UTF-8">
#parse("views/common-head.vsl")
</head>
<body>
Expand Down

0 comments on commit cbd2103

Please sign in to comment.