graphdb-workbench-tests 2.7.0-TR8 → 2.7.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.
Files changed (38) 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 +52 -22
  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/guides/movies-interactive-guide.spec.js +1 -2
  11. package/integration/guides/star-wars-interactive-guide.js +1 -2
  12. package/{integration-flaky → integration}/import/import-server-files-batch-operations.spec.js +30 -4
  13. package/integration/import/import-server-files.spec.js +79 -10
  14. package/integration/import/import-user-data-file-upload.spec.js +9 -9
  15. package/integration/import/import-user-data.spec.js +3 -1
  16. package/integration/import/import-view.spec.js +64 -1
  17. package/integration/repository/repositories.spec.js +1 -2
  18. package/integration/setup/aclmanagement/create-rule.spec.js +15 -0
  19. package/integration/setup/user-and-access.spec.js +98 -138
  20. package/integration/sparql-editor/internationalization.spec.js +62 -12
  21. package/integration-flaky/import/import-server-files-operations.spec.js +11 -11
  22. package/integration-flaky/import/import-user-data-batch-operations.spec.js +3 -1
  23. package/integration-flaky/sparql-editor/actions/share-query.spec.js +1 -1
  24. package/npm-shrinkwrap.json +2 -2
  25. package/package.json +1 -1
  26. package/steps/cluster/cluster-configuration-steps.js +17 -0
  27. package/steps/cluster/cluster-page-steps.js +20 -8
  28. package/steps/cluster/cluster-view-steps.js +6 -2
  29. package/steps/guides/guide-steps.js +3 -6
  30. package/steps/import/file-overwrite-dialog-steps.js +16 -0
  31. package/steps/import/import-resource-message-dialog.js +46 -0
  32. package/steps/import/import-steps.js +25 -15
  33. package/steps/language-selector-steps.js +12 -0
  34. package/steps/setup/acl-management-steps.js +4 -0
  35. package/steps/setup/user-and-access-steps.js +189 -0
  36. package/steps/sparql-steps.js +1 -1
  37. package/steps/yasgui/yasgui-steps.js +6 -0
  38. 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",
@@ -477,6 +484,7 @@
477
484
  "security.count.all.results": "Count all SPARQL results",
478
485
  "security.read.write.access": "Repositories read/write access",
479
486
  "security.user.rights": "Users should have rights to at least one repository!",
487
+ "security.user.role.too.short": "Must be at least 2 symbols long",
480
488
  "security.no.active.location": "There is no active location.",
481
489
  "security.repository.title": "Repository",
482
490
  "security.tooltip.read": "Read",
@@ -798,6 +806,8 @@
798
806
  "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
807
  "query.editor.error.show.full.message": "Show full exception message",
800
808
  "query.editor.error.show.less.message": "Show less exception message",
809
+ "query.editor.language.change.warning.title": "Change language",
810
+ "query.editor.reload.page.warning": "Changing the language will reload the page. Are you sure you want to continue?",
801
811
  "sparql.tab.directive.unnamed.tab.title": "Unnamed",
802
812
  "search.resource.current.page.msg": "Use <b>View resource</b> on this page",
803
813
  "search.resources.msg": "Search RDF resources",
@@ -898,6 +908,7 @@
898
908
  "forces.serial.statements": "Forces the use of the serial statements pipeline. Not recommended. Use for debugging only.",
899
909
  "force.serial.pipeline": "Force serial pipeline",
900
910
  "restore.defaults.btn": "Restore defaults",
911
+ "only.upload.btn": "Only upload",
901
912
  "abort.btn": "Abort",
902
913
  "no.files.found": "No files found",
903
914
  "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.",
@@ -956,7 +967,11 @@
956
967
  "user_data": {
957
968
  "duplicates_confirmation": {
958
969
  "title": "Confirm files overwrite",
959
- "message": "Following files are already uploaded: <br/>{{duplicatedFiles}}<br/>Do you want to overwrite them?"
970
+ "message": "Following files are already uploaded: <br/>{{duplicatedFiles}}<br/>Do you want to overwrite them?",
971
+ "buttons": {
972
+ "keep_both": "Keep both",
973
+ "overwrite": "Overwrite"
974
+ }
960
975
  }
961
976
  },
962
977
  "help": {
@@ -975,27 +990,31 @@
975
990
  "copied_to_clipboard": "Copied to clipboard"
976
991
  },
977
992
  "on_upload": {
978
- "import_user_data": "Import User Data",
979
- "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
980
- "file_size_limit_can_be_changed": "The file size limit can be changed by setting the",
993
+ "import_user_data": "Import RDF files from your computer, from a URL, or type or paste RDF data",
994
+ "file_size_limit_can_be_changed": "The file size limit for uploads can be changed by setting the",
981
995
  "the_property": " property",
982
996
  "execution": "Import execution",
983
997
  "work_in_background": "Imports are executed in the background while you continue working on other things.",
998
+ "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
984
999
  "interrupt_support": "Interrupt is supported only when the location is local.",
985
1000
  "parser_config": "Parser config options are not available for remote locations."
986
1001
  },
987
1002
  "on_server_import": {
988
- "import_from_server": "It’s required to have access to the server where the GraphDB Workbench is running",
989
- "open_directory": "Open (or create) a directory",
990
- "put_files_into": "and place your files and folders in it",
1003
+ "import_from_server": "Import files from the server where GraphDB is running",
1004
+ "open_directory": "Put files or directories you want to import into the",
1005
+ "put_files_into": "directory on the GraphDB server. Create the directory if necessary.",
991
1006
  "directory_can_be_changed": "The directory can be changed by setting the",
992
- "the_property": "property"
1007
+ "the_property": "property",
1008
+ "execution": "Import execution",
1009
+ "work_in_background": "Imports are executed in the background while you continue working on other things.",
1010
+ "to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
1011
+ "interrupt_support": "Interrupt is supported only when the location is local."
993
1012
  },
994
1013
  "on_file_size_limit": {
995
- "file_size_limit_info": "To import larger than {{fileSizeLimit}} MB files, use the ",
1014
+ "file_import_options_info_1": "Explore other file import options - ",
1015
+ "file_import_options_info_2": "import and the ",
996
1016
  "server_files_link": "Server files",
997
- "import_or_use": "import or use the",
998
- "api_link": "API"
1017
+ "api_link": "GraphDB REST API."
999
1018
  }
1000
1019
  },
1001
1020
  "import_resource_tree": {
@@ -1024,7 +1043,13 @@
1024
1043
  "base_iri": "Base IRI",
1025
1044
  "debug": "Debug",
1026
1045
  "imported": "Imported on",
1027
- "parser_settings": "Parser settings"
1046
+ "parser_settings": "Parser settings",
1047
+ "added_count_statements": "Added {{count}} statements",
1048
+ "added_statements": "Added statements",
1049
+ "removed_count_statements": "Removed {{count}} statements",
1050
+ "removed_statements": "Removed statements",
1051
+ "replaced_count_graphs": "Replaced {{count}} graphs",
1052
+ "number_of_replaced_graphs": "Number of replaced graphs"
1028
1053
  }
1029
1054
  },
1030
1055
  "url.import.input.placeholder": "Data URL",
@@ -1739,14 +1764,6 @@
1739
1764
  "json-ld.frame.link.info": "Specifies JSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1740
1765
  "json-ld.frame.uri.placeholder": "http://example.com/frame.jsonld",
1741
1766
  "json-ld.context.uri.placeholder": "http://example.com/context.jsonld",
1742
- "ndjson-ld.form": "NDJSON-LD form",
1743
- "ndjson-ld.form.info": "Specifies the NDJSON-LD document form",
1744
- "ndjson-ld.context.link": "NDJSON-LD Context",
1745
- "ndjson-ld.context.link.info": "Specifies external NDJSON-LD context as a URL. Only whitelisted URLs can be used.",
1746
- "ndjson-ld.frame.link": "NDJSON-LD Frame",
1747
- "ndjson-ld.frame.link.info": "Specifies NDJSON-LD frame document as a URL. Only whitelisted URLs can be used.",
1748
- "ndjson-ld.frame.uri.placeholder": "http://example.com/frame.ndjsonld",
1749
- "ndjson-ld.context.uri.placeholder": "http://example.com/context.ndjsonld",
1750
1767
  "saved.sparql.queries.label": "Saved SPARQL queries",
1751
1768
  "saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
1752
1769
  "common.execute": "Execute",
@@ -1841,6 +1858,19 @@
1841
1858
  "target.label": "Target",
1842
1859
  "show.blank.nodes.label": "Show Blank Nodes",
1843
1860
  "download.as.label": "Download as",
1861
+ "download.as.json": "JSON",
1862
+ "download.as.jsonld": "JSON-LD",
1863
+ "download.as.ndjsonld": "NDJSON-LD",
1864
+ "download.as.rdfxml": "RDF-XML",
1865
+ "download.as.n3": "N3",
1866
+ "download.as.ntriples": "N-Triples",
1867
+ "download.as.nquads": "N-Quads",
1868
+ "download.as.turtle": "Turtle",
1869
+ "download.as.turtlestar": "Turtle*",
1870
+ "download.as.trix": "TriX",
1871
+ "download.as.trig": "TriG",
1872
+ "download.as.trigstar": "TriG*",
1873
+ "download.as.binaryrdf": "Binary RDF",
1844
1874
  "download.as.progress.msg": "Downloading SPARQL result",
1845
1875
  "visual.graph.label": "Visual graph",
1846
1876
  "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
+ });
@@ -20,8 +20,7 @@ describe('Interactive guides', () => {
20
20
  });
21
21
 
22
22
  context('Describes "Movies" interactive guide', () => {
23
- // TODO: fix these once everything in the import view is ready
24
- it.skip('Tests movies interactive guide using "Next" button to the end', () => {
23
+ it('Tests movies interactive guide using "Next" button to the end', () => {
25
24
 
26
25
  const stepAssertions = [
27
26
  {assert: MoviesGuideSteps.assertExploreClassHierarchyStep1},
@@ -19,8 +19,7 @@ describe('Describes "Starwars" interactive guide', () => {
19
19
  cy.deleteRepository(repositoryId);
20
20
  });
21
21
 
22
- // TODO: fix these once everything in the import view is ready
23
- it.skip('should go through "Star wars" interactive guide', () => {
22
+ it('should go through "Star wars" interactive guide', () => {
24
23
 
25
24
  const guideName = '1 The Star Wars guide';
26
25
  const allStepValidationFunctions = [
@@ -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);