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.
@@ -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
+ }
@@ -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",
@@ -20,7 +20,8 @@
20
20
  "normalizeLanguageTags": false,
21
21
  "verifyURISyntax": true,
22
22
  "verifyRelativeURIs": true,
23
- "stopOnError": true
23
+ "stopOnError": true,
24
+ "contextLink": null
24
25
  },
25
26
  "xRequestIdHeaders": null
26
27
  }
@@ -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
- // TODO: removed for GDB10.5 version due to instability of the cluster in the backend
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.5.0",
3
+ "version": "2.6.0-TR1",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -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')