graphdb-workbench-tests 2.6.4 → 2.7.0-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.
- package/Dockerfile +3 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +7 -7
- package/fixtures/graphdb-import/0007-import-file.jsonld +27 -0
- package/fixtures/graphdb-import/more-files/jsonld-file.jsonld +8 -0
- package/fixtures/graphdb-import/more-files/rdfxml.rdf +15 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-correct-data.jsonld +8 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-incorrect-data.rdf +13 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-long-error.rdf +13 -0
- package/fixtures/graphdb-import/sample-jsonld.json +8 -0
- package/fixtures/locale-en.json +251 -111
- package/fixtures/url-import-template.json +1 -0
- package/integration/cluster/cluster-legend.spec.js +36 -0
- package/integration/cluster/cluster-management.spec.js +4 -92
- package/integration/cluster/cluster-states.spec.js +117 -0
- package/integration/explore/graphs.overview.spec.js +62 -0
- package/integration/explore/similarity.spec.js +20 -2
- package/integration/guides/movies-interactive-guide.spec.js +1 -1
- package/integration/guides/star-wars-interactive-guide.js +1 -0
- package/integration/import/import-server-files-batch-operations.spec.js +121 -0
- package/integration/import/import-server-files.spec.js +145 -0
- package/integration/import/import-user-data-file-upload.spec.js +194 -0
- package/integration/import/import-user-data-settings-dialog.spec.js +70 -0
- package/integration/import/import-user-data-text-snippet.spec.js +246 -0
- package/integration/import/import-user-data-url.spec.js +70 -0
- package/integration/import/import-user-data.spec.js +119 -0
- package/integration/import/import-view.spec.js +108 -0
- package/integration/monitor/global-operation-statuses-component.spec.js +2 -2
- package/integration/repository/repositories.spec.js +20 -17
- package/integration/resource/resource.spec.js +40 -0
- package/integration/setup/aclmanagement/create-rule.spec.js +15 -0
- package/integration/setup/sparql-template-create.js +4 -4
- package/integration/setup/user-and-access.spec.js +98 -138
- package/integration/sparql-editor/internationalization.spec.js +62 -12
- package/integration/sparql-editor/yasgui-tabs.spec.js +15 -1
- package/integration/sparql-editor/yasr/download-as.spec.js +71 -0
- package/integration-flaky/import/import-server-files-operations.spec.js +142 -0
- package/integration-flaky/import/import-user-data-batch-operations.spec.js +185 -0
- package/integration-flaky/import/import.server.files.spec.js +3 -2
- package/integration-flaky/setup/sparql-template-create.js +1 -1
- package/integration-flaky/sparql-editor/actions/share-query.spec.js +1 -1
- package/npm-shrinkwrap.json +3198 -0
- package/package.json +10 -11
- package/steps/cluster/cluster-configuration-steps.js +17 -0
- package/steps/cluster/cluster-page-steps.js +20 -8
- package/steps/cluster/cluster-view-steps.js +6 -2
- package/steps/explore/graphs-overview-steps.js +32 -0
- package/steps/explore/similarity-indexes-steps.js +26 -0
- package/steps/guides/guide-steps.js +5 -19
- package/steps/home-steps.js +4 -0
- package/steps/import/file-overwrite-dialog-steps.js +16 -0
- package/steps/import/import-resource-message-dialog.js +46 -0
- package/steps/import/import-server-files-steps.js +36 -0
- package/steps/import/import-settings-dialog-steps.js +60 -0
- package/steps/import/import-steps.js +463 -0
- package/steps/import/import-user-data-steps.js +167 -0
- package/steps/json-ld-modal-steps.js +41 -0
- package/steps/language-selector-steps.js +12 -0
- package/steps/main-menu-steps.js +4 -0
- package/steps/resource/resource-steps.js +7 -2
- package/steps/setup/acl-management-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +189 -0
- package/steps/sparql-steps.js +1 -1
- package/steps/yasgui/yasgui-steps.js +6 -0
- package/steps/yasgui/yasr-steps.js +5 -0
- package/stubs/yasgui/query-stubs.js +4 -0
- package/support/commands.js +23 -0
- package/support/import-commands.js +10 -0
- package/support/sparql-commands.js +1 -1
- package/bin/graphdb-workbench-cypress +0 -29
- package/integration/help/rest-api.spec.js +0 -121
- package/integration/import/import.server.files.spec.js +0 -69
- package/integration/import/import.user.data.spec.js +0 -338
- package/steps/import-steps.js +0 -277
|
@@ -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 {
|
|
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.
|
|
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
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {YasrSteps} from "../../steps/yasgui/yasr-steps";
|
|
2
|
+
import {GraphsOverviewSteps} from "../../steps/explore/graphs-overview-steps";
|
|
3
|
+
import {JsonLdModalSteps} from "../../steps/json-ld-modal-steps";
|
|
2
4
|
|
|
3
5
|
const EXPORT_GRAPHS_TABLE_ID = '#export-graphs';
|
|
4
6
|
const ROWS_PER_PAGE_20 = '1';
|
|
@@ -123,4 +125,64 @@ describe('Graphs overview screen validation', () => {
|
|
|
123
125
|
YasrSteps.getResultTableHeader().should('be.visible');
|
|
124
126
|
YasrSteps.getResultTableHeaderColumns().should('have.length', 5);
|
|
125
127
|
});
|
|
128
|
+
|
|
129
|
+
it('Should be able to export repository in JSONLD format and restore defaults', () => {
|
|
130
|
+
// Given I select to export the repository as JSON-LD
|
|
131
|
+
GraphsOverviewSteps.selectRow(1);
|
|
132
|
+
GraphsOverviewSteps.exportRepository();
|
|
133
|
+
GraphsOverviewSteps.selectJSONLDOption();
|
|
134
|
+
|
|
135
|
+
// Then I select the 'compact' mode option and add context, and export
|
|
136
|
+
GraphsOverviewSteps.selectJSONLDMode(3);
|
|
137
|
+
JsonLdModalSteps.typeJSONLDContext('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
138
|
+
JsonLdModalSteps.clickExportJSONLD();
|
|
139
|
+
|
|
140
|
+
// Then the dialog should disappear
|
|
141
|
+
JsonLdModalSteps.getJSONLDModal().should('not.exist');
|
|
142
|
+
// And the file should have downloaded
|
|
143
|
+
JsonLdModalSteps.verifyFileExists('statements.jsonld');
|
|
144
|
+
|
|
145
|
+
// When I select the same download as option again and the dialog appears with the prior data
|
|
146
|
+
GraphsOverviewSteps.exportRepository();
|
|
147
|
+
GraphsOverviewSteps.selectJSONLDOption();
|
|
148
|
+
JsonLdModalSteps.getJSONLDModal().should('be.visible');
|
|
149
|
+
JsonLdModalSteps.getSelectedJSONLDModeField().should('have.value', 'http://www.w3.org/ns/json-ld#compacted');
|
|
150
|
+
JsonLdModalSteps.getJSONLDContext().should('have.value', 'https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
151
|
+
|
|
152
|
+
// Then clicking the 'Restore defaults' button should reset the data in the form
|
|
153
|
+
JsonLdModalSteps.clickRestoreDefaultsJSONLD();
|
|
154
|
+
JsonLdModalSteps.getSelectedJSONLDModeField().should('have.value', 'http://www.w3.org/ns/json-ld#expanded');
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('Should be able to export repository in JSONLD format with default settings', () => {
|
|
158
|
+
// Given I select to export the repository as JSON-LD
|
|
159
|
+
GraphsOverviewSteps.exportRepository();
|
|
160
|
+
GraphsOverviewSteps.selectJSONLDOption();
|
|
161
|
+
|
|
162
|
+
// Then I select the 'flattened' mode option and export
|
|
163
|
+
GraphsOverviewSteps.selectJSONLDMode(2);
|
|
164
|
+
JsonLdModalSteps.clickExportJSONLD();
|
|
165
|
+
|
|
166
|
+
// Then the dialog should disappear
|
|
167
|
+
JsonLdModalSteps.getJSONLDModal().should('not.exist');
|
|
168
|
+
|
|
169
|
+
// And the file should have downloaded
|
|
170
|
+
JsonLdModalSteps.verifyFileExists('statements.jsonld');
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('Should be able to export repository in JSONLD format using row download button', () => {
|
|
174
|
+
// Given I select to export the repository as JSON-LD
|
|
175
|
+
GraphsOverviewSteps.downloadAsFromRowButton(0);
|
|
176
|
+
GraphsOverviewSteps.selectJSONLDFromRowDropdown();
|
|
177
|
+
|
|
178
|
+
// Then I select the 'expanded' mode option and export
|
|
179
|
+
GraphsOverviewSteps.selectJSONLDMode(1);
|
|
180
|
+
JsonLdModalSteps.clickExportJSONLD();
|
|
181
|
+
|
|
182
|
+
// Then the dialog should disappear
|
|
183
|
+
JsonLdModalSteps.getJSONLDModal().should('not.exist');
|
|
184
|
+
|
|
185
|
+
// And the file should have downloaded
|
|
186
|
+
JsonLdModalSteps.verifyFileExists('statements.jsonld');
|
|
187
|
+
});
|
|
126
188
|
});
|
|
@@ -204,6 +204,9 @@ describe('Similarity screen validation', () => {
|
|
|
204
204
|
cy.get('.index-search-panel').should('be.visible');
|
|
205
205
|
cy.get('.selected-index').should('be.visible').and('contain', `Search in ${INDEX_NAME}`);
|
|
206
206
|
getSearchIndexInput().should('be.visible');
|
|
207
|
+
// The search and result types should both be set to Term
|
|
208
|
+
SimilarityIndexesSteps.getSearchTypeButton().should('contain.text', 'Term');
|
|
209
|
+
SimilarityIndexesSteps.getResultTypeButton().should('contain.text', 'Term');
|
|
207
210
|
|
|
208
211
|
// When I search for "Neal" in the index
|
|
209
212
|
searchIndex('Neal');
|
|
@@ -211,6 +214,21 @@ describe('Similarity screen validation', () => {
|
|
|
211
214
|
// Then I expect search results to be displayed
|
|
212
215
|
// And showing 20 results
|
|
213
216
|
YasrSteps.getResults().should('have.length', 20);
|
|
217
|
+
|
|
218
|
+
// When I select Document as the search type
|
|
219
|
+
SimilarityIndexesSteps.selectSearchTypeOption('Document');
|
|
220
|
+
|
|
221
|
+
// The result type should remain Term
|
|
222
|
+
SimilarityIndexesSteps.getResultTypeButton().should('contain.text', 'Term');
|
|
223
|
+
|
|
224
|
+
// When I select Document as the result type
|
|
225
|
+
SimilarityIndexesSteps.selectResultTypeOption('Document');
|
|
226
|
+
|
|
227
|
+
// The search type should remain Document
|
|
228
|
+
SimilarityIndexesSteps.getSearchTypeButton().should('contain.text', 'Document');
|
|
229
|
+
|
|
230
|
+
// The result type should be Document
|
|
231
|
+
SimilarityIndexesSteps.getResultTypeButton().should('contain.text', 'Document');
|
|
214
232
|
});
|
|
215
233
|
});
|
|
216
234
|
|
|
@@ -468,7 +486,7 @@ describe('Similarity screen validation', () => {
|
|
|
468
486
|
getIndexLinks().should('be.visible');
|
|
469
487
|
cy.waitUntil(() =>
|
|
470
488
|
cy.get('.edit-query-btn')
|
|
471
|
-
.then(editBtn => editBtn));
|
|
489
|
+
.then((editBtn) => editBtn));
|
|
472
490
|
});
|
|
473
491
|
}
|
|
474
492
|
|
|
@@ -501,7 +519,7 @@ describe('Similarity screen validation', () => {
|
|
|
501
519
|
cy.waitUntil(() =>
|
|
502
520
|
cy.get('#indexes-table')
|
|
503
521
|
.find('.index-row')
|
|
504
|
-
.then(indexes => indexes.length === 2))
|
|
522
|
+
.then((indexes) => indexes.length === 2));
|
|
505
523
|
|
|
506
524
|
cy.url().should('contain', Cypress.config('baseUrl') + '/similarity'); //Should change the 'contain' method to 'eq' once GDB-3699 is resolved
|
|
507
525
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {GuideDialogSteps} from "../../steps/guides/guide-dialog-steps";
|
|
2
1
|
import {GuideSteps} from "../../steps/guides/guide-steps";
|
|
3
2
|
import {MoviesGuideSteps} from "../../steps/guides/movies-guide-steps";
|
|
4
3
|
|
|
@@ -16,6 +15,7 @@ describe('Interactive guides', () => {
|
|
|
16
15
|
});
|
|
17
16
|
|
|
18
17
|
afterEach(() => {
|
|
18
|
+
cy.deleteUploadedFile(repositoryId, MOVIES_FILE_FOR_IMPORT);
|
|
19
19
|
cy.deleteRepository(repositoryId);
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
|
|
2
|
+
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
3
|
+
|
|
4
|
+
describe('Import server files - Batch operations', () => {
|
|
5
|
+
|
|
6
|
+
let repositoryId;
|
|
7
|
+
|
|
8
|
+
const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
repositoryId = 'server-import-' + Date.now();
|
|
12
|
+
cy.createRepository({id: repositoryId});
|
|
13
|
+
ImportServerFilesSteps.visitServerImport(repositoryId);
|
|
14
|
+
ImportServerFilesSteps.getResources().should('have.length', 18);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
cy.deleteRepository(repositoryId);
|
|
19
|
+
});
|
|
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
|
+
|
|
47
|
+
it('Should be able to filter server files by status', () => {
|
|
48
|
+
// When I select All files from the menu
|
|
49
|
+
ImportServerFilesSteps.selectAllResources();
|
|
50
|
+
// Then I should see all files selected
|
|
51
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 18);
|
|
52
|
+
// When I select None from the menu
|
|
53
|
+
ImportServerFilesSteps.deselectAllResources();
|
|
54
|
+
// Then I should see no files selected
|
|
55
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
|
|
56
|
+
// precondition for the next step
|
|
57
|
+
ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
|
|
58
|
+
ImportSettingsDialogSteps.import();
|
|
59
|
+
ImportServerFilesSteps.checkImportedResource(0, FILE_FOR_IMPORT);
|
|
60
|
+
// When I select Imported from the menu
|
|
61
|
+
ImportServerFilesSteps.selectImportedResources();
|
|
62
|
+
// Then I should see only imported files selected
|
|
63
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 1);
|
|
64
|
+
ImportServerFilesSteps.getSelectedResourceName(0).should('contain', FILE_FOR_IMPORT);
|
|
65
|
+
// When I select Not Imported from the menu
|
|
66
|
+
ImportServerFilesSteps.selectNotImportedResources();
|
|
67
|
+
// Then I should see only not imported files selected
|
|
68
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 17);
|
|
69
|
+
// Deselect all for the next step
|
|
70
|
+
ImportServerFilesSteps.deselectAllResources();
|
|
71
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
|
|
72
|
+
// When I select a directory via the checkbox on the row
|
|
73
|
+
ImportServerFilesSteps.selectFileByName('more-files');
|
|
74
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 3);
|
|
75
|
+
// When I deselect a single file from the directory via the checkbox on the row
|
|
76
|
+
ImportServerFilesSteps.deselectFileByName('rdfxml.rdf');
|
|
77
|
+
// Then I should see the file deselected and the folder is partially selected
|
|
78
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 1);
|
|
79
|
+
// When I click again on the folder
|
|
80
|
+
ImportServerFilesSteps.selectFileByName('more-files');
|
|
81
|
+
// Then All files in the folder should be selected again
|
|
82
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 3);
|
|
83
|
+
// When I deselect the folder
|
|
84
|
+
ImportServerFilesSteps.deselectFileByName('more-files');
|
|
85
|
+
// Then I should see no files selected
|
|
86
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('Should perform batch import and reset of selected server files with changing settings', () => {
|
|
90
|
+
// Given I have opened the server files tab
|
|
91
|
+
// When I select couple of files for import
|
|
92
|
+
ImportServerFilesSteps.selectFileByName('more-files');
|
|
93
|
+
// And I click on the batch import button
|
|
94
|
+
ImportServerFilesSteps.batchImport();
|
|
95
|
+
ImportSettingsDialogSteps.import();
|
|
96
|
+
// Then the files should be imported
|
|
97
|
+
// We send only the files in the folder for import
|
|
98
|
+
// ImportServerFilesSteps.checkImportedResource(0, 'more-files');
|
|
99
|
+
ImportServerFilesSteps.checkImportedResource(0, 'jsonld-file.jsonld');
|
|
100
|
+
ImportServerFilesSteps.checkImportedResource(0, 'rdfxml.rdf');
|
|
101
|
+
ImportServerFilesSteps.deselectFileByName('more-files');
|
|
102
|
+
// When I select the folder and click on the batch reset button
|
|
103
|
+
ImportServerFilesSteps.selectFileByName('more-files');
|
|
104
|
+
ImportServerFilesSteps.batchReset();
|
|
105
|
+
// Then the files should be reset
|
|
106
|
+
ImportServerFilesSteps.getImportedResourcesStates().should('have.length', 0);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('should perform batch import without changing default settings', () => {
|
|
110
|
+
// Given I have opened the server files tab
|
|
111
|
+
// When I select couple of files for import
|
|
112
|
+
ImportServerFilesSteps.selectFileByName('more-files');
|
|
113
|
+
// And I click on the batch import button without changing default settings
|
|
114
|
+
ImportServerFilesSteps.batchImportWithoutChangingDefaultSettings();
|
|
115
|
+
// Then the files should be imported
|
|
116
|
+
// We send only the files in the folder for import
|
|
117
|
+
// ImportServerFilesSteps.checkImportedResource(0, 'more-files');
|
|
118
|
+
ImportServerFilesSteps.checkImportedResource(0, 'jsonld-file.jsonld');
|
|
119
|
+
ImportServerFilesSteps.checkImportedResource(0, 'rdfxml.rdf');
|
|
120
|
+
});
|
|
121
|
+
});
|