graphdb-workbench-tests 2.5.0 → 2.6.0-TR1
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 +2 -0
- package/fixtures/url-import-template.json +2 -1
- package/integration/cluster/cluster-management.spec.js +1 -2
- package/integration/import/import.server.files.spec.js +18 -0
- package/package.json +1 -1
- package/steps/import-steps.js +14 -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
|
@@ -834,6 +834,7 @@
|
|
|
834
834
|
"import.label.bnodes": "BNodes",
|
|
835
835
|
"import.label.datatype": "Datatype",
|
|
836
836
|
"import.popover.relative.iri": "RDF data may contain relative IRIs. In order to make sense of them, they need to be resolved against a Base IRI. Typically data does not contain relative IRIs and this field may be left empty.",
|
|
837
|
+
"import.popover.context.link": "Context link is used when importing JSONLD documents only.",
|
|
837
838
|
"import.alert.not.valid.iri": "Not a valid IRI!",
|
|
838
839
|
"import.target.graphs": "Target graphs",
|
|
839
840
|
"import.into.graphs": "Data is imported into one or more graphs. Some RDF formats may specify graphs, while others do not support that. The latter are treated as if they specify the default graph.",
|
|
@@ -919,6 +920,7 @@
|
|
|
919
920
|
"import.last.import.settings": "Last import settings",
|
|
920
921
|
"import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
|
|
921
922
|
"import.enable.replace.option": "Enable this to replace the data in one or more graphs with the imported data.",
|
|
923
|
+
"import.context.link": "Context link",
|
|
922
924
|
"text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
|
|
923
925
|
"url.import.input.placeholder": "Data URL",
|
|
924
926
|
"filesTable.interrupt.import": "Interrupt import",
|
|
@@ -9,8 +9,7 @@ import {ReplaceNodesDialogSteps} from "../../steps/cluster/replace-nodes-dialog-
|
|
|
9
9
|
import {ApplicationSteps} from "../../steps/application-steps";
|
|
10
10
|
import {ClusterViewSteps} from "../../steps/cluster/cluster-view-steps";
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
describe.skip('Cluster management', () => {
|
|
12
|
+
describe('Cluster management', () => {
|
|
14
13
|
|
|
15
14
|
let repositoryId;
|
|
16
15
|
|
|
@@ -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,22 @@ 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
|
+
.selectNamedGraph()
|
|
53
|
+
.fillNamedGraph(CONTEXT)
|
|
54
|
+
.expandAdvancedSettings()
|
|
55
|
+
.setContextLinkToBeVisible()
|
|
56
|
+
.enablePreserveBNodes()
|
|
57
|
+
.fillContextLink(JSONLD_CONTEXT)
|
|
58
|
+
.importFromSettingsDialog()
|
|
59
|
+
.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
60
|
+
.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
|
|
61
|
+
});
|
|
62
|
+
|
|
45
63
|
it('Test import with resetting status of imported file', () => {
|
|
46
64
|
ImportSteps
|
|
47
65
|
.selectServerFile(FILE_FOR_IMPORT)
|
package/package.json
CHANGED
package/steps/import-steps.js
CHANGED
|
@@ -177,6 +177,20 @@ class ImportSteps {
|
|
|
177
177
|
return ImportSteps;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
static fillContextLink(contextLink) {
|
|
181
|
+
ImportSteps.getSettingsForm().find('input[name="contextLink"]').type(contextLink).should('have.value', contextLink);
|
|
182
|
+
|
|
183
|
+
return ImportSteps;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static setContextLinkToBeVisible() {
|
|
187
|
+
ImportSteps.getSettingsForm().within(() => {
|
|
188
|
+
cy.get('.contextLinkRow').invoke('attr', 'style', 'display: block !important');
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
return ImportSteps;
|
|
192
|
+
}
|
|
193
|
+
|
|
180
194
|
static resetStatusOfUploadedFiles() {
|
|
181
195
|
// Button should disappear
|
|
182
196
|
cy.get('#import-server #wb-import-clearStatuses')
|