Commit 10eef00e authored by Robert Knight's avatar Robert Knight

Add missing `uri` properties to annotation fixtures in test

`uri` is a mandatory property of actual annotations. The absence was
causing some tests to fail in Chrome due to the URL constructor being
called with `undefined`.
parent 756d39ba
...@@ -94,6 +94,7 @@ describe('annotation-metadata', function () { ...@@ -94,6 +94,7 @@ describe('annotation-metadata', function () {
context('when an annotation has a direct link', function () { context('when an annotation has a direct link', function () {
it('returns the direct link as a title link', function () { it('returns the direct link as a title link', function () {
var model = { var model = {
uri: 'https://annotatedsite.com/',
links: { links: {
incontext: 'https://example.com', incontext: 'https://example.com',
}, },
...@@ -116,6 +117,7 @@ describe('annotation-metadata', function () { ...@@ -116,6 +117,7 @@ describe('annotation-metadata', function () {
context('when the annotation title is shorter than 30 characters', function () { context('when the annotation title is shorter than 30 characters', function () {
it('returns the annotation title as title text', function () { it('returns the annotation title as title text', function () {
var model = { var model = {
uri: 'https://annotatedsite.com/',
document: { document: {
title: ['A Short Document Title'], title: ['A Short Document Title'],
}, },
...@@ -170,6 +172,7 @@ describe('annotation-metadata', function () { ...@@ -170,6 +172,7 @@ describe('annotation-metadata', function () {
context('when the document has no domain', function () { context('when the document has no domain', function () {
it('returns an empty domain text string', function() { it('returns an empty domain text string', function() {
var model = { var model = {
uri: 'doi:10.1234/5678',
document : { document : {
title: ['example.com'], title: ['example.com'],
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment