Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doi-landing-page
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ICAT
doi-landing-page
Commits
df764cde
Commit
df764cde
authored
Sep 20, 2019
by
Maxime Chaillet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work in progress
parent
90d0623e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
236 additions
and
2 deletions
+236
-2
www/karma.conf.js
www/karma.conf.js
+4
-2
www/tests/googleMetadataObject.test.js
www/tests/googleMetadataObject.test.js
+36
-0
www/tests/resources/googleMetadataLibrary.resource.js
www/tests/resources/googleMetadataLibrary.resource.js
+59
-0
www/tests/resources/googleMetadataObject.resource.js
www/tests/resources/googleMetadataObject.resource.js
+137
-0
No files found.
www/karma.conf.js
View file @
df764cde
...
...
@@ -24,12 +24,13 @@ module.exports = function (config) {
'
src/experimentalreportcontroller.js
'
,
'
src/event.js
'
,
'
src/jsonextractor.js
'
,
'
src/googleMetadataObject.js
'
,
'
tests/jsonExtractor.test.js
'
,
'
tests/doiController.test.js
'
,
'
tests/doiData.test.js
'
,
'
tests/googleMetadataObject.test.js
'
,
'
bower_components/lodash/lodash.js
'
,
'
bower_components/moment/moment.js
'
],
...
...
@@ -41,7 +42,8 @@ module.exports = function (config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors
:
{
'
tests/jsonExtractor.test.js
'
:
[
'
browserify
'
]
'
tests/jsonExtractor.test.js
'
:
[
'
browserify
'
],
'
tests/googleMetadataObject.test.js
'
:
[
'
browserify
'
]
},
...
...
www/tests/googleMetadataObject.test.js
0 → 100644
View file @
df764cde
require
(
'
it-each
'
)({
testPerIteration
:
true
});
let
resources
=
require
(
'
./resources/googleMetadataObject.resource
'
);
describe
(
"
googleMetadataObject unit tests
"
,
()
=>
{
describe
(
"
initialization
"
,
()
=>
{
it
.
each
(
resources
.
initialization
,
'
[initialization: %s ]
'
,
[
'
aboutThisTest
'
],
function
(
element
,
next
)
{
let
gmo
=
new
GoogleMetadataObject
(
element
.
data
);
expect
(
gmo
.
getMetadata
()).
toEqual
(
element
.
expected
);
next
();
})
})
describe
(
"
setLicense
"
,
()
=>
{
it
.
each
(
resources
.
setLicense
,
'
[setLicense: %s ]
'
,
[
'
aboutThisTest
'
],
function
(
element
,
next
)
{
let
gmo
=
new
GoogleMetadataObject
(
element
.
data
);
gmo
.
setLicense
();
expect
(
gmo
.
getMetadata
()).
toEqual
(
element
.
expected
);
next
();
})
})
describe
(
"
setDescription
"
,
()
=>
{
it
.
each
(
resources
.
setDescription
,
'
[setDescription: %s ]
'
,
[
'
aboutThisTest
'
],
function
(
element
,
next
)
{
let
gmo2
=
new
GoogleMetadataObject
(
element
.
data
);
gmo2
.
setDescription
();
expect
(
gmo2
.
getMetadata
()).
toEqual
(
element
.
expected
);
next
();
})
})
})
\ No newline at end of file
www/tests/resources/googleMetadataLibrary.resource.js
0 → 100644
View file @
df764cde
module
.
exports
=
{
googleMetadata1
:
{
"
@context
"
:
"
http://schema.org
"
,
"
@type
"
:
"
Dataset
"
,
"
@id
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
,
"
identifier
"
:
{
"
@type
"
:
"
PropertyValue
"
,
"
propertyID
"
:
"
DOI
"
,
"
value
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
},
"
url
"
:
"
https://doi.esrf.fr/10.15151/ESRF-ES-47877949
"
,
"
additionalType
"
:
"
Experiment Session
"
,
"
name
"
:
"
Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.
"
,
"
author
"
:
[
{
"
name
"
:
"
Björn DE SAMBER
"
,
"
givenName
"
:
"
Björn DE
"
,
"
familyName
"
:
"
SAMBER
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Constantin URBAN
"
,
"
givenName
"
:
"
Constantin
"
,
"
familyName
"
:
"
URBAN
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Bart VEKEMANS
"
,
"
givenName
"
:
"
Bart
"
,
"
familyName
"
:
"
VEKEMANS
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Gerald FALKENBERG
"
,
"
givenName
"
:
"
Gerald
"
,
"
familyName
"
:
"
FALKENBERG
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Ella DE PAUW
"
,
"
givenName
"
:
"
Ella DE
"
,
"
familyName
"
:
"
PAUW
"
,
"
@type
"
:
"
Person
"
}
],
"
keywords
"
:
"
Life Sciences, LS-2550, id16a
"
,
"
inLanguage
"
:
"
eng
"
,
"
datePublished
"
:
"
2020
"
,
"
schemaVersion
"
:
"
http://datacite.org/schema/kernel-3
"
,
"
publisher
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
European Synchrotron Radiation Facility
"
},
"
provider
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
DataCite
"
}
}
}
\ No newline at end of file
www/tests/resources/googleMetadataObject.resource.js
0 → 100644
View file @
df764cde
let
library
=
require
(
'
./googleMetadataLibrary.resource
'
);
module
.
exports
=
{
initialization
:
[
{
aboutThisTest
:
'
initialization
'
,
data
:
library
.
googleMetadata1
,
expected
:
library
.
googleMetadata1
}
],
setLicense
:
[
{
data
:
library
.
googleMetadata1
,
expected
:
{
"
@context
"
:
"
http://schema.org
"
,
"
@type
"
:
"
Dataset
"
,
"
@id
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
,
"
identifier
"
:
{
"
@type
"
:
"
PropertyValue
"
,
"
propertyID
"
:
"
DOI
"
,
"
value
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
},
"
url
"
:
"
https://doi.esrf.fr/10.15151/ESRF-ES-47877949
"
,
"
additionalType
"
:
"
Experiment Session
"
,
"
name
"
:
"
Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.
"
,
"
author
"
:
[
{
"
name
"
:
"
Björn DE SAMBER
"
,
"
givenName
"
:
"
Björn DE
"
,
"
familyName
"
:
"
SAMBER
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Constantin URBAN
"
,
"
givenName
"
:
"
Constantin
"
,
"
familyName
"
:
"
URBAN
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Bart VEKEMANS
"
,
"
givenName
"
:
"
Bart
"
,
"
familyName
"
:
"
VEKEMANS
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Gerald FALKENBERG
"
,
"
givenName
"
:
"
Gerald
"
,
"
familyName
"
:
"
FALKENBERG
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Ella DE PAUW
"
,
"
givenName
"
:
"
Ella DE
"
,
"
familyName
"
:
"
PAUW
"
,
"
@type
"
:
"
Person
"
}
],
"
keywords
"
:
"
Life Sciences, LS-2550, id16a
"
,
"
inLanguage
"
:
"
eng
"
,
"
datePublished
"
:
"
2020
"
,
"
schemaVersion
"
:
"
http://datacite.org/schema/kernel-3
"
,
"
publisher
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
European Synchrotron Radiation Facility
"
},
"
provider
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
DataCite
"
},
license
:
"
https://creativecommons.org/licenses/by/4.0
"
}
}
],
setDescription
:
[
{
data
:
library
.
googleMetadata1
,
expected
:
{
"
@context
"
:
"
http://schema.org
"
,
"
@type
"
:
"
Dataset
"
,
"
@id
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
,
"
identifier
"
:
{
"
@type
"
:
"
PropertyValue
"
,
"
propertyID
"
:
"
DOI
"
,
"
value
"
:
"
https://doi.org/10.15151/esrf-es-47877949
"
},
"
url
"
:
"
https://doi.esrf.fr/10.15151/ESRF-ES-47877949
"
,
"
additionalType
"
:
"
Experiment Session
"
,
"
name
"
:
"
Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.
"
,
"
author
"
:
[
{
"
name
"
:
"
Björn DE SAMBER
"
,
"
givenName
"
:
"
Björn DE
"
,
"
familyName
"
:
"
SAMBER
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Constantin URBAN
"
,
"
givenName
"
:
"
Constantin
"
,
"
familyName
"
:
"
URBAN
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Bart VEKEMANS
"
,
"
givenName
"
:
"
Bart
"
,
"
familyName
"
:
"
VEKEMANS
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Gerald FALKENBERG
"
,
"
givenName
"
:
"
Gerald
"
,
"
familyName
"
:
"
FALKENBERG
"
,
"
@type
"
:
"
Person
"
},
{
"
name
"
:
"
Ella DE PAUW
"
,
"
givenName
"
:
"
Ella DE
"
,
"
familyName
"
:
"
PAUW
"
,
"
@type
"
:
"
Person
"
}
],
"
keywords
"
:
"
Life Sciences, LS-2550, id16a
"
,
"
inLanguage
"
:
"
eng
"
,
"
datePublished
"
:
"
2020
"
,
"
schemaVersion
"
:
"
http://datacite.org/schema/kernel-3
"
,
"
publisher
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
European Synchrotron Radiation Facility
"
},
"
provider
"
:
{
"
@type
"
:
"
Organization
"
,
"
name
"
:
"
DataCite
"
},
description
:
"
Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.
"
,
}
}
]
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment