graphdb-workbench-tests 2.5.0-TR6 → 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,41 @@
1
+ [
2
+ {
3
+ "address": "pc-desktop:7300",
4
+ "nodeState": "FOLLOWER",
5
+ "term": 2,
6
+ "syncStatus": {},
7
+ "lastLogTerm": 0,
8
+ "lastLogIndex": 0,
9
+ "endpoint": "http://pc-desktop:7200",
10
+ "recoveryStatus": {
11
+ "affectedNodes": [],
12
+ "state": "BUILDING_SNAPSHOT"
13
+ }
14
+ },
15
+ {
16
+ "address": "pc-desktop:7301",
17
+ "nodeState": "LEADER",
18
+ "term": 2,
19
+ "syncStatus": {
20
+ "pc-desktop:7300": "IN_SYNC",
21
+ "pc-desktop:7302": "IN_SYNC"
22
+ },
23
+ "lastLogTerm": 0,
24
+ "lastLogIndex": 0,
25
+ "endpoint": "http://pc-desktop:7201",
26
+ "recoveryStatus": {
27
+ "affectedNodes": ["http://pc-desktop:7200", "http://pc-desktop:7204"],
28
+ "state": "BUILDING_SNAPSHOT"
29
+ }
30
+ },
31
+ {
32
+ "address": "pc-desktop:7302",
33
+ "nodeState": "FOLLOWER",
34
+ "term": 2,
35
+ "syncStatus": {},
36
+ "lastLogTerm": 0,
37
+ "lastLogIndex": 0,
38
+ "endpoint": "http://pc-desktop:7202",
39
+ "recoveryStatus": {}
40
+ }
41
+ ]
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "address": "pc-desktop:7300",
4
+ "nodeState": "FOLLOWER",
5
+ "term": 2,
6
+ "syncStatus": {},
7
+ "lastLogTerm": 0,
8
+ "lastLogIndex": 0,
9
+ "endpoint": "http://pc-desktop:7200",
10
+ "recoveryStatus": {
11
+ "affectedNodes": [],
12
+ "state": "RECEIVING_SNAPSHOT"
13
+ }
14
+ },
15
+ {
16
+ "address": "pc-desktop:7301",
17
+ "nodeState": "LEADER",
18
+ "term": 2,
19
+ "syncStatus": {
20
+ "pc-desktop:7300": "IN_SYNC",
21
+ "pc-desktop:7302": "IN_SYNC"
22
+ },
23
+ "lastLogTerm": 0,
24
+ "lastLogIndex": 0,
25
+ "endpoint": "http://pc-desktop:7201",
26
+ "recoveryStatus": {
27
+ "affectedNodes": ["http://pc-desktop:7200"],
28
+ "state": "RECEIVING_SNAPSHOT"
29
+ }
30
+ },
31
+ {
32
+ "address": "pc-desktop:7302",
33
+ "nodeState": "FOLLOWER",
34
+ "term": 2,
35
+ "syncStatus": {},
36
+ "lastLogTerm": 0,
37
+ "lastLogIndex": 0,
38
+ "endpoint": "http://pc-desktop:7202",
39
+ "recoveryStatus": {}
40
+ }
41
+ ]
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "address": "pc-desktop:7300",
4
+ "nodeState": "FOLLOWER",
5
+ "term": 2,
6
+ "syncStatus": {},
7
+ "lastLogTerm": 0,
8
+ "lastLogIndex": 0,
9
+ "endpoint": "http://pc-desktop:7200",
10
+ "recoveryStatus": {
11
+ "affectedNodes": [],
12
+ "state": "SENDING_SNAPSHOT"
13
+ }
14
+ },
15
+ {
16
+ "address": "pc-desktop:7301",
17
+ "nodeState": "LEADER",
18
+ "term": 2,
19
+ "syncStatus": {
20
+ "pc-desktop:7300": "IN_SYNC",
21
+ "pc-desktop:7302": "IN_SYNC"
22
+ },
23
+ "lastLogTerm": 0,
24
+ "lastLogIndex": 0,
25
+ "endpoint": "http://pc-desktop:7201",
26
+ "recoveryStatus": {
27
+ "affectedNodes": ["http://pc-desktop:7200"],
28
+ "state": "SENDING_SNAPSHOT"
29
+ }
30
+ },
31
+ {
32
+ "address": "pc-desktop:7302",
33
+ "nodeState": "FOLLOWER",
34
+ "term": 2,
35
+ "syncStatus": {},
36
+ "lastLogTerm": 0,
37
+ "lastLogIndex": 0,
38
+ "endpoint": "http://pc-desktop:7202",
39
+ "recoveryStatus": {}
40
+ }
41
+ ]
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "address": "pc-desktop:7300",
4
+ "nodeState": "FOLLOWER",
5
+ "term": 2,
6
+ "syncStatus": {},
7
+ "lastLogTerm": 0,
8
+ "lastLogIndex": 0,
9
+ "endpoint": "http://pc-desktop:7200",
10
+ "recoveryStatus": {
11
+ "affectedNodes": [],
12
+ "state": "WAITING_FOR_SNAPSHOT"
13
+ }
14
+ },
15
+ {
16
+ "address": "pc-desktop:7301",
17
+ "nodeState": "LEADER",
18
+ "term": 2,
19
+ "syncStatus": {
20
+ "pc-desktop:7300": "IN_SYNC",
21
+ "pc-desktop:7302": "IN_SYNC"
22
+ },
23
+ "lastLogTerm": 0,
24
+ "lastLogIndex": 0,
25
+ "endpoint": "http://pc-desktop:7201",
26
+ "recoveryStatus": {
27
+ "affectedNodes": ["http://pc-desktop:7200"],
28
+ "state": "WAITING_FOR_SNAPSHOT"
29
+ }
30
+ },
31
+ {
32
+ "address": "pc-desktop:7302",
33
+ "nodeState": "FOLLOWER",
34
+ "term": 2,
35
+ "syncStatus": {},
36
+ "lastLogTerm": 0,
37
+ "lastLogIndex": 0,
38
+ "endpoint": "http://pc-desktop:7202",
39
+ "recoveryStatus": {}
40
+ }
41
+ ]
@@ -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
+ }
@@ -30,10 +30,14 @@
30
30
  "recovery_state": {
31
31
  "searching_for_node": "Searching for node",
32
32
  "applying_snapshot": "Applying a snapshot",
33
- "building_snapshot": "Building a snapshot for {{node}}",
34
- "waiting_for_snapshot": "Waiting for snapshot from node {{node}}",
35
- "sending_snapshot": "Sending a snapshot to node {{node}}",
36
- "receiving_snapshot": "Receiving a snapshot from node {{node}}"
33
+ "building_snapshot": "Building a snapshot",
34
+ "building_snapshot_with_affected_node": "Building a snapshot for {{node}}",
35
+ "waiting_for_snapshot": "Waiting for snapshot",
36
+ "waiting_for_snapshot_with_affected_node": "Waiting for snapshot from node {{node}}",
37
+ "sending_snapshot": "Sending a snapshot",
38
+ "sending_snapshot_with_affected_node": "Sending a snapshot to node {{node}}",
39
+ "receiving_snapshot": "Receiving a snapshot",
40
+ "receiving_snapshot_with_affected_node": "Receiving a snapshot from node {{node}}"
37
41
  }
38
42
  },
39
43
  "cluster_configuration": {
@@ -830,6 +834,7 @@
830
834
  "import.label.bnodes": "BNodes",
831
835
  "import.label.datatype": "Datatype",
832
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.",
833
838
  "import.alert.not.valid.iri": "Not a valid IRI!",
834
839
  "import.target.graphs": "Target graphs",
835
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.",
@@ -915,6 +920,7 @@
915
920
  "import.last.import.settings": "Last import settings",
916
921
  "import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
917
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",
918
924
  "text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
919
925
  "url.import.input.placeholder": "Data URL",
920
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
  }
@@ -7,6 +7,7 @@ import {RemoteLocationStubs} from "../../stubs/cluster/remote-location-stubs";
7
7
  import {DeleteClusterDialogSteps} from "../../steps/cluster/delete-cluster-dialog-steps";
8
8
  import {ReplaceNodesDialogSteps} from "../../steps/cluster/replace-nodes-dialog-steps";
9
9
  import {ApplicationSteps} from "../../steps/application-steps";
10
+ import {ClusterViewSteps} from "../../steps/cluster/cluster-view-steps";
10
11
 
11
12
  describe('Cluster management', () => {
12
13
 
@@ -136,6 +137,94 @@ describe('Cluster management', () => {
136
137
  ClusterPageSteps.getCreateClusterButton().should('have.class', 'no-cluster');
137
138
  });
138
139
 
140
+ it('Should be display correct message for "waiting-for-snapshot" recovery state', () => {
141
+ // Given I have opened the cluster management page
142
+ ClusterPageSteps.visit();
143
+
144
+ // Given there is an existing cluster created
145
+ ClusterStubs.stubClusterConfig();
146
+ // and two nodes have a "waiting-for-snapshot" recovery status. One of them is without an affected node.
147
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('waiting-for-snapshot');
148
+ ClusterStubs.stubClusterNodeStatus();
149
+ RemoteLocationStubs.stubRemoteLocationFilter();
150
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
151
+
152
+ // Then I expect to see cluster view with 3 nodes,
153
+ ClusterViewSteps.getNodes().should('have.length', 3);
154
+ // The first, with corresponding for "waiting-for-snapshot" status message without affected nodes,
155
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Waiting for snapshot');
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');
158
+ // The third, without message,
159
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
160
+ });
161
+
162
+ it('Should be display correct message for "building-snapshot" recovery state', () => {
163
+ // Given I have opened the cluster management page
164
+ ClusterPageSteps.visit();
165
+
166
+ // Given there is an existing cluster created
167
+ ClusterStubs.stubClusterConfig();
168
+ // and two nodes have a "building-snapshot" recovery status. One of them is without an affected node.
169
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('building-snapshot');
170
+ ClusterStubs.stubClusterNodeStatus();
171
+ RemoteLocationStubs.stubRemoteLocationFilter();
172
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
173
+
174
+ // Then I expect to see cluster view with 3 nodes,
175
+ ClusterViewSteps.getNodes().should('have.length', 3);
176
+ // The first, with corresponding for "building-snapshot" status message without affected nodes,
177
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Building a snapshot');
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');
180
+ // The third, without message,
181
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
182
+ });
183
+
184
+ it('Should be display correct message for "sending-snapshot" recovery state', () => {
185
+ // Given I have opened the cluster management page
186
+ ClusterPageSteps.visit();
187
+
188
+ // Given there is an existing cluster created
189
+ ClusterStubs.stubClusterConfig();
190
+ // and two nodes have a "sending-snapshot" recovery status. One of them is without an affected node.
191
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('sending-snapshot');
192
+ ClusterStubs.stubClusterNodeStatus();
193
+ RemoteLocationStubs.stubRemoteLocationFilter();
194
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
195
+
196
+ // Then I expect to see cluster view with 3 nodes,
197
+ ClusterViewSteps.getNodes().should('have.length', 3);
198
+ // The first, with corresponding for "sending-snapshot" status message without affected nodes,
199
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Sending a snapshot');
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');
202
+ // The third, without message,
203
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
204
+ });
205
+
206
+ it('Should be display correct message for "receiving-snapshot" recovery state', () => {
207
+ // Given I have opened the cluster management page
208
+ ClusterPageSteps.visit();
209
+
210
+ // Given there is an existing cluster created
211
+ ClusterStubs.stubClusterConfig();
212
+ // and two nodes have a "receiving-snapshot" recovery status. One of them is without an affected node.
213
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('receiving-snapshot');
214
+ ClusterStubs.stubClusterNodeStatus();
215
+ RemoteLocationStubs.stubRemoteLocationFilter();
216
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
217
+
218
+ // Then I expect to see cluster view with 3 nodes,
219
+ ClusterViewSteps.getNodes().should('have.length', 3);
220
+ // The first, with corresponding for "receiving-snapshot" status message without affected nodes,
221
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Receiving a snapshot');
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');
224
+ // The third, without message,
225
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
226
+ });
227
+
139
228
  it('Should be able to replace nodes in cluster', () => {
140
229
  // Given I have opened the cluster management page
141
230
  RemoteLocationStubs.stubGetRemoteLocations();
@@ -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-TR6",
3
+ "version": "2.6.0-TR1",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -0,0 +1,14 @@
1
+ export class ClusterViewSteps {
2
+
3
+ static getNodes() {
4
+ return cy.get('.id-host-background').parent().parent();
5
+ }
6
+
7
+ static getNode(host) {
8
+ return ClusterViewSteps.getNodes().contains(host).parent().parent();
9
+ }
10
+
11
+ static getNodeInfoText(host) {
12
+ return ClusterViewSteps.getNode(host).find('.node-info-text');
13
+ }
14
+ }
@@ -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')
@@ -15,6 +15,13 @@ export class ClusterStubs extends Stubs {
15
15
  }).as('3-nodes-cluster-group-status');
16
16
  }
17
17
 
18
+ static stubClusterWithRecoveryStatusGroupStatus(recoveryStatus) {
19
+ cy.intercept('/rest/cluster/group/status', {
20
+ fixture: `/cluster/3-nodes-cluster-group-status-${recoveryStatus}`,
21
+ statusCode: 200
22
+ }).as('3-nodes-cluster-group-status');
23
+ }
24
+
18
25
  static stubNoClusterNodeStatus() {
19
26
  cy.intercept('/rest/cluster/node/status', {
20
27
  fixture: '/cluster/no-cluster-node-status.json',