graphdb-workbench-tests 2.7.0-TR2 → 2.7.0-TR3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fixtures/graphdb-import/0007-import-file.jsonld +27 -0
- package/fixtures/locale-en.json +12 -0
- package/fixtures/url-import-template.json +1 -0
- package/integration/explore/graphs.overview.spec.js +9 -0
- package/integration/import/import.server.files.spec.js +17 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/import-steps.js +6 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@graph": [
|
|
3
|
+
{
|
|
4
|
+
"@id": "http://example.org/test#chapter",
|
|
5
|
+
"http://purl.org/dc/elements/1.1/description": ["Fun"],
|
|
6
|
+
"http://purl.org/dc/elements/1.1/title": ["Chapter One"]
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"@id": "http://example.org/test#jane",
|
|
10
|
+
"http://example.org/vocab#authored": [{"@id": "http://example.org/test#chapter"}],
|
|
11
|
+
"http://xmlns.com/foaf/0.1/name": ["Jane"]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"@id": "http://example.org/test#john",
|
|
15
|
+
"http://xmlns.com/foaf/0.1/name": ["John"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"@id": "http://example.org/test#library",
|
|
19
|
+
"http://example.org/vocab#contains": [{
|
|
20
|
+
"@id": "http://example.org/test#book",
|
|
21
|
+
"http://example.org/vocab#contains": [ "this-is-not-an-IRI" ],
|
|
22
|
+
"http://purl.org/dc/elements/1.1/contributor": ["Writer"],
|
|
23
|
+
"http://purl.org/dc/elements/1.1/title": ["My Book"]
|
|
24
|
+
}]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
package/fixtures/locale-en.json
CHANGED
|
@@ -947,6 +947,8 @@
|
|
|
947
947
|
"import.last.import.settings": "Last import settings",
|
|
948
948
|
"import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
|
|
949
949
|
"import.enable.replace.option": "Enable this to replace the data in one or more graphs with the imported data.",
|
|
950
|
+
"import.context.link": "JSON-LD context",
|
|
951
|
+
"import.context.link.info": "Specifies external JSON-LD context as a URL. Only whitelisted URLs can be used.",
|
|
950
952
|
"text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
|
|
951
953
|
"url.import.input.placeholder": "Data URL",
|
|
952
954
|
"filesTable.interrupt.import": "Interrupt import",
|
|
@@ -1649,6 +1651,16 @@
|
|
|
1649
1651
|
"error": "error",
|
|
1650
1652
|
"import.rdf.data.label": "Import RDF data",
|
|
1651
1653
|
"export.rdf.data": "Export RDF data",
|
|
1654
|
+
"export.settings": "Export settings: JSON-LD",
|
|
1655
|
+
"export": "Export",
|
|
1656
|
+
"jsonld.form": "JSON-LD form",
|
|
1657
|
+
"jsonld.form.info": "Specifies the JSON-LD document form",
|
|
1658
|
+
"jsonld.context.link": "JSON-LD Context",
|
|
1659
|
+
"jsonld.context.link.info": "Specifies external JSON-LD context as a URL. Only whitelisted URLs can be used.",
|
|
1660
|
+
"jsonld.frame.link": "JSON-LD Frame",
|
|
1661
|
+
"jsonld.frame.link.info": "Specifies JSON-LD frame document as a URL. Only whitelisted URLs can be used.",
|
|
1662
|
+
"jsonld.frame.uri.placeholder": "http://example.com/frame.jsonld",
|
|
1663
|
+
"jsonld.context.uri.placeholder": "http://example.com/context.jsonld",
|
|
1652
1664
|
"saved.sparql.queries.label": "Saved SPARQL queries",
|
|
1653
1665
|
"saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
|
|
1654
1666
|
"common.execute": "Execute",
|
|
@@ -123,4 +123,13 @@ describe('Graphs overview screen validation', () => {
|
|
|
123
123
|
YasrSteps.getResultTableHeader().should('be.visible');
|
|
124
124
|
YasrSteps.getResultTableHeaderColumns().should('have.length', 5);
|
|
125
125
|
});
|
|
126
|
+
|
|
127
|
+
it('Export repository in JSONLD format', () => {
|
|
128
|
+
cy.get('.export-repository-btn').click();
|
|
129
|
+
cy.get('.export-repo-format-JSONLD').click();
|
|
130
|
+
cy.get('[id=wb-JSONLD-mode]').select("http://www.w3.org/ns/json-ld#compacted");
|
|
131
|
+
cy.get('[id=wb-JSONLD-context]').type('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
132
|
+
cy.get('[id=wb-export-JSONLD]').click();
|
|
133
|
+
cy.get('.modal-content').should('not.exist');
|
|
134
|
+
});
|
|
126
135
|
});
|
|
@@ -10,6 +10,8 @@ describe('Import screen validation - server files', () => {
|
|
|
10
10
|
const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
|
|
11
11
|
const TTLS_FOR_IMPORT = 'test_turtlestar.ttls';
|
|
12
12
|
const TRIGS_FOR_IMPORT = 'test-trigstar.trigs';
|
|
13
|
+
const JSONLD_FILE_FOR_IMPORT = '0007-import-file.jsonld';
|
|
14
|
+
const JSONLD_CONTEXT = 'https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld';
|
|
13
15
|
|
|
14
16
|
beforeEach(() => {
|
|
15
17
|
repositoryId = 'server-import-' + Date.now();
|
|
@@ -42,6 +44,21 @@ describe('Import screen validation - server files', () => {
|
|
|
42
44
|
.verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
|
|
43
45
|
});
|
|
44
46
|
|
|
47
|
+
// for this test it is necessary to set up a whitelist to GraphDB in this way: -Dgraphdb.jsonld.whitelist=https://w3c.github.io/json-ld-api/tests/*
|
|
48
|
+
it('Test import Server files successfully with JSONLD context link settings', () => {
|
|
49
|
+
ImportSteps.selectServerFile(JSONLD_FILE_FOR_IMPORT)
|
|
50
|
+
.importServerFiles(true)
|
|
51
|
+
.fillBaseURI(BASE_URI)
|
|
52
|
+
.fillContextLink(JSONLD_CONTEXT)
|
|
53
|
+
.selectNamedGraph()
|
|
54
|
+
.fillNamedGraph(CONTEXT)
|
|
55
|
+
.expandAdvancedSettings()
|
|
56
|
+
.enablePreserveBNodes()
|
|
57
|
+
.importFromSettingsDialog()
|
|
58
|
+
.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
59
|
+
.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
|
|
60
|
+
});
|
|
61
|
+
|
|
45
62
|
it('Test import with resetting status of imported file', () => {
|
|
46
63
|
ImportSteps
|
|
47
64
|
.selectServerFile(FILE_FOR_IMPORT)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "2.7.0-
|
|
3
|
+
"version": "2.7.0-TR3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "2.7.0-
|
|
9
|
+
"version": "2.7.0-TR3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
package/steps/import-steps.js
CHANGED
|
@@ -193,6 +193,12 @@ class ImportSteps {
|
|
|
193
193
|
return ImportSteps;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
static fillContextLink(contextLink) {
|
|
197
|
+
ImportSteps.getSettingsForm().find('input[name="contextLink"]').type(contextLink).should('have.value', contextLink);
|
|
198
|
+
|
|
199
|
+
return ImportSteps;
|
|
200
|
+
}
|
|
201
|
+
|
|
196
202
|
static resetStatusOfUploadedFiles() {
|
|
197
203
|
// Button should disappear
|
|
198
204
|
cy.get('#import-server #wb-import-clearStatuses')
|