graphdb-workbench-tests 2.7.0-TR9 → 2.7.1-RC1

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 (33) hide show
  1. package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +7 -7
  2. package/fixtures/graphdb-import/more-files-with-error/import-resource-with-correct-data.jsonld +8 -0
  3. package/fixtures/graphdb-import/more-files-with-error/import-resource-with-incorrect-data.rdf +13 -0
  4. package/fixtures/graphdb-import/more-files-with-error/import-resource-with-long-error.rdf +13 -0
  5. package/fixtures/locale-en.json +56 -20
  6. package/fixtures/url-import-template.json +1 -1
  7. package/integration/cluster/cluster-legend.spec.js +36 -0
  8. package/integration/cluster/cluster-management.spec.js +4 -92
  9. package/integration/cluster/cluster-states.spec.js +117 -0
  10. package/{integration-flaky → integration}/import/import-server-files-batch-operations.spec.js +30 -4
  11. package/integration/import/import-server-files.spec.js +79 -10
  12. package/integration/import/import-user-data.spec.js +3 -1
  13. package/integration/import/import-view.spec.js +64 -1
  14. package/integration/setup/aclmanagement/create-rule.spec.js +15 -0
  15. package/integration/setup/user-and-access.spec.js +98 -138
  16. package/integration/sparql-editor/actions/expand-results-over-sameas.spec.js +1 -1
  17. package/integration/sparql-editor/internationalization.spec.js +62 -12
  18. package/integration-flaky/import/import-server-files-operations.spec.js +11 -11
  19. package/integration-flaky/import/import-user-data-batch-operations.spec.js +3 -1
  20. package/integration-flaky/sparql-editor/actions/share-query.spec.js +1 -1
  21. package/npm-shrinkwrap.json +2 -2
  22. package/package.json +1 -1
  23. package/steps/cluster/cluster-configuration-steps.js +17 -0
  24. package/steps/cluster/cluster-page-steps.js +20 -8
  25. package/steps/cluster/cluster-view-steps.js +6 -2
  26. package/steps/import/import-resource-message-dialog.js +46 -0
  27. package/steps/import/import-steps.js +16 -2
  28. package/steps/language-selector-steps.js +12 -0
  29. package/steps/setup/acl-management-steps.js +4 -0
  30. package/steps/setup/user-and-access-steps.js +189 -0
  31. package/steps/sparql-steps.js +1 -1
  32. package/steps/yasgui/yasgui-steps.js +6 -0
  33. package/support/sparql-commands.js +1 -1
@@ -8,7 +8,7 @@
8
8
  "lastLogIndex": 0,
9
9
  "endpoint": "http://pc-desktop:7200",
10
10
  "recoveryStatus": {
11
- "affectedNodes": [],
11
+ "affectedNodes": ["http://pc-desktop:7202"],
12
12
  "state": "RECEIVING_SNAPSHOT"
13
13
  }
14
14
  },
@@ -17,16 +17,13 @@
17
17
  "nodeState": "LEADER",
18
18
  "term": 2,
19
19
  "syncStatus": {
20
- "pc-desktop:7300": "IN_SYNC",
20
+ "pc-desktop:7300": "OUT_OF_SYNC",
21
21
  "pc-desktop:7302": "IN_SYNC"
22
22
  },
23
23
  "lastLogTerm": 0,
24
24
  "lastLogIndex": 0,
25
25
  "endpoint": "http://pc-desktop:7201",
26
- "recoveryStatus": {
27
- "affectedNodes": ["http://pc-desktop:7200"],
28
- "state": "RECEIVING_SNAPSHOT"
29
- }
26
+ "recoveryStatus": {}
30
27
  },
31
28
  {
32
29
  "address": "pc-desktop:7302",
@@ -36,6 +33,9 @@
36
33
  "lastLogTerm": 0,
37
34
  "lastLogIndex": 0,
38
35
  "endpoint": "http://pc-desktop:7202",
39
- "recoveryStatus": {}
36
+ "recoveryStatus": {
37
+ "affectedNodes": ["http://pc-desktop:7200"],
38
+ "state": "SENDING_SNAPSHOT"
39
+ }
40
40
  }
41
41
  ]
@@ -0,0 +1,8 @@
1
+ {
2
+ "@context": {
3
+ "ab": "http://learningsparql.com/ns/addressbook#"
4
+ },
5
+ "@id": "ab:richard",
6
+ "ab:homeTel": "(229)276-5135",
7
+ "ab:email": "richard491@hotmail.com"
8
+ }
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:ex="http://example.org/stuff/1.0/">
5
+
6
+ <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
7
+ dc:title="RDF1.1 XML Syntax">
8
+ <ex:editor>
9
+ </rdf:Description>
10
+ </ex:editor>
11
+ </rdf:Description>
12
+
13
+ </rdf:RDF>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:ex="http://example.org/stuff/1.0/">
5
+
6
+ <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
7
+ dc:title="RDF1.1 XML Syntax">
8
+ <ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>
9
+ </rdf:Description>
10
+ </ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>
11
+ </rdf:Description>
12
+
13
+ </rdf:RDF>
@@ -16,6 +16,9 @@
16
16
  "cluster_graphical_view": {
17
17
  "no_cluster_configured": "No cluster is configured",
18
18
  "create_cluster_btn": "Click here to create a cluster",
19
+ "legend_title_node_state": "Node state",
20
+ "legend_title_sync_status": "Sync status",
21
+ "legend_title_link_states": "Link states",
19
22
  "legend_node_state": "NODE STATE",
20
23
  "legend_link_state": "LINK STATE",
21
24
  "node_state_leader": "Leader",
@@ -29,6 +32,8 @@
29
32
  "link_state_in_sync": "In sync",
30
33
  "link_state_syncing": "Syncing",
31
34
  "link_state_out_of_sync": "Out of sync",
35
+ "link_state_receiving_snapshot": "Receiving a snapshot",
36
+ "link_state_recovering": "Recovering",
32
37
  "recovery_state": {
33
38
  "searching_for_node": "Searching for node",
34
39
  "applying_snapshot": "Applying a snapshot",
@@ -85,7 +90,8 @@
85
90
  "advanced_options": "Advanced options",
86
91
  "advanced_options_tooltip": "Advanced options for cluster configuration",
87
92
  "select_from_locations_hint": "Select nodes from remote locations",
88
- "toggle_legend_btn": "Toggle legend",
93
+ "toggle_legend_btn": "Legend",
94
+ "toggle_legend_btn_tooltip": "Toggle legend",
89
95
  "errors": {
90
96
  "only_positive_integers": "Enter only positive integers",
91
97
  "small_transaction_log_max_size": "Transaction log maximum size must be at least 1 GB or a negative number",
@@ -197,7 +203,8 @@
197
203
  "errors": {
198
204
  "loading_rules": "Error during ACL rules",
199
205
  "updating_rules": "Error during ACL rules update",
200
- "duplicated_rules": "Every ACL rule should be unique."
206
+ "duplicated_rules": "Every ACL rule should be unique.",
207
+ "role_length_too_short": "Too short"
201
208
  },
202
209
  "defaults": {
203
210
  "asterisk": "* - Any RDF value",
@@ -419,6 +426,8 @@
419
426
  "graphexplore.error.request.failed": "Request for {{name}} failed! {{error}}",
420
427
  "graphexplore.error.instances.request": "Request for class instances for failed!",
421
428
  "graphexplore.error.rdf.class.request": "Request for RDF Class Hierarchy failed!",
429
+ "graphexplore.search.class.instances": "Search class instances",
430
+ "graphexplore.search.first.class.instances": "Search first 1000 class instances",
422
431
  "graphexplore.disabling.animations": "Disabling animations for more than {{classLimit}} classes.",
423
432
  "graphexplore.reducing.visual.effects": "Reducing visual effects",
424
433
  "graphexplore.class.count.slider": "Class count is reduced to {{count}} for faster initial load. Use the slider to see all classes.",
@@ -477,6 +486,7 @@
477
486
  "security.count.all.results": "Count all SPARQL results",
478
487
  "security.read.write.access": "Repositories read/write access",
479
488
  "security.user.rights": "Users should have rights to at least one repository!",
489
+ "security.user.role.too.short": "Must be at least 2 symbols long",
480
490
  "security.no.active.location": "There is no active location.",
481
491
  "security.repository.title": "Repository",
482
492
  "security.tooltip.read": "Read",
@@ -638,6 +648,7 @@
638
648
  "view.jdbc.create.get_suggestion_sql_type": "Get suggestion...",
639
649
  "jdbc.column.names.constraint": "Column names must be placed in array.",
640
650
  "view.namespaces.helpInfo": "The Namespaces view provides an overview of all namespaces defined in a GraphDB repository. Namespaces are essentially shorthand notations for IRIs. Here you can add, remove and modify them.",
651
+ "view.namespaces.pagination.of": "of",
641
652
  "view.query.and.update.monitoring.title": "Query and Update monitoring",
642
653
  "view.query.and.update.monitoring.helpInfo": "The Queries and Updates monitoring view shows all running queries and updates in a GraphDB repository. A query or update can be terminated by pressing the Abort button.",
643
654
  "view.monitoring.backup_and_restore.title": "Backup and Restore",
@@ -685,6 +696,10 @@
685
696
  "view.create.sparql.template.helpInfo": "This view is used to define a single SPARQL template. The template consists of an IRI identifying the template and a SPARQL update that will be executed when the template is invoked.",
686
697
  "view.system.information.title": "System information",
687
698
  "view.system.information.helpInfo": "The System information view shows the configuration values of the JVM running GraphDB, and provides an easy mechanism to generate a detailed server report file that includes useful debugging information.",
699
+ "view.system.information.heap.memory": "Heap memory",
700
+ "view.system.information.outOf.label": "out of",
701
+ "view.system.information.connectors.label": "Connectors",
702
+ "view.system.information.jvm.args": "JVM Arguments",
688
703
  "view.rest.api.documentation.title": "REST API documentation",
689
704
  "view.rest.api.documentation.helpInfo": "The REST API view documents the available public REST API endpoints and provides an interactive interface to execute REST requests.",
690
705
  "view.guides.title": "Interactive guides",
@@ -798,6 +813,8 @@
798
813
  "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?",
799
814
  "query.editor.error.show.full.message": "Show full exception message",
800
815
  "query.editor.error.show.less.message": "Show less exception message",
816
+ "query.editor.language.change.warning.title": "Change language",
817
+ "query.editor.reload.page.warning": "Changing the language will reload the page. Are you sure you want to continue?",
801
818
  "sparql.tab.directive.unnamed.tab.title": "Unnamed",
802
819
  "search.resource.current.page.msg": "Use <b>View resource</b> on this page",
803
820
  "search.resources.msg": "Search RDF resources",
@@ -898,6 +915,7 @@
898
915
  "forces.serial.statements": "Forces the use of the serial statements pipeline. Not recommended. Use for debugging only.",
899
916
  "force.serial.pipeline": "Force serial pipeline",
900
917
  "restore.defaults.btn": "Restore defaults",
918
+ "only.upload.btn": "Only upload",
901
919
  "abort.btn": "Abort",
902
920
  "no.files.found": "No files found",
903
921
  "enable.for.auto.start": "Enable this option to start the import when you click the Import button. If it is disabled the import will be added to the list but not started automatically.",
@@ -979,27 +997,31 @@
979
997
  "copied_to_clipboard": "Copied to clipboard"
980
998
  },
981
999
  "on_upload": {
982
- "import_user_data": "Import User Data",
983
- "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
984
- "file_size_limit_can_be_changed": "The file size limit can be changed by setting the",
1000
+ "import_user_data": "Import RDF files from your computer, from a URL, or type or paste RDF data",
1001
+ "file_size_limit_can_be_changed": "The file size limit for uploads can be changed by setting the",
985
1002
  "the_property": " property",
986
1003
  "execution": "Import execution",
987
1004
  "work_in_background": "Imports are executed in the background while you continue working on other things.",
1005
+ "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
988
1006
  "interrupt_support": "Interrupt is supported only when the location is local.",
989
1007
  "parser_config": "Parser config options are not available for remote locations."
990
1008
  },
991
1009
  "on_server_import": {
992
- "import_from_server": "It’s required to have access to the server where the GraphDB Workbench is running",
993
- "open_directory": "Open (or create) a directory",
994
- "put_files_into": "and place your files and folders in it",
1010
+ "import_from_server": "Import files from the server where GraphDB is running",
1011
+ "open_directory": "Put files or directories you want to import into the",
1012
+ "put_files_into": "directory on the GraphDB server. Create the directory if necessary.",
995
1013
  "directory_can_be_changed": "The directory can be changed by setting the",
996
- "the_property": "property"
1014
+ "the_property": "property",
1015
+ "execution": "Import execution",
1016
+ "work_in_background": "Imports are executed in the background while you continue working on other things.",
1017
+ "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
1018
+ "interrupt_support": "Interrupt is supported only when the location is local."
997
1019
  },
998
1020
  "on_file_size_limit": {
999
- "file_size_limit_info": "To import larger than {{fileSizeLimit}} MB files, use the ",
1021
+ "file_import_options_info_1": "Explore other file import options - ",
1022
+ "file_import_options_info_2": "import and the ",
1000
1023
  "server_files_link": "Server files",
1001
- "import_or_use": "import or use the",
1002
- "api_link": "API"
1024
+ "api_link": "GraphDB REST API."
1003
1025
  }
1004
1026
  },
1005
1027
  "import_resource_tree": {
@@ -1072,6 +1094,7 @@
1072
1094
  "externalsync.could.not.get.connectors.error": "Could not get connectors",
1073
1095
  "externalsync.repairing": "Repairing",
1074
1096
  "externalsync.creating": "Creating",
1097
+ "externalsync.create.connector": "Create new {{name}} Connector",
1075
1098
  "created.connector": "Created connector {{name}}",
1076
1099
  "externalsync.confirm.repair": "Confirm repair",
1077
1100
  "externalsync.repair.warning.msg": "Are you sure you want to repair this connector? Note that repair means delete + recreate with the same settings.",
@@ -1365,6 +1388,8 @@
1365
1388
  "common.attach": "Attach",
1366
1389
  "common.close": "Close",
1367
1390
  "common.preview": "Preview",
1391
+ "paginator.first.page.label": "First",
1392
+ "paginator.last.page.label": "Last",
1368
1393
  "active.location.version.not.support.settings.warning": "The version of GraphDB at your active location does not support settings.",
1369
1394
  "click.to": "Click to",
1370
1395
  "disable": "disable",
@@ -1616,6 +1641,12 @@
1616
1641
  "configuration.changed.warning": "Configuration changed",
1617
1642
  "computation.canceled.warning": "Computation canceled",
1618
1643
  "rdfrank.not.build.yet.warning": "RDFRank not built yet",
1644
+ "rdfrank.include.predicates": "Included Predicates",
1645
+ "rdfrank.include.graphs": "Included Graphs",
1646
+ "rdfrank.exclude.predicates": "Excluded Predicates",
1647
+ "rdfrank.exclude.graphs": "Excluded Graphs",
1648
+ "rdfrank.include.label": "Included",
1649
+ "rdfrank.exclude.label": "Excluded",
1619
1650
  "compute.full.btn": "Compute Full",
1620
1651
  "compute.incremental.btn": "Compute Incremental",
1621
1652
  "filtering.header": "Filtering",
@@ -1749,14 +1780,6 @@
1749
1780
  "json-ld.frame.link.info": "Specifies JSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1750
1781
  "json-ld.frame.uri.placeholder": "http://example.com/frame.jsonld",
1751
1782
  "json-ld.context.uri.placeholder": "http://example.com/context.jsonld",
1752
- "ndjson-ld.form": "NDJSON-LD form",
1753
- "ndjson-ld.form.info": "Specifies the NDJSON-LD document form",
1754
- "ndjson-ld.context.link": "NDJSON-LD Context",
1755
- "ndjson-ld.context.link.info": "Specifies external NDJSON-LD context as a URL. Only whitelisted URLs can be used.",
1756
- "ndjson-ld.frame.link": "NDJSON-LD Frame",
1757
- "ndjson-ld.frame.link.info": "Specifies NDJSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1758
- "ndjson-ld.frame.uri.placeholder": "http://example.com/frame.ndjsonld",
1759
- "ndjson-ld.context.uri.placeholder": "http://example.com/context.ndjsonld",
1760
1783
  "saved.sparql.queries.label": "Saved SPARQL queries",
1761
1784
  "saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
1762
1785
  "common.execute": "Execute",
@@ -1851,6 +1874,19 @@
1851
1874
  "target.label": "Target",
1852
1875
  "show.blank.nodes.label": "Show Blank Nodes",
1853
1876
  "download.as.label": "Download as",
1877
+ "download.as.json": "JSON",
1878
+ "download.as.jsonld": "JSON-LD",
1879
+ "download.as.ndjsonld": "NDJSON-LD",
1880
+ "download.as.rdfxml": "RDF-XML",
1881
+ "download.as.n3": "N3",
1882
+ "download.as.ntriples": "N-Triples",
1883
+ "download.as.nquads": "N-Quads",
1884
+ "download.as.turtle": "Turtle",
1885
+ "download.as.turtlestar": "Turtle*",
1886
+ "download.as.trix": "TriX",
1887
+ "download.as.trig": "TriG",
1888
+ "download.as.trigstar": "TriG*",
1889
+ "download.as.binaryrdf": "Binary RDF",
1854
1890
  "download.as.progress.msg": "Downloading SPARQL result",
1855
1891
  "visual.graph.label": "Visual graph",
1856
1892
  "explore.graph.visually.popover": "Click to explore the graph visually",
@@ -5,13 +5,13 @@
5
5
  "context": null,
6
6
  "replaceGraphs": [],
7
7
  "baseURI": null,
8
- "contextLink": null,
9
8
  "forceSerial": false,
10
9
  "type": "url",
11
10
  "format": "",
12
11
  "data": "https://www.w3.org/TR/owl-guide/wine.rdf",
13
12
  "timestamp": 1565777709509,
14
13
  "parserSettings": {
14
+ "contextLink": null,
15
15
  "preserveBNodeIds": false,
16
16
  "failOnUnknownDataTypes": false,
17
17
  "verifyDataTypeValues": false,
@@ -0,0 +1,36 @@
1
+ import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-statuses-stub";
2
+ import {ClusterPageSteps} from "../../steps/cluster/cluster-page-steps";
3
+ import {ClusterStubs} from "../../stubs/cluster/cluster-stubs";
4
+ import {RemoteLocationStubs} from "../../stubs/cluster/remote-location-stubs";
5
+
6
+ describe('Cluster legend', () => {
7
+
8
+ let repositoryId;
9
+
10
+ beforeEach(() => {
11
+ repositoryId = 'cluster-repo' + Date.now();
12
+ GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
13
+ });
14
+
15
+ it('Should be able to open cluster view legend', () => {
16
+ ClusterStubs.stubClusterConfig();
17
+ ClusterStubs.stubClusterGroupStatus();
18
+ ClusterStubs.stubClusterNodeStatus();
19
+ RemoteLocationStubs.stubRemoteLocationFilter();
20
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
21
+ // Given I have opened the cluster view
22
+ ClusterPageSteps.visit();
23
+ // When I click on cluster legend button
24
+ ClusterPageSteps.openLegend();
25
+ // Then I expect that the legend should be displayed
26
+ ClusterPageSteps.getLegend().should('be.visible');
27
+ ClusterPageSteps.getLegendNodes().should('have.length', 3);
28
+ ClusterPageSteps.getLegendNodeStates().should('have.length', 12);
29
+ ClusterPageSteps.getLegendLinkStates().should('have.length', 4);
30
+ // When I click on the legend button
31
+ ClusterPageSteps.openLegend();
32
+ // Then I expect the legend to disappear
33
+ // TODO: this doesn't work and says that it's not hidden and it exists although it's clearly not visible on the screen.
34
+ // ClusterPageSteps.getLegend().should('be.hidden');
35
+ });
36
+ });
@@ -7,7 +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
+ import {ClusterConfigurationSteps} from "../../steps/cluster/cluster-configuration-steps";
11
11
 
12
12
  describe('Cluster management', () => {
13
13
 
@@ -96,7 +96,6 @@ describe('Cluster management', () => {
96
96
  RemoteLocationStubs.stubRemoteLocationFilter();
97
97
  RemoteLocationStubs.stubRemoteLocationStatusInCluster();
98
98
  // And cluster management actions should be accessible
99
- ClusterPageSteps.getClusterDeleteButton().should('be.visible');
100
99
  ClusterPageSteps.getRemoveNodesButton().should('be.visible');
101
100
  ClusterPageSteps.getAddNodesButton().should('be.visible');
102
101
  ClusterPageSteps.getReplaceNodesButton().should('be.visible');
@@ -117,7 +116,9 @@ describe('Cluster management', () => {
117
116
  ClusterPageSteps.getClusterPage().should('be.visible');
118
117
  ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
119
118
  // When I click on delete cluster
120
- ClusterPageSteps.deleteCluster();
119
+ ClusterPageSteps.previewClusterConfig();
120
+ ClusterConfigurationSteps.getClusterConfig().should('be.visible');
121
+ ClusterConfigurationSteps.deleteCluster();
121
122
  // Then I expect a confirmation dialog to appear
122
123
  DeleteClusterDialogSteps.getDialog().should('be.visible');
123
124
  // When I confirm
@@ -129,7 +130,6 @@ describe('Cluster management', () => {
129
130
  ClusterStubs.stubNoClusterConfig();
130
131
  RemoteLocationStubs.stubRemoteLocationStatusNotCluster();
131
132
  DeleteClusterDialogSteps.getDialog().should('not.exist');
132
- ClusterPageSteps.getClusterDeleteButton().should('not.exist');
133
133
  ClusterPageSteps.getRemoveNodesButton().should('not.exist');
134
134
  ClusterPageSteps.getAddNodesButton().should('not.exist');
135
135
  ClusterPageSteps.getReplaceNodesButton().should('not.exist');
@@ -137,94 +137,6 @@ describe('Cluster management', () => {
137
137
  ClusterPageSteps.getCreateClusterButton().should('have.class', 'no-cluster');
138
138
  });
139
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...');
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-deskto...');
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-des...');
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...');
224
- // The third, without message,
225
- ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
226
- });
227
-
228
140
  it('Should be able to replace nodes in cluster', () => {
229
141
  // Given I have opened the cluster management page
230
142
  RemoteLocationStubs.stubGetRemoteLocations();
@@ -0,0 +1,117 @@
1
+ import {ClusterPageSteps} from "../../steps/cluster/cluster-page-steps";
2
+ import {ClusterStubs} from "../../stubs/cluster/cluster-stubs";
3
+ import {RemoteLocationStubs} from "../../stubs/cluster/remote-location-stubs";
4
+ import {ClusterViewSteps} from "../../steps/cluster/cluster-view-steps";
5
+ import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-statuses-stub";
6
+
7
+ describe('Cluster states', () => {
8
+
9
+ let repositoryId;
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'cluster-repo' + Date.now();
13
+ GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
14
+ });
15
+
16
+ it('Should display correct message for "waiting-for-snapshot" recovery state', () => {
17
+ // Given I have opened the cluster management page
18
+ ClusterPageSteps.visit();
19
+
20
+ // Given there is an existing cluster created
21
+ ClusterStubs.stubClusterConfig();
22
+ // and two nodes have a "waiting-for-snapshot" recovery status. One of them is without an affected node.
23
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('waiting-for-snapshot');
24
+ ClusterStubs.stubClusterNodeStatus();
25
+ RemoteLocationStubs.stubRemoteLocationFilter();
26
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
27
+
28
+ // Then I expect to see cluster view with 3 nodes,
29
+ ClusterViewSteps.getNodes().should('have.length', 3);
30
+ // The first, with corresponding for "waiting-for-snapshot" status message without affected nodes,
31
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Waiting for snapshot');
32
+ // The second, with corresponding for "waiting-for-snapshot" status message followed with affected nodes,
33
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Waiting for snapshot from node http://pc...');
34
+ // The third, without message,
35
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
36
+ });
37
+
38
+ it('Should display correct message for "building-snapshot" recovery state', () => {
39
+ // Given I have opened the cluster management page
40
+ ClusterPageSteps.visit();
41
+
42
+ // Given there is an existing cluster created
43
+ ClusterStubs.stubClusterConfig();
44
+ // and two nodes have a "building-snapshot" recovery status. One of them is without an affected node.
45
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('building-snapshot');
46
+ ClusterStubs.stubClusterNodeStatus();
47
+ RemoteLocationStubs.stubRemoteLocationFilter();
48
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
49
+
50
+ // Then I expect to see cluster view with 3 nodes,
51
+ ClusterViewSteps.getNodes().should('have.length', 3);
52
+ // The first, with corresponding for "building-snapshot" status message without affected nodes,
53
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Building a snapshot');
54
+ // The second, with corresponding for "building-snapshot" status message followed with affected nodes,
55
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Building a snapshot for http://pc-deskto...');
56
+ // The third, without message,
57
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
58
+ });
59
+
60
+ it('Should display correct message for "sending-snapshot" recovery state', () => {
61
+ // Given I have opened the cluster management page
62
+ ClusterPageSteps.visit();
63
+
64
+ // Given there is an existing cluster created
65
+ ClusterStubs.stubClusterConfig();
66
+ // and two nodes have a "sending-snapshot" recovery status. One of them is without an affected node.
67
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('sending-snapshot');
68
+ ClusterStubs.stubClusterNodeStatus();
69
+ RemoteLocationStubs.stubRemoteLocationFilter();
70
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
71
+
72
+ // Then I expect to see cluster view with 3 nodes,
73
+ ClusterViewSteps.getNodes().should('have.length', 3);
74
+ // The first, with corresponding for "sending-snapshot" status message without affected nodes,
75
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Sending a snapshot');
76
+ // The second, with corresponding for "sending-snapshot" status message followed with affected nodes,
77
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', 'Sending a snapshot to node http://pc-des...');
78
+ // The third, without message,
79
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', '');
80
+ });
81
+
82
+ it('Should display correct message for "receiving-snapshot" recovery state', () => {
83
+ // Given I have opened the cluster management page
84
+ ClusterPageSteps.visit();
85
+
86
+ // Given there is an existing cluster created
87
+ ClusterStubs.stubClusterConfig();
88
+ // and two nodes have a "receiving-snapshot" recovery status. One of them is without an affected node.
89
+ ClusterStubs.stubClusterWithRecoveryStatusGroupStatus('receiving-snapshot');
90
+ ClusterStubs.stubClusterNodeStatus();
91
+ RemoteLocationStubs.stubRemoteLocationFilter();
92
+ RemoteLocationStubs.stubRemoteLocationStatusInCluster();
93
+
94
+ // Then I expect to see cluster view with 3 nodes,
95
+ ClusterViewSteps.getNodes().should('have.length', 3);
96
+ // The first, with corresponding for "receiving-snapshot" status message without affected nodes,
97
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7200').should('have.text', 'Receiving a snapshot from node http://pc...');
98
+ // The second, with corresponding for "receiving-snapshot" status message followed with affected nodes,
99
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7202').should('have.text', 'Sending a snapshot to node http://pc-des...');
100
+ // The third, without message,
101
+ ClusterViewSteps.getNodeInfoText('pc-desktop:7201').should('have.text', '');
102
+
103
+ // Then I expect receiving snapshot link between the node which is sending and the one which is receiving a snapshot
104
+ ClusterViewSteps.getLink('pc-desktop-7300-pc-desktop-7302').should('have.css', 'stroke-dasharray', '10px, 10px')
105
+ .and('have.css', 'marker-mid', 'url("#arrowhead_big")')
106
+ .invoke('attr', 'stroke')
107
+ .should('eq', 'var(--secondary-color)');
108
+ // And I expect an out of sync link between the leader and the out of sync node (the one receiving the snapshot)
109
+ ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7300').should('have.css', 'stroke-dasharray', '10px, 10px')
110
+ .invoke('attr', 'stroke')
111
+ .should('eq', 'var(--gray-color)');
112
+ // And I expect to have an in sync link between the leader and the node sending the snapshot
113
+ ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7302').should('have.css', 'stroke-dasharray', 'none')
114
+ .invoke('attr', 'stroke')
115
+ .should('eq', 'var(--secondary-color)');
116
+ });
117
+ });
@@ -11,24 +11,50 @@ describe('Import server files - Batch operations', () => {
11
11
  repositoryId = 'server-import-' + Date.now();
12
12
  cy.createRepository({id: repositoryId});
13
13
  ImportServerFilesSteps.visitServerImport(repositoryId);
14
- ImportServerFilesSteps.getResources().should('have.length', 14);
14
+ ImportServerFilesSteps.getResources().should('have.length', 18);
15
15
  });
16
16
 
17
17
  afterEach(() => {
18
18
  cy.deleteRepository(repositoryId);
19
19
  });
20
20
 
21
+ it('should batch operation buttons be visible when files/directories are selected', () => {
22
+ // When I select a directory.
23
+ ImportServerFilesSteps.selectFileByName('more-files');
24
+
25
+ // Then I expect the import button be visible
26
+ ImportServerFilesSteps.getBatchImportButton().should('exist');
27
+
28
+ // When I deselect all files and directories
29
+ ImportServerFilesSteps.selectFileByName('more-files');
30
+
31
+ // Then I expect batch import button to not be visible.
32
+ ImportServerFilesSteps.getBatchImportButton().should('not.exist');
33
+
34
+ // When I select a file of some folder
35
+ ImportServerFilesSteps.selectFileByName('rdfxml.rdf');
36
+
37
+ // Then I expect batch import button to not be visible.
38
+ ImportServerFilesSteps.getBatchImportButton().should('exist');
39
+
40
+ // When I deselect a file of some folder
41
+ ImportServerFilesSteps.selectFileByName('rdfxml.rdf');
42
+
43
+ // Then I expect batch import button to not be visible.
44
+ ImportServerFilesSteps.getBatchImportButton().should('not.exist');
45
+ });
46
+
21
47
  it('Should be able to filter server files by status', () => {
22
48
  // When I select All files from the menu
23
49
  ImportServerFilesSteps.selectAllResources();
24
50
  // Then I should see all files selected
25
- ImportServerFilesSteps.getSelectedResources().should('have.length', 14);
51
+ ImportServerFilesSteps.getSelectedResources().should('have.length', 18);
26
52
  // When I select None from the menu
27
53
  ImportServerFilesSteps.deselectAllResources();
28
54
  // Then I should see no files selected
29
55
  ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
30
56
  // precondition for the next step
31
- ImportServerFilesSteps.importFileByName(FILE_FOR_IMPORT);
57
+ ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
32
58
  ImportSettingsDialogSteps.import();
33
59
  ImportServerFilesSteps.checkImportedResource(0, FILE_FOR_IMPORT);
34
60
  // When I select Imported from the menu
@@ -39,7 +65,7 @@ describe('Import server files - Batch operations', () => {
39
65
  // When I select Not Imported from the menu
40
66
  ImportServerFilesSteps.selectNotImportedResources();
41
67
  // Then I should see only not imported files selected
42
- ImportServerFilesSteps.getSelectedResources().should('have.length', 13);
68
+ ImportServerFilesSteps.getSelectedResources().should('have.length', 17);
43
69
  // Deselect all for the next step
44
70
  ImportServerFilesSteps.deselectAllResources();
45
71
  ImportServerFilesSteps.getSelectedResources().should('have.length', 0);