graphdb-workbench-tests 2.4.2 → 2.5.0-RC2

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.
Files changed (41) hide show
  1. package/Dockerfile +1 -1
  2. package/fixtures/cluster/3-nodes-cluster-created.json +5 -0
  3. package/fixtures/cluster/3-nodes-cluster-group-status-building-snapshot.json +41 -0
  4. package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +41 -0
  5. package/fixtures/cluster/3-nodes-cluster-group-status-sending-snapshot.json +41 -0
  6. package/fixtures/cluster/3-nodes-cluster-group-status-waiting-for-snapshot.json +41 -0
  7. package/fixtures/cluster/3-nodes-cluster-group-status.json +35 -0
  8. package/fixtures/cluster/cluster-config.json +13 -0
  9. package/fixtures/cluster/cluster-node-status.json +10 -0
  10. package/fixtures/cluster/delete-cluster.json +5 -0
  11. package/fixtures/cluster/no-cluster-group-status.json +12 -0
  12. package/fixtures/cluster/no-cluster-node-status.json +10 -0
  13. package/fixtures/cluster/replace-nodes.json +1 -0
  14. package/fixtures/locale-en.json +18 -19
  15. package/fixtures/monitoring/no-operations.json +1 -0
  16. package/fixtures/remote-location/add-remote-location +1 -0
  17. package/fixtures/remote-location/get-0-remote-locations.json +15 -0
  18. package/fixtures/remote-location/get-1-remote-locations.json +28 -0
  19. package/fixtures/remote-location/get-2-remote-locations.json +41 -0
  20. package/fixtures/remote-location/get-3-remote-locations.json +54 -0
  21. package/fixtures/remote-location/get-no-remote-locations.json +1 -0
  22. package/fixtures/remote-location/remote-location-check +1 -0
  23. package/fixtures/remote-location/remote-location-status-in-cluster.json +13 -0
  24. package/fixtures/remote-location/remote-location-status-not-in-cluster.json +13 -0
  25. package/fixtures/remote-location/remote-locations-filter.json +15 -0
  26. package/integration/cluster/cluster-management.spec.js +286 -0
  27. package/integration/explore/class.hierarchy.spec.js +1 -1
  28. package/integration/explore/visual.graph.spec.js +1 -3
  29. package/integration/monitor/monitor.resources.spec.js +1 -1
  30. package/integration/sparql/sparql.menu.spec.js +2 -2
  31. package/integration-flaky/explore/visual.graph.spec.js +6 -5
  32. package/package.json +2 -2
  33. package/steps/cluster/add-remote-location-dialog-steps.js +11 -0
  34. package/steps/cluster/cluster-page-steps.js +57 -0
  35. package/steps/cluster/cluster-view-steps.js +14 -0
  36. package/steps/cluster/create-cluster-dialog-steps.js +39 -0
  37. package/steps/cluster/delete-cluster-dialog-steps.js +11 -0
  38. package/steps/cluster/replace-nodes-dialog-steps.js +39 -0
  39. package/stubs/cluster/cluster-stubs.js +74 -0
  40. package/stubs/cluster/remote-location-stubs.js +52 -0
  41. package/stubs/global-operations-statuses-stub.js +7 -0
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM cypress/base:12
1
+ FROM cypress/base:16.18.1
2
2
 
3
3
  COPY . /workbench/tests-cypress/
4
4
 
@@ -0,0 +1,5 @@
1
+ {
2
+ "pc-desktop:7300": "Cluster was successfully created.",
3
+ "pc-desktop:7301": "Cluster was successfully created.",
4
+ "pc-desktop:7302": "Cluster was successfully created."
5
+ }
@@ -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,35 @@
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
+ },
12
+ {
13
+ "address": "pc-desktop:7301",
14
+ "nodeState": "LEADER",
15
+ "term": 2,
16
+ "syncStatus": {
17
+ "pc-desktop:7300": "IN_SYNC",
18
+ "pc-desktop:7302": "IN_SYNC"
19
+ },
20
+ "lastLogTerm": 0,
21
+ "lastLogIndex": 0,
22
+ "endpoint": "http://pc-desktop:7201",
23
+ "recoveryStatus": {}
24
+ },
25
+ {
26
+ "address": "pc-desktop:7302",
27
+ "nodeState": "FOLLOWER",
28
+ "term": 2,
29
+ "syncStatus": {},
30
+ "lastLogTerm": 0,
31
+ "lastLogIndex": 0,
32
+ "endpoint": "http://pc-desktop:7202",
33
+ "recoveryStatus": {}
34
+ }
35
+ ]
@@ -0,0 +1,13 @@
1
+ {
2
+ "electionMinTimeout": 8000,
3
+ "electionRangeTimeout": 6000,
4
+ "heartbeatInterval": 2000,
5
+ "messageSizeKB": 64,
6
+ "verificationTimeout": 1500,
7
+ "transactionLogMaximumSizeGB": 50.0,
8
+ "nodes": [
9
+ "pc-desktop:7302",
10
+ "pc-desktop:7300",
11
+ "pc-desktop:7301"
12
+ ]
13
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "address": "pc-desktop:7300",
3
+ "nodeState": "FOLLOWER",
4
+ "term": 1,
5
+ "syncStatus": {},
6
+ "lastLogTerm": 0,
7
+ "lastLogIndex": 0,
8
+ "endpoint": "http://pc-desktop:7200",
9
+ "recoveryStatus": {}
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "pc-desktop:7300": "Cluster was deleted on this node.",
3
+ "pc-desktop:7301": "Cluster was deleted on this node.",
4
+ "pc-desktop:7302": "Cluster was deleted on this node."
5
+ }
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "address": "pc-desktop:7300",
4
+ "nodeState": "NO_CLUSTER",
5
+ "term": 0,
6
+ "syncStatus": {},
7
+ "lastLogTerm": 0,
8
+ "lastLogIndex": 0,
9
+ "endpoint": "http://pc-desktop:7200",
10
+ "recoveryStatus": {}
11
+ }
12
+ ]
@@ -0,0 +1,10 @@
1
+ {
2
+ "address": "pc-desktop:7300",
3
+ "nodeState": "NO_CLUSTER",
4
+ "term": 0,
5
+ "syncStatus": {},
6
+ "lastLogTerm": 0,
7
+ "lastLogIndex": 0,
8
+ "endpoint": "http://pc-desktop:7200",
9
+ "recoveryStatus": {}
10
+ }
@@ -0,0 +1 @@
1
+ {}
@@ -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": {
@@ -168,7 +172,8 @@
168
172
  },
169
173
  "errors": {
170
174
  "loading_rules": "Error during ACL rules",
171
- "updating_rules": "Error during ACL rules update"
175
+ "updating_rules": "Error during ACL rules update",
176
+ "duplicated_rules": "Every ACL rule should be unique."
172
177
  }
173
178
  },
174
179
  "config.name.label": "Config name",
@@ -926,10 +931,9 @@
926
931
  "core.errors.fedx.repository.warning.msg": " view is not supported by FedX Repository.",
927
932
  "core.errors.select.repository.warning.msg": "Click one of the repositories below to connect to it",
928
933
  "core.errors.or.create.repository.warning.msg": " or create a new repository",
929
- "core.errors.no.accessible.warning.msg": "There are no accessible ",
930
- "core.errors.writable": "writable ",
931
- "core.errors.repositories": "repositories",
932
- "core.errors.create.repository.warning.msg": ". You can create a new repository",
934
+ "core.errors.no.accessible.repositories.warning.msg": "There are no accessible repositories.",
935
+ "core.errors.no.accessible.writable.repositories.warning.msg": "There are no accessible writable repositories.",
936
+ "core.errors.create.repository.warning.msg": " You can create a new repository",
933
937
  "core.errors.show.remote.locations.btn": "Show remote locations",
934
938
  "core.errors.hide.remote.locations.btn": "Hide remote locations",
935
939
  "core.errors.location.local.label": "Local",
@@ -1187,6 +1191,7 @@
1187
1191
  "repo.properties": "Repository properties",
1188
1192
  "repo.id.label": "Repository ID*",
1189
1193
  "edit.repo.id.tooltip": "Edit repository id",
1194
+ "edit.repo.id.cannot_edit_in_cluster.tooltip": "Cannot rename repository while in cluster.",
1190
1195
  "invalid.repo.name.error": "Repository name can contain only letters (a-z, A-Z), numbers (0-9), \"-\" and \"_\"",
1191
1196
  "upload.custom.ruleset.file": "Upload a custom ruleset file.",
1192
1197
  "custom.ruleset": "Custom ruleset...",
@@ -1705,6 +1710,7 @@
1705
1710
  "target.label": "Target",
1706
1711
  "show.blank.nodes.label": "Show Blank Nodes",
1707
1712
  "download.as.label": "Download as",
1713
+ "download.as.progress.msg": "Downloading SPARQL result",
1708
1714
  "visual.graph.label": "Visual graph",
1709
1715
  "explore.graph.visually.popover": "Click to explore the graph visually",
1710
1716
  "pred.label": "Predicate",
@@ -1915,20 +1921,13 @@
1915
1921
  "ttyg.settings.topk.tooltip": "Number of results returned to the chat bot when it requests more information. More results will provide more information but they may also introduce noise.",
1916
1922
  "ttyg.settings.echo.vector.query": "Echo vector query",
1917
1923
  "ttyg.settings.echo.vector.query.tooltip": "If enabled the bot will use the generated queries as feedback to the GPT API.",
1918
- "global.operations_statuses.queries.title": "Running query",
1919
- "global.operations_statuses.queries.title.plural": "Running queries",
1920
- "global.operations_statuses.updates.title": "Running update",
1921
- "global.operations_statuses.updates.title.plural": "Running updates",
1922
- "global.operations_statuses.imports.title": "Running import",
1923
- "global.operations_statuses.imports.title.plural": "Running imports",
1924
+ "global.operations_statuses.queries.title": "Running queries",
1925
+ "global.operations_statuses.updates.title": "Running updates",
1926
+ "global.operations_statuses.imports.title": "Running imports",
1924
1927
  "global.operations_statuses.CREATE_BACKUP_IN_PROGRESS.title": "Creating backup",
1925
- "global.operations_statuses.CREATE_BACKUP_IN_PROGRESS.title.plural": "Creating backups",
1926
1928
  "global.operations_statuses.RESTORE_BACKUP_IN_PROGRESS.title": "Restoring backup",
1927
- "global.operations_statuses.RESTORE_BACKUP_IN_PROGRESS.title.plural": "Restoring backups",
1928
1929
  "global.operations_statuses.CREATE_CLOUD_BACKUP_IN_PROGRESS.title": "Creating cloud backup",
1929
- "global.operations_statuses.CREATE_CLOUD_BACKUP_IN_PROGRESS.title.plural": "Creating cloud backups",
1930
1930
  "global.operations_statuses.RESTORE_CLOUD_BACKUP_IN_PROGRESS.title": "Restoring cloud backup",
1931
- "global.operations_statuses.RESTORE_CLOUD_BACKUP_IN_PROGRESS.title.plural": "Restoring cloud backups",
1932
1931
  "global.operations_statuses.IN_SYNC.title": "In sync",
1933
1932
  "global.operations_statuses.RECOVERING.title": "Recovering",
1934
1933
  "global.operations_statuses.OUT_OF_SYNC.title": "Out of sync",
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1 @@
1
+ Successfully connected new GraphDB location.
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "uri": "",
4
+ "label": "Local",
5
+ "username": null,
6
+ "password": null,
7
+ "authType": "none",
8
+ "active": true,
9
+ "local": true,
10
+ "system": true,
11
+ "errorMsg": null,
12
+ "defaultRepository": null,
13
+ "isInCluster": false
14
+ }
15
+ ]
@@ -0,0 +1,28 @@
1
+ [
2
+ {
3
+ "uri": "",
4
+ "label": "Local",
5
+ "username": null,
6
+ "password": null,
7
+ "authType": "none",
8
+ "active": true,
9
+ "local": true,
10
+ "system": true,
11
+ "errorMsg": null,
12
+ "defaultRepository": null,
13
+ "isInCluster": false
14
+ },
15
+ {
16
+ "uri": "http://localhost:7201",
17
+ "label": "Remote (http://localhost:7201)",
18
+ "username": "",
19
+ "password": "",
20
+ "authType": "signature",
21
+ "active": false,
22
+ "local": false,
23
+ "system": false,
24
+ "errorMsg": null,
25
+ "defaultRepository": null,
26
+ "isInCluster": false
27
+ }
28
+ ]
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "uri": "",
4
+ "label": "Local",
5
+ "username": null,
6
+ "password": null,
7
+ "authType": "none",
8
+ "active": true,
9
+ "local": true,
10
+ "system": true,
11
+ "errorMsg": null,
12
+ "defaultRepository": null,
13
+ "isInCluster": false
14
+ },
15
+ {
16
+ "uri": "http://localhost:7201",
17
+ "label": "Remote (http://localhost:7201)",
18
+ "username": "",
19
+ "password": "",
20
+ "authType": "signature",
21
+ "active": false,
22
+ "local": false,
23
+ "system": false,
24
+ "errorMsg": null,
25
+ "defaultRepository": null,
26
+ "isInCluster": false
27
+ },
28
+ {
29
+ "uri": "http://localhost:7202",
30
+ "label": "Remote (http://localhost:7202)",
31
+ "username": "",
32
+ "password": "",
33
+ "authType": "signature",
34
+ "active": false,
35
+ "local": false,
36
+ "system": false,
37
+ "errorMsg": null,
38
+ "defaultRepository": null,
39
+ "isInCluster": false
40
+ }
41
+ ]
@@ -0,0 +1,54 @@
1
+ [
2
+ {
3
+ "uri": "",
4
+ "label": "Local",
5
+ "username": null,
6
+ "password": null,
7
+ "authType": "none",
8
+ "active": true,
9
+ "local": true,
10
+ "system": true,
11
+ "errorMsg": null,
12
+ "defaultRepository": null,
13
+ "isInCluster": true
14
+ },
15
+ {
16
+ "uri": "http://localhost:7201",
17
+ "label": "Remote (http://localhost:7201)",
18
+ "username": "",
19
+ "password": "",
20
+ "authType": "signature",
21
+ "active": false,
22
+ "local": false,
23
+ "system": false,
24
+ "errorMsg": null,
25
+ "defaultRepository": null,
26
+ "isInCluster": true
27
+ },
28
+ {
29
+ "uri": "http://localhost:7202",
30
+ "label": "Remote (http://localhost:7202)",
31
+ "username": "",
32
+ "password": "",
33
+ "authType": "signature",
34
+ "active": false,
35
+ "local": false,
36
+ "system": false,
37
+ "errorMsg": null,
38
+ "defaultRepository": null,
39
+ "isInCluster": true
40
+ },
41
+ {
42
+ "uri": "http://localhost:7203",
43
+ "label": "Remote (http://localhost:7203)",
44
+ "username": "",
45
+ "password": "",
46
+ "authType": "signature",
47
+ "active": false,
48
+ "local": false,
49
+ "system": false,
50
+ "errorMsg": null,
51
+ "defaultRepository": null,
52
+ "isInCluster": false
53
+ }
54
+ ]
@@ -0,0 +1 @@
1
+ pc-desktop:7301
@@ -0,0 +1,13 @@
1
+ {
2
+ "uri": "",
3
+ "label": "Local",
4
+ "username": null,
5
+ "password": null,
6
+ "authType": null,
7
+ "active": true,
8
+ "local": true,
9
+ "system": true,
10
+ "errorMsg": null,
11
+ "defaultRepository": null,
12
+ "isInCluster": true
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "uri": "",
3
+ "label": "Local",
4
+ "username": null,
5
+ "password": null,
6
+ "authType": null,
7
+ "active": true,
8
+ "local": true,
9
+ "system": true,
10
+ "errorMsg": null,
11
+ "defaultRepository": null,
12
+ "isInCluster": false
13
+ }
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "uri": "",
4
+ "label": "Local",
5
+ "username": null,
6
+ "password": null,
7
+ "authType": "none",
8
+ "active": true,
9
+ "local": true,
10
+ "system": true,
11
+ "errorMsg": null,
12
+ "defaultRepository": null,
13
+ "isInCluster": false
14
+ }
15
+ ]
@@ -0,0 +1,286 @@
1
+ import {ClusterPageSteps} from "../../steps/cluster/cluster-page-steps";
2
+ import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-statuses-stub";
3
+ import {ClusterStubs} from "../../stubs/cluster/cluster-stubs";
4
+ import {CreateClusterDialogSteps} from "../../steps/cluster/create-cluster-dialog-steps";
5
+ import {AddRemoteLocationDialogSteps} from "../../steps/cluster/add-remote-location-dialog-steps";
6
+ import {RemoteLocationStubs} from "../../stubs/cluster/remote-location-stubs";
7
+ import {DeleteClusterDialogSteps} from "../../steps/cluster/delete-cluster-dialog-steps";
8
+ import {ReplaceNodesDialogSteps} from "../../steps/cluster/replace-nodes-dialog-steps";
9
+ import {ApplicationSteps} from "../../steps/application-steps";
10
+ import {ClusterViewSteps} from "../../steps/cluster/cluster-view-steps";
11
+
12
+ describe('Cluster management', () => {
13
+
14
+ let repositoryId;
15
+
16
+ beforeEach(() => {
17
+ repositoryId = 'cluster-repo' + Date.now();
18
+ GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
19
+ });
20
+
21
+ it('Should be able to open a create cluster dialog', () => {
22
+ // Given I have opened the cluster management page
23
+ ClusterPageSteps.visit();
24
+
25
+ ClusterStubs.stubNoClusterGroupStatus();
26
+ ClusterStubs.stubNoClusterNodeStatus();
27
+ ClusterStubs.stubNoClusterConfig();
28
+ RemoteLocationStubs.stubAddRemoteLocation();
29
+ RemoteLocationStubs.stubGetRemoteLocations(0);
30
+
31
+ // Then I expect that the page should be loaded
32
+ ClusterPageSteps.getClusterPage().should('be.visible');
33
+ // And the create cluster button to be visible
34
+ ClusterPageSteps.getCreateClusterButton().should('be.visible').and('have.class', 'no-cluster');
35
+ // When I click on the create cluster button
36
+ ClusterPageSteps.createCluster();
37
+ // Then I expect create cluster dialog to become visible
38
+ CreateClusterDialogSteps.getDialog().should('be.visible');
39
+ CreateClusterDialogSteps.getDialogHeader().should('contain.text', 'Create cluster');
40
+ // And I expect to see a single node in the cluster nodes list
41
+ CreateClusterDialogSteps.getClusterNodesList().should('have.length', 1);
42
+ // And I expect to see no remote locations in the locations list
43
+ CreateClusterDialogSteps.getRemoteLocationsList().should('have.length', 0);
44
+ // And I expect that the create cluster button should be disabled
45
+ CreateClusterDialogSteps.getNoSelectedNodesWarning().should('be.visible');
46
+ // And I expect that the create cluster button should be disabled
47
+ CreateClusterDialogSteps.getSaveClusterConfigButton().should('be.disabled');
48
+ // When I click on the cancel button
49
+ CreateClusterDialogSteps.clickOnCancelButton();
50
+ // Then I expect that the create cluster dialog should be closed
51
+ CreateClusterDialogSteps.getDialog().should('not.exist');
52
+ });
53
+
54
+ it('Should be able to create a cluster', () => {
55
+ // Given I have opened the cluster management page
56
+ ClusterPageSteps.visit();
57
+
58
+ // When there is no cluster configured yet
59
+ ClusterStubs.stubNoClusterGroupStatus();
60
+ ClusterStubs.stubNoClusterNodeStatus();
61
+ ClusterStubs.stubNoClusterConfig();
62
+ RemoteLocationStubs.stubAddRemoteLocation();
63
+ RemoteLocationStubs.stubGetRemoteLocations(0);
64
+
65
+ // When I open the create cluster dialog
66
+ ClusterPageSteps.getClusterPage().should('be.visible');
67
+ ClusterPageSteps.createCluster();
68
+ CreateClusterDialogSteps.getDialog().should('be.visible');
69
+ // And I add a remote location
70
+ RemoteLocationStubs.stubRemoteLocationCheck();
71
+ addRemoteLocation('http://localhost:7201', 1);
72
+ CreateClusterDialogSteps.getRemoteLocationsList().should('have.length', 1);
73
+ // When I select the added remote location
74
+ CreateClusterDialogSteps.selectRemoteLocation(0);
75
+ // Then I expect that the remote location will be added to the cluster nodes list
76
+ CreateClusterDialogSteps.getRemoteLocationsList().should('have.length', 0);
77
+ CreateClusterDialogSteps.getClusterNodesList().should('have.length', 2);
78
+ // And the no selected nodes warning should disappear
79
+ CreateClusterDialogSteps.getNoSelectedNodesWarning().should('not.exist');
80
+ // When I add another remote location
81
+ addRemoteLocation('http://localhost:7202', 2);
82
+ // Then I expect it to be added to the cluster nodes list
83
+ CreateClusterDialogSteps.getRemoteLocationsList().should('have.length', 1);
84
+ CreateClusterDialogSteps.selectRemoteLocation(0);
85
+ CreateClusterDialogSteps.getRemoteLocationsList().should('have.length', 0);
86
+ CreateClusterDialogSteps.getClusterNodesList().should('have.length', 3);
87
+ // When I click on create cluster button
88
+ ClusterStubs.stubCreateCluster();
89
+ CreateClusterDialogSteps.saveClusterConfig();
90
+ // Then I expect that the create cluster dialog should be closed
91
+ CreateClusterDialogSteps.getDialog().should('not.exist');
92
+ // And cluster should be created
93
+ ClusterStubs.stubClusterConfig();
94
+ ClusterStubs.stubClusterGroupStatus();
95
+ ClusterStubs.stubClusterNodeStatus();
96
+ RemoteLocationStubs.stubRemoteLocationFilter();
97
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
98
+ // And cluster management actions should be accessible
99
+ ClusterPageSteps.getClusterDeleteButton().should('be.visible');
100
+ ClusterPageSteps.getRemoveNodesButton().should('be.visible');
101
+ ClusterPageSteps.getAddNodesButton().should('be.visible');
102
+ ClusterPageSteps.getReplaceNodesButton().should('be.visible');
103
+ ClusterPageSteps.getPreviewClusterConfigButton().should('be.visible');
104
+ ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
105
+ });
106
+
107
+ it('Should be able to delete cluster', () => {
108
+ // Given I have opened the cluster management page
109
+ ClusterPageSteps.visit();
110
+
111
+ // Given there is an existing cluster created
112
+ ClusterStubs.stubClusterConfig();
113
+ ClusterStubs.stubClusterGroupStatus();
114
+ ClusterStubs.stubClusterNodeStatus();
115
+ RemoteLocationStubs.stubRemoteLocationFilter();
116
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
117
+ ClusterPageSteps.getClusterPage().should('be.visible');
118
+ ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
119
+ // When I click on delete cluster
120
+ ClusterPageSteps.deleteCluster();
121
+ // Then I expect a confirmation dialog to appear
122
+ DeleteClusterDialogSteps.getDialog().should('be.visible');
123
+ // When I confirm
124
+ ClusterStubs.stubDeleteCluster();
125
+ ClusterStubs.stubNoClusterGroupStatus();
126
+ ClusterStubs.stubNoClusterNodeStatus();
127
+ DeleteClusterDialogSteps.confirmDeleteCluster();
128
+ // Then Cluster should be deleted
129
+ ClusterStubs.stubNoClusterConfig();
130
+ RemoteLocationStubs.stubRemoteLocationStatusNotCluster();
131
+ DeleteClusterDialogSteps.getDialog().should('not.exist');
132
+ ClusterPageSteps.getClusterDeleteButton().should('not.exist');
133
+ ClusterPageSteps.getRemoveNodesButton().should('not.exist');
134
+ ClusterPageSteps.getAddNodesButton().should('not.exist');
135
+ ClusterPageSteps.getReplaceNodesButton().should('not.exist');
136
+ ClusterPageSteps.getPreviewClusterConfigButton().should('not.exist');
137
+ ClusterPageSteps.getCreateClusterButton().should('have.class', 'no-cluster');
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
+
228
+ it('Should be able to replace nodes in cluster', () => {
229
+ // Given I have opened the cluster management page
230
+ RemoteLocationStubs.stubGetRemoteLocations();
231
+ ClusterPageSteps.visit();
232
+
233
+ // Given there is an existing cluster created
234
+ ClusterStubs.stubClusterConfig();
235
+ ClusterStubs.stubClusterGroupStatus();
236
+ ClusterStubs.stubClusterNodeStatus();
237
+ RemoteLocationStubs.stubRemoteLocationFilter();
238
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
239
+ ClusterPageSteps.getClusterPage().should('be.visible');
240
+ ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
241
+ // When I click on replace nodes button
242
+ ClusterPageSteps.replaceNodes();
243
+ // Then I expect a replace nodes dialog to appear
244
+ ReplaceNodesDialogSteps.getDialog().should('be.visible');
245
+ ReplaceNodesDialogSteps.getClusterNodes().should('have.length', 3);
246
+ ReplaceNodesDialogSteps.getRemoteLocations().should('have.length', 0);
247
+ ReplaceNodesDialogSteps.getReplaceNodesButton().should('be.disabled');
248
+ // When I add a new remote location
249
+ RemoteLocationStubs.stubAddRemoteLocation();
250
+ RemoteLocationStubs.stubRemoteLocationCheck();
251
+ addRemoteLocation('http://localhost:7203', 3);
252
+ ClusterPageSteps.getClusterPage().should('be.visible');
253
+ ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
254
+ // And I select the new location as replacement node
255
+ ReplaceNodesDialogSteps.selectRemoteLocation(0);
256
+ ReplaceNodesDialogSteps.getSelectedRemoteLocations().should('have.length', 1);
257
+ // And I select a node from the cluster to be replaced
258
+ ReplaceNodesDialogSteps.selectClusterNode(2);
259
+ // Then I expect the replace nodes button to become enabled
260
+ ReplaceNodesDialogSteps.getReplaceNodesButton().should('not.be.disabled');
261
+ // When I click on replace nodes button
262
+ ClusterStubs.stubReplaceNodes();
263
+ ReplaceNodesDialogSteps.replaceNodes();
264
+ // Then I expect nodes to be replaced
265
+ cy.wait('@replace-nodes').then((interception) => {
266
+ expect(interception.request.body).to.deep.equal({
267
+ "addNodes": [
268
+ "pc-desktop:7301\n"
269
+ ],
270
+ "removeNodes": [
271
+ "pc-desktop:7302"
272
+ ]
273
+ });
274
+ });
275
+ ReplaceNodesDialogSteps.getDialog().should('not.exist');
276
+ ApplicationSteps.getSuccessNotifications().should('be.visible');
277
+ });
278
+ });
279
+
280
+ function addRemoteLocation(location, locationsCount) {
281
+ CreateClusterDialogSteps.openAddRemoteLocationDialog();
282
+ AddRemoteLocationDialogSteps.getDialog().should('be.visible');
283
+ AddRemoteLocationDialogSteps.typeLocation(location);
284
+ RemoteLocationStubs.stubGetRemoteLocations(locationsCount);
285
+ AddRemoteLocationDialogSteps.addLocation();
286
+ }
@@ -242,7 +242,7 @@ describe('Class hierarchy screen validation', () => {
242
242
  cy.get(CLASS_LABEL_SELECTOR)
243
243
  .each(($element) => {
244
244
  let data = $element.prop('__data__');
245
- if (data.name === className) {
245
+ if (data.data.name === className) {
246
246
  cy.wrap($element).as('classInHierarchy');
247
247
  }
248
248
  });
@@ -231,9 +231,7 @@ describe('Visual graph screen validation', () => {
231
231
 
232
232
  // Double click on collapsed node
233
233
  // This is ugly but unfortunately I couldn't make cypress's dblclick to work reliably here
234
- getTargetNodeElement().click().then(() => {
235
- getTargetNodeElement().click();
236
- });
234
+ getTargetNodeElement().dblclick()
237
235
 
238
236
  // Verify that all links to the USRegion node are expanded
239
237
  getPredicates().should('have.length', 3);
@@ -63,7 +63,7 @@ describe('Monitor Resources', () => {
63
63
  function verifyCharts(charts) {
64
64
  charts.forEach((chart) => {
65
65
  getChart(chart.id).scrollIntoView().find('.title').should('contain', chart.label);
66
- getChart(chart.id).scrollIntoView().find(`.${chart.type}`).should('be.visible');
66
+ getChart(chart.id).scrollIntoView().find(`svg`).should('be.visible');
67
67
  });
68
68
  }
69
69
 
@@ -854,10 +854,10 @@ describe('SPARQL screen validation', () => {
854
854
  SparqlSteps.getQueryArea().should('contain', 'SELECT');
855
855
  SparqlSteps.executeQuery();
856
856
  getUpdateMessage().should('not.be.visible');
857
- cy.verifyResultsMessage('Showing results from 1 to 74 of 74');
857
+ cy.verifyResultsMessage('Showing results from 1 to 72 of 72');
858
858
  cy.verifyResultsMessage('Query took');
859
859
 
860
- verifyResultsPageLength(74);
860
+ verifyResultsPageLength(72);
861
861
  });
862
862
 
863
863
  it('Test saved query link', () => {
@@ -33,12 +33,13 @@ describe('Visual graph screen validation', () => {
33
33
  cy.visit('graphs-visualizations');
34
34
  getCreateCustomGraphLink().click();
35
35
  cy.url().should('include', '/config/save');
36
- getGraphConfigName().type(graphConfigName);
37
36
  cy.get('[data-cy="graph-config-by-graph-query-checkbox"]').check();
38
- cy.pasteQuery('CONSTRUCT WHERE {?s ?p ?o} LIMIT 10').then( () => {
39
- getSaveConfig().click();
40
- }
41
- );
37
+ getGraphConfigName().type(graphConfigName, {force: true});
38
+
39
+ cy.waitUntil(() => getGraphConfigName().should('have.value', graphConfigName));
40
+ cy.pasteQuery('CONSTRUCT WHERE {?s ?p ?o} LIMIT 10');
41
+ cy.waitUntilQueryIsVisible();
42
+
42
43
  getSaveConfig().click();
43
44
  cy.url().should('include', 'graphs-visualizations');
44
45
  cy.contains('td', graphConfigName).should('be.visible').parent().within(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.4.2",
3
+ "version": "2.5.0-RC2",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -23,7 +23,7 @@
23
23
  "url": "git+https://github.com/Ontotext-AD/graphdb-workbench.git"
24
24
  },
25
25
  "dependencies": {
26
- "cypress": "^12.5.1",
26
+ "cypress": "^13.3.1",
27
27
  "cypress-failed-log": "^2.10.0",
28
28
  "cypress-localstorage-commands": "^1.4.4",
29
29
  "cypress-terminal-report": "^5.2.0",
@@ -0,0 +1,11 @@
1
+ import {ModalDialogSteps} from "../modal-dialog-steps";
2
+
3
+ export class AddRemoteLocationDialogSteps extends ModalDialogSteps {
4
+ static typeLocation(location) {
5
+ this.getDialog().find('#sesameLocation').type(location);
6
+ }
7
+
8
+ static addLocation() {
9
+ this.getDialogFooter().find('.add-location-btn').click();
10
+ }
11
+ }
@@ -0,0 +1,57 @@
1
+ export class ClusterPageSteps {
2
+ static visit() {
3
+ cy.visit('/cluster');
4
+ }
5
+
6
+ static getClusterPage() {
7
+ return cy.get('.cluster-view');
8
+ }
9
+
10
+ static getCreateClusterButton() {
11
+ return cy.get('.cluster-zone');
12
+ }
13
+
14
+ static createCluster() {
15
+ this.getCreateClusterButton().click();
16
+ }
17
+
18
+ static getClusterDeleteButton() {
19
+ return cy.get('.delete-cluster-btn');
20
+ }
21
+
22
+ static deleteCluster() {
23
+ this.getClusterDeleteButton().click();
24
+ }
25
+
26
+ static getRemoveNodesButton() {
27
+ return cy.get('.remove-node-btn');
28
+ }
29
+
30
+ static removeNodes() {
31
+ this.getRemoveNodesButton().click();
32
+ }
33
+
34
+ static getAddNodesButton() {
35
+ return cy.get('.add-node-btn');
36
+ }
37
+
38
+ static addNodes() {
39
+ this.getAddNodesButton().click();
40
+ }
41
+
42
+ static getReplaceNodesButton() {
43
+ return cy.get('.replace-nodes-btn');
44
+ }
45
+
46
+ static replaceNodes() {
47
+ this.getReplaceNodesButton().click();
48
+ }
49
+
50
+ static getPreviewClusterConfigButton() {
51
+ return cy.get('.preview-cluster-config-btn');
52
+ }
53
+
54
+ static previewClusterConfig() {
55
+ this.getPreviewClusterConfigButton().click();
56
+ }
57
+ }
@@ -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
+ }
@@ -0,0 +1,39 @@
1
+ import {ModalDialogSteps} from "../modal-dialog-steps";
2
+
3
+ export class CreateClusterDialogSteps extends ModalDialogSteps {
4
+ static getCreateClusterDialog() {
5
+ return this.getDialog().find('.create-cluster-dialog');
6
+ }
7
+
8
+ static getClusterNodesPanel() {
9
+ return this.getCreateClusterDialog().find('.cluster-nodes');
10
+ }
11
+
12
+ static getClusterNodesList() {
13
+ return this.getClusterNodesPanel().find('.nodes-list .list-group-item');
14
+ }
15
+
16
+ static getRemoteLocationsList() {
17
+ return this.getCreateClusterDialog().find('.remote-locations .location-item');
18
+ }
19
+
20
+ static getSaveClusterConfigButton() {
21
+ return this.getDialogFooter().find('.create-cluster-btn');
22
+ }
23
+
24
+ static saveClusterConfig() {
25
+ return this.getSaveClusterConfigButton().click();
26
+ }
27
+
28
+ static openAddRemoteLocationDialog() {
29
+ this.getDialog().find('#addLocation').click();
30
+ }
31
+
32
+ static selectRemoteLocation(index) {
33
+ this.getRemoteLocationsList().eq(index).click();
34
+ }
35
+
36
+ static getNoSelectedNodesWarning() {
37
+ return this.getDialog().find('.no-selected-nodes');
38
+ }
39
+ }
@@ -0,0 +1,11 @@
1
+ import {ModalDialogSteps} from "../modal-dialog-steps";
2
+
3
+ export class DeleteClusterDialogSteps extends ModalDialogSteps {
4
+ static getConfirmButton() {
5
+ return ModalDialogSteps.getDialogFooter().find('#wb-delete-cluster-submit');
6
+ }
7
+
8
+ static confirmDeleteCluster() {
9
+ this.getConfirmButton().click();
10
+ }
11
+ }
@@ -0,0 +1,39 @@
1
+ import {ModalDialogSteps} from "../modal-dialog-steps";
2
+
3
+ export class ReplaceNodesDialogSteps extends ModalDialogSteps {
4
+ static getReplaceClusterDialog() {
5
+ return this.getDialog().find('.replace-cluster-nodes-dialog');
6
+ }
7
+
8
+ static getClusterNodes() {
9
+ return this.getDialogBody().find('.nodes-list .list-group-item-node');
10
+ }
11
+
12
+ static selectClusterNode(index) {
13
+ this.getClusterNodes().eq(index).click();
14
+ }
15
+
16
+ static getRemoteLocations() {
17
+ return this.getDialogBody().find('.locations-list .location-item');
18
+ }
19
+
20
+ static getReplaceNodesButton() {
21
+ return this.getDialogFooter().find('#wb-replace-nodes-in-cluster-submit');
22
+ }
23
+
24
+ static replaceNodes() {
25
+ this.getReplaceNodesButton().click();
26
+ }
27
+
28
+ static getRemoteLocationsList() {
29
+ return this.getReplaceClusterDialog().find('.remote-locations .location-item');
30
+ }
31
+
32
+ static selectRemoteLocation(index) {
33
+ this.getRemoteLocationsList().eq(index).click();
34
+ }
35
+
36
+ static getSelectedRemoteLocations() {
37
+ return this.getReplaceClusterDialog().find('.selected-remote-locations .list-group-item-node');
38
+ }
39
+ }
@@ -0,0 +1,74 @@
1
+ import {Stubs} from "../stubs";
2
+
3
+ export class ClusterStubs extends Stubs {
4
+ static stubNoClusterGroupStatus() {
5
+ cy.intercept('/rest/cluster/group/status', {
6
+ fixture: '/cluster/no-cluster-group-status.json',
7
+ statusCode: 404
8
+ }).as('no-cluster-group-status');
9
+ }
10
+
11
+ static stubClusterGroupStatus() {
12
+ cy.intercept('/rest/cluster/group/status', {
13
+ fixture: '/cluster/3-nodes-cluster-group-status.json',
14
+ statusCode: 200
15
+ }).as('3-nodes-cluster-group-status');
16
+ }
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
+
25
+ static stubNoClusterNodeStatus() {
26
+ cy.intercept('/rest/cluster/node/status', {
27
+ fixture: '/cluster/no-cluster-node-status.json',
28
+ statusCode: 404
29
+ }).as('no-cluster-node-status');
30
+ }
31
+
32
+ static stubClusterNodeStatus() {
33
+ cy.intercept('/rest/cluster/node/status', {
34
+ fixture: '/cluster/cluster-node-status.json',
35
+ statusCode: 200
36
+ }).as('cluster-node-status');
37
+ }
38
+
39
+ static stubNoClusterConfig() {
40
+ cy.intercept('/rest/cluster/config', {
41
+ statusCode: 404
42
+ }).as('no-cluster-config');
43
+ }
44
+
45
+ static stubClusterConfig() {
46
+ cy.intercept('/rest/cluster/config', {
47
+ fixture: '/cluster/cluster-config.json',
48
+ statusCode: 200
49
+ }).as('cluster-config');
50
+ }
51
+
52
+ static stubCreateCluster() {
53
+ cy.intercept('/rest/cluster/config', {
54
+ fixture: '/cluster/3-nodes-cluster-created.json',
55
+ statusCode: 201
56
+ }).as('3-nodes-cluster-created');
57
+ }
58
+
59
+ static stubDeleteCluster() {
60
+ cy.intercept('/rest/cluster/config?force=false', {
61
+ fixture: '/cluster/delete-cluster.json',
62
+ statusCode: 200,
63
+ method: 'DELETE'
64
+ }).as('delete-cluster');
65
+ }
66
+
67
+ static stubReplaceNodes() {
68
+ cy.intercept('/rest/cluster/config/node', {
69
+ fixture: '/cluster/replace-nodes.json',
70
+ statusCode: 200,
71
+ method: 'PATCH'
72
+ }).as('replace-nodes');
73
+ }
74
+ }
@@ -0,0 +1,52 @@
1
+ import {Stubs} from "../stubs";
2
+
3
+ export class RemoteLocationStubs extends Stubs {
4
+ static stubAddRemoteLocation() {
5
+ cy.intercept('POST', '/rest/locations', {
6
+ fixture: '/remote-location/add-remote-location'
7
+ }).as('add-remote-location');
8
+ }
9
+
10
+ static stubGetRemoteLocations(count = 'no') {
11
+ cy.intercept('GET', '/rest/locations', {
12
+ fixture: `/remote-location/get-${count}-remote-locations.json`,
13
+ statusCode: 200
14
+ }).as(`get-${count}-remote-locations`);
15
+ }
16
+
17
+ static stubGetOneRemoteLocations() {
18
+ cy.intercept('GET', '/rest/locations', {
19
+ fixture: '/remote-location/get-1-remote-locations.json'
20
+ }).as('get-1-remote-locations');
21
+ }
22
+
23
+ static stubGetTwoRemoteLocations() {
24
+ cy.intercept('GET', '/rest/locations', {
25
+ fixture: '/remote-location/get-2-remote-locations.json'
26
+ }).as('get-remote-locations');
27
+ }
28
+
29
+ static stubRemoteLocationCheck() {
30
+ cy.intercept('GET', '/rest/info/rpc-address?location=*', {
31
+ fixture: '/remote-location/remote-location-check'
32
+ }).as('check-remote-location');
33
+ }
34
+
35
+ static stubRemoteLocationFilter() {
36
+ cy.intercept('GET', '/rest/locations?filterClusterLocations=true', {
37
+ fixture: '/remote-location/remote-location-check'
38
+ }).as('check-remote-location');
39
+ }
40
+
41
+ static stubRemoteLocationStatusInCluster() {
42
+ cy.intercept('GET', '/rest/locations/active', {
43
+ fixture: '/remote-location/remote-location-status-in-cluster.json'
44
+ }).as('remote-location-status-in-cluster');
45
+ }
46
+
47
+ static stubRemoteLocationStatusNotCluster() {
48
+ cy.intercept('GET', '/rest/locations/active', {
49
+ fixture: '/remote-location/remote-location-status-not-in-cluster.json'
50
+ }).as('remote-location-status-not-in-cluster');
51
+ }
52
+ }
@@ -4,4 +4,11 @@ export class GlobalOperationsStatusesStub extends Stubs {
4
4
  static stubGlobalOperationsStatusesResponse(repositoryId, withDelay = 0) {
5
5
  GlobalOperationsStatusesStub.stubQueryResponse(`/rest/monitor/${repositoryId}/operations`, '/monitoring/global-operation-statuses.json', 'backup-and-restore-response', withDelay);
6
6
  }
7
+
8
+ static stubNoOperationsResponse(repositoryId, withDelay = 0) {
9
+ GlobalOperationsStatusesStub.stubQueryResponse(
10
+ `/rest/monitor/${repositoryId}/operations`,
11
+ '/monitoring/no-operations.json',
12
+ 'backup-and-restore-response', withDelay);
13
+ }
7
14
  }