graphdb-workbench-tests 2.7.0-TR1 → 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.
@@ -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
+ }
@@ -39,7 +39,8 @@
39
39
  "sending_snapshot": "Sending a snapshot",
40
40
  "sending_snapshot_with_affected_node": "Sending a snapshot to node {{node}}",
41
41
  "receiving_snapshot": "Receiving a snapshot",
42
- "receiving_snapshot_with_affected_node": "Receiving a snapshot from node {{node}}"
42
+ "receiving_snapshot_with_affected_node": "Receiving a snapshot from node {{node}}",
43
+ "recovery_operation_failure_warning_with_affected_node": "Node unable to recover. Action required. Insufficient disk space to create snapshot on nodes '{{node}}'"
43
44
  }
44
45
  },
45
46
  "cluster_configuration": {
@@ -678,8 +679,6 @@
678
679
  "view.similarity.indexes.helpInfo": "Similarity indexes help you look up semantically similar entities and text. Use this view to create, manage and view similarity indexes.",
679
680
  "view.create.similarity.index.title": "Create similarity index",
680
681
  "view.create.similarity.index.helpInfo": "Index name and select query are required. Semantic Vectors parameters are optional.",
681
- "view.sparql.title": "SPARQL Query & Update",
682
- "view.sparql.helpInfo": "The SPARQL Query & Update view is a unified editor for queries and updates. Enter any SPARQL query or update and click Run to execute it. The view also allows you to save queries for future retrieval and execution in the SPARQL editor.",
683
682
  "view.sparql.template.title": "SPARQL Templates",
684
683
  "view.sparql.template.helpInfo": "The SPARQL Templates view is used to create, edit and delete SPARQL templates. The templates can be used to automate complex updates, either directly or via the Kafka Sink connector.",
685
684
  "view.create.sparql.template.title": "Create SPARQL Templates",
@@ -799,9 +798,6 @@
799
798
  "query.editor.automatically.execute.update.warning": "This is an update and it may change the data in the repository.<br>Are you sure you want to execute it automatically?",
800
799
  "query.editor.error.show.full.message": "Show full exception message",
801
800
  "query.editor.error.show.less.message": "Show less exception message",
802
- "sparql.tab.directive.close.last.warning": "Last tab must remain open.",
803
- "sparql.tab.directive.delete.all.tabs.warning": "Are you sure you want to delete all query tabs except selected tab?",
804
- "sparql.tab.directive.close.tab.warning": "Are you sure you want to close this query tab?",
805
801
  "sparql.tab.directive.unnamed.tab.title": "Unnamed",
806
802
  "search.resource.current.page.msg": "Use <b>View resource</b> on this page",
807
803
  "search.resources.msg": "Search RDF resources",
@@ -951,6 +947,8 @@
951
947
  "import.last.import.settings": "Last import settings",
952
948
  "import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
953
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.",
954
952
  "text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
955
953
  "url.import.input.placeholder": "Data URL",
956
954
  "filesTable.interrupt.import": "Interrupt import",
@@ -1473,9 +1471,6 @@
1473
1471
  "save.sparql.template.tooltip": "Save SPARQL template",
1474
1472
  "cancel.sparql.template.creation.tooltip": "Cancel SPARQL template creation",
1475
1473
  "not.usable.active.repo.error": "The currently selected repository cannot be used for queries due to an error:",
1476
- "sparql.editor.only": "Editor only",
1477
- "sparql.editor.and.results": "Editor and results",
1478
- "sparql.results.only": "Results only",
1479
1474
  "existing.indexes": "Existing Indexes",
1480
1475
  "select.existing.similarity.index": "Select one of your existing indexes to search in it",
1481
1476
  "no.indexes": "No Indexes",
@@ -1656,6 +1651,16 @@
1656
1651
  "error": "error",
1657
1652
  "import.rdf.data.label": "Import RDF data",
1658
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",
1659
1664
  "saved.sparql.queries.label": "Saved SPARQL queries",
1660
1665
  "saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
1661
1666
  "common.execute": "Execute",
@@ -1973,6 +1978,26 @@
1973
1978
  "global.operations_statuses.RECOVERING.title": "Recovering",
1974
1979
  "global.operations_statuses.OUT_OF_SYNC.title": "Out of sync",
1975
1980
  "global.operations_statuses.UNAVAILABLE_NODES.title": "Unavailable nodes",
1976
- "view.sparql-editor.title": "Ontotext Yasgui SPARQL Query & Update",
1977
- "view.sparql-editor.helpInfo": "The SPARQL Query & Update view is a unified editor for queries and updates. Enter any SPARQL query or update and click Run to execute it. The view also allows you to save queries for future retrieval and execution in the SPARQL editor."
1981
+ "view.sparql-editor.title": "SPARQL Query & Update",
1982
+ "view.sparql-editor.helpInfo": "The SPARQL Query & Update view is a unified editor for queries and updates. Enter any SPARQL query or update and click Run to execute it. The view also allows you to save queries for future retrieval and execution in the SPARQL editor.",
1983
+ "view.sparql-editor.leave_page.run_queries.confirmation.none_queries_non_updates.message": "Are you sure that you want to exit?",
1984
+ "view.sparql-editor.leave_page.run_queries.confirmation.none_queries_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 update.</div><div>Are you sure that you want to exit?</div>",
1985
+ "view.sparql-editor.leave_page.run_queries.confirmation.none_queries_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{updatesCount}} updates.</div><div>Are you sure that you want to exit?</div>",
1986
+ "view.sparql-editor.leave_page.run_queries.confirmation.one_query_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query, that will be aborted.</div><div>Are you sure that you want to exit?</div>",
1987
+ "view.sparql-editor.leave_page.run_queries.confirmation.one_query_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query and 1 update. The query will be aborted.</div><div>Are you sure that you want to exit?</div>",
1988
+ "view.sparql-editor.leave_page.run_queries.confirmation.one_query_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query and {{updatesCount}} updates. The query will be aborted.</div><div>Are you sure that you want to exit?</div>",
1989
+ "view.sparql-editor.leave_page.run_queries.confirmation.queries_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries. The queries will be aborted</div><div>Are you sure that you want to exit?</div>",
1990
+ "view.sparql-editor.leave_page.run_queries.confirmation.queries_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries and 1 update. The queries will be aborted</div><div>Are you sure that you want to exit?</div>",
1991
+ "view.sparql-editor.leave_page.run_queries.confirmation.queries_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries and {{updatesCount}} updates. The queries will be aborted.</div><div>Are you sure that you want to exit?</div>",
1992
+ "yasgui.tab_list.close_other_tabs.confirmation.none_queries_non_updates.message": "Are you sure you want to close all other query tabs?",
1993
+ "yasgui.tab_list.close_other_tabs.confirmation.none_queries_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 update.</div><div>Are you sure you want to close all other query tabs?</div>",
1994
+ "yasgui.tab_list.close_other_tabs.confirmation.none_queries_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{updatesCount}} updates.</div><div>Are you sure you want to close all other query tabs?</div>",
1995
+ "yasgui.tab_list.close_other_tabs.confirmation.one_query_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query, that will be aborted.</div><div>Are you sure you want to close all other query tabs?</div>",
1996
+ "yasgui.tab_list.close_other_tabs.confirmation.one_query_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query and 1 update. The query will be aborted.</div><div>Are you sure you want to close all other query tabs?</div>",
1997
+ "yasgui.tab_list.close_other_tabs.confirmation.one_query_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query and {{updatesCount}} updates. The query will be aborted.</div><div>Are you sure you want to close all other query tabs?</div>",
1998
+ "yasgui.tab_list.close_other_tabs.confirmation.queries_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries. The queries will be aborted</div><div>Are you sure you want to close all other query tabs?</div>",
1999
+ "yasgui.tab_list.close_other_tabs.confirmation.queries_one_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries and 1 update. The queries will be aborted</div><div>Are you sure you want to close all other query tabs?</div>",
2000
+ "yasgui.tab_list.close_other_tabs.confirmation.queries_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running {{queriesCount}} queries and {{updatesCount}} updates. The queries will be aborted.</div><div>Are you sure you want to close all other query tabs?</div>",
2001
+ "yasgui.tab_list.close_tab.confirmation.not_query_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 update.</div><div>Are you sure you want to close this query tab?</div>",
2002
+ "yasgui.tab_list.close_tab.confirmation.query_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query, that will be aborted.</div><div>Are you sure you want to close this query tab?</div>",
1978
2003
  }
@@ -5,6 +5,7 @@
5
5
  "context": null,
6
6
  "replaceGraphs": [],
7
7
  "baseURI": null,
8
+ "contextLink": null,
8
9
  "forceSerial": false,
9
10
  "type": "url",
10
11
  "format": "",
@@ -154,7 +154,7 @@ describe('Cluster management', () => {
154
154
  // The first, with corresponding for "waiting-for-snapshot" status message without affected nodes,
155
155
  ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Waiting for snapshot');
156
156
  // The second, with corresponding for "waiting-for-snapshot" status message followed with affected nodes,
157
- ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Waiting for snapshot from node http://pc-desktop:7200');
157
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Waiting for snapshot from node http://pc...');
158
158
  // The third, without message,
159
159
  ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
160
160
  });
@@ -176,7 +176,7 @@ describe('Cluster management', () => {
176
176
  // The first, with corresponding for "building-snapshot" status message without affected nodes,
177
177
  ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Building a snapshot');
178
178
  // The second, with corresponding for "building-snapshot" status message followed with affected nodes,
179
- ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Building a snapshot for http://pc-desktop:7200, http://pc-desktop:7204');
179
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Building a snapshot for http://pc-deskto...');
180
180
  // The third, without message,
181
181
  ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
182
182
  });
@@ -198,7 +198,7 @@ describe('Cluster management', () => {
198
198
  // The first, with corresponding for "sending-snapshot" status message without affected nodes,
199
199
  ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Sending a snapshot');
200
200
  // The second, with corresponding for "sending-snapshot" status message followed with affected nodes,
201
- ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Sending a snapshot to node http://pc-desktop:7200');
201
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Sending a snapshot to node http://pc-des...');
202
202
  // The third, without message,
203
203
  ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
204
204
  });
@@ -220,7 +220,7 @@ describe('Cluster management', () => {
220
220
  // The first, with corresponding for "receiving-snapshot" status message without affected nodes,
221
221
  ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Receiving a snapshot');
222
222
  // The second, with corresponding for "receiving-snapshot" status message followed with affected nodes,
223
- ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Receiving a snapshot from node http://pc-desktop:7200');
223
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Receiving a snapshot from node http://pc...');
224
224
  // The third, without message,
225
225
  ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
226
226
  });
@@ -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)
@@ -1,9 +1,10 @@
1
1
  import {SparqlEditorSteps} from "../../steps/sparql-editor-steps";
2
2
  import {TabContextMenu, YasguiSteps} from "../../steps/yasgui/yasgui-steps";
3
3
  import {YasqeSteps} from "../../steps/yasgui/yasqe-steps";
4
- import {YasrSteps} from "../../steps/yasgui/yasr-steps";
5
4
  import {ConfirmationDialogSteps} from "../../steps/yasgui/confirmation-dialog-steps";
6
5
  import {QueryStubs} from "../../stubs/yasgui/query-stubs";
6
+ import {MainMenuSteps} from "../../steps/main-menu-steps";
7
+ import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
7
8
 
8
9
  describe('Yasgui tabs', () => {
9
10
 
@@ -97,6 +98,19 @@ describe('Yasgui tabs', () => {
97
98
  YasguiSteps.getTabs().should('have.length', 1);
98
99
  YasguiSteps.getCurrentTabTitle().should('have.text', 'Unnamed 1');
99
100
  });
101
+
102
+ it('Should display information about ongoing requests if try to navigate to other page when there is a tab with ongoing request', () => {
103
+ // When I execute a long-running query,
104
+ QueryStubs.stubLongRunningQuery(repositoryId);
105
+ SparqlEditorSteps.visitSparqlEditorPage();
106
+ YasqeSteps.executeQueryWithoutWaiteResult();
107
+ // and try to navigate to other page.
108
+ MainMenuSteps.clickOnMenuImport();
109
+
110
+ // Then I expect to see confirm dialog that explain me about ongoing query.
111
+ ModalDialogSteps.getDialog().should('be.visible');
112
+ ModalDialogSteps.getDialogBody().contains('You have running 1 query, that will be aborted.');
113
+ });
100
114
  });
101
115
 
102
116
  function openNewTab(expectedTabsCount) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.7.0-TR1",
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-TR1",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.7.0-TR1",
3
+ "version": "2.7.0-TR3",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",
@@ -9,6 +9,6 @@ export class ClusterViewSteps {
9
9
  }
10
10
 
11
11
  static getNodeInfoText(host) {
12
- return ClusterViewSteps.getNode(host).find('.node-info-text');
12
+ return ClusterViewSteps.getNode(host).find('.node-info-fo');
13
13
  }
14
14
  }
@@ -1,5 +1,9 @@
1
1
  class HomeSteps {
2
2
 
3
+ static visit() {
4
+ cy.visit('/');
5
+ }
6
+
3
7
  static visitAndWaitLoader(stubNewWindow) {
4
8
  if (stubNewWindow) {
5
9
  cy.visit('/', {
@@ -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')
@@ -14,6 +14,10 @@ export class QueryStubs {
14
14
  QueryStubs.stubQueryResponse(repositoryId, '/graphql-editor/default-query-response.json', withDelay);
15
15
  }
16
16
 
17
+ static stubLongRunningQuery(repositoryId, delay = 3000) {
18
+ QueryStubs.stubQueryResponse(repositoryId, '/graphql-editor/default-query-response.json', delay);
19
+ }
20
+
17
21
  static stubEmptyQueryResponse(repositoryId, withDelay = 0) {
18
22
  QueryStubs.stubQueryResponse(repositoryId, '/queries/empty-query-response.json', withDelay);
19
23
  }