graphdb-workbench-tests 2.5.0-TR6 → 2.5.0

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
+ ]
@@ -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": {
@@ -7,8 +7,10 @@ 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
- describe('Cluster management', () => {
12
+ // TODO: removed for GDB10.5 version due to instability of the cluster in the backend
13
+ describe.skip('Cluster management', () => {
12
14
 
13
15
  let repositoryId;
14
16
 
@@ -136,6 +138,94 @@ describe('Cluster management', () => {
136
138
  ClusterPageSteps.getCreateClusterButton().should('have.class', 'no-cluster');
137
139
  });
138
140
 
141
+ it('Should be display correct message for "waiting-for-snapshot" recovery state', () => {
142
+ // Given I have opened the cluster management page
143
+ ClusterPageSteps.visit();
144
+
145
+ // Given there is an existing cluster created
146
+ ClusterStubs.stubClusterConfig();
147
+ // and two nodes have a "waiting-for-snapshot" recovery status. One of them is without an affected node.
148
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('waiting-for-snapshot');
149
+ ClusterStubs.stubClusterNodeStatus();
150
+ RemoteLocationStubs.stubRemoteLocationFilter();
151
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
152
+
153
+ // Then I expect to see cluster view with 3 nodes,
154
+ ClusterViewSteps.getNodes().should('have.length', 3);
155
+ // The first, with corresponding for "waiting-for-snapshot" status message without affected nodes,
156
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Waiting for snapshot');
157
+ // The second, with corresponding for "waiting-for-snapshot" status message followed with affected nodes,
158
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Waiting for snapshot from node http://pc-desktop:7200');
159
+ // The third, without message,
160
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
161
+ });
162
+
163
+ it('Should be display correct message for "building-snapshot" recovery state', () => {
164
+ // Given I have opened the cluster management page
165
+ ClusterPageSteps.visit();
166
+
167
+ // Given there is an existing cluster created
168
+ ClusterStubs.stubClusterConfig();
169
+ // and two nodes have a "building-snapshot" recovery status. One of them is without an affected node.
170
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('building-snapshot');
171
+ ClusterStubs.stubClusterNodeStatus();
172
+ RemoteLocationStubs.stubRemoteLocationFilter();
173
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
174
+
175
+ // Then I expect to see cluster view with 3 nodes,
176
+ ClusterViewSteps.getNodes().should('have.length', 3);
177
+ // The first, with corresponding for "building-snapshot" status message without affected nodes,
178
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Building a snapshot');
179
+ // The second, with corresponding for "building-snapshot" status message followed with affected nodes,
180
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Building a snapshot for http://pc-desktop:7200, http://pc-desktop:7204');
181
+ // The third, without message,
182
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
183
+ });
184
+
185
+ it('Should be display correct message for "sending-snapshot" recovery state', () => {
186
+ // Given I have opened the cluster management page
187
+ ClusterPageSteps.visit();
188
+
189
+ // Given there is an existing cluster created
190
+ ClusterStubs.stubClusterConfig();
191
+ // and two nodes have a "sending-snapshot" recovery status. One of them is without an affected node.
192
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('sending-snapshot');
193
+ ClusterStubs.stubClusterNodeStatus();
194
+ RemoteLocationStubs.stubRemoteLocationFilter();
195
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
196
+
197
+ // Then I expect to see cluster view with 3 nodes,
198
+ ClusterViewSteps.getNodes().should('have.length', 3);
199
+ // The first, with corresponding for "sending-snapshot" status message without affected nodes,
200
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Sending a snapshot');
201
+ // The second, with corresponding for "sending-snapshot" status message followed with affected nodes,
202
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Sending a snapshot to node http://pc-desktop:7200');
203
+ // The third, without message,
204
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
205
+ });
206
+
207
+ it('Should be display correct message for "receiving-snapshot" recovery state', () => {
208
+ // Given I have opened the cluster management page
209
+ ClusterPageSteps.visit();
210
+
211
+ // Given there is an existing cluster created
212
+ ClusterStubs.stubClusterConfig();
213
+ // and two nodes have a "receiving-snapshot" recovery status. One of them is without an affected node.
214
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('receiving-snapshot');
215
+ ClusterStubs.stubClusterNodeStatus();
216
+ RemoteLocationStubs.stubRemoteLocationFilter();
217
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
218
+
219
+ // Then I expect to see cluster view with 3 nodes,
220
+ ClusterViewSteps.getNodes().should('have.length', 3);
221
+ // The first, with corresponding for "receiving-snapshot" status message without affected nodes,
222
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Receiving a snapshot');
223
+ // The second, with corresponding for "receiving-snapshot" status message followed with affected nodes,
224
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Receiving a snapshot from node http://pc-desktop:7200');
225
+ // The third, without message,
226
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
227
+ });
228
+
139
229
  it('Should be able to replace nodes in cluster', () => {
140
230
  // Given I have opened the cluster management page
141
231
  RemoteLocationStubs.stubGetRemoteLocations();
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.5.0",
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
+ }
@@ -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',