graphdb-workbench-tests 2.8.0-Test → 2.8.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.
- package/cypress.config.js +4 -1
- package/fixtures/cluster/2-nodes-cluster-group-status-deleted.json +30 -0
- package/fixtures/cluster/2-nodes-cluster-group-status.json +30 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-after-replace.json +44 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-building-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-sending-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-waiting-for-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-with-tag.json +47 -0
- package/fixtures/cluster/3-nodes-cluster-group-status.json +12 -3
- package/fixtures/cluster/4-nodes-cluster-group-status.json +58 -0
- package/fixtures/cluster/cluster-config.json +1 -0
- package/fixtures/cluster/cluster-node-status.json +4 -1
- package/fixtures/cluster/no-cluster-group-status.json +2 -1
- package/fixtures/cluster/no-cluster-node-status.json +2 -1
- package/fixtures/cluster/save-cluster-configuration-response.json +10 -0
- package/fixtures/connectors/get-retrieval-connector.json +1 -1
- package/fixtures/connectors/get-ttyg-chatgpt-connectors.json +188 -0
- package/fixtures/locale-en.json +386 -103
- package/fixtures/remote-location/get-0-remote-locations.json +1 -2
- package/fixtures/remote-location/get-1-remote-locations.json +2 -4
- package/fixtures/remote-location/get-2-remote-locations.json +3 -6
- package/fixtures/remote-location/get-3-remote-locations.json +4 -8
- package/fixtures/remote-location/get-4-remote-locations.json +54 -0
- package/fixtures/remote-location/remote-location-status-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-location-status-not-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-locations-filter.json +1 -2
- package/fixtures/repositories/get-locations.json +5 -10
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/fixtures/repositories/get-ttyg-repositories.json +28 -0
- package/fixtures/security/get-admin-user.json +22 -0
- package/fixtures/similarity/get-ttyg-similarity-connectors.json +46 -0
- package/fixtures/ttyg/agent/create-agent.json +2 -1
- package/fixtures/ttyg/agent/get-agent-defaults.json +42 -0
- package/fixtures/ttyg/agent/get-agent-list-after-deleted.json +1 -1
- package/fixtures/ttyg/agent/get-agent-list-new-agent.json +2 -73
- package/fixtures/ttyg/agent/get-agent-list.json +1 -1
- package/fixtures/ttyg/agent/get-agent.json +25 -0
- package/fixtures/ttyg/chats/ask-question.json +25 -0
- package/fixtures/ttyg/chats/create/create-chat-response.json +16 -0
- package/fixtures/ttyg/chats/create/get-chats-after-create.json +12 -0
- package/fixtures/ttyg/chats/create/get-chats-before-create.json +7 -0
- package/fixtures/ttyg/chats/explain-response-1.json +59 -0
- package/fixtures/ttyg/chats/explain-response-2.json +59 -0
- package/fixtures/ttyg/chats/get-chat.json +199 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +97 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +70 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-properties.spec.js +95 -0
- package/integration/cluster/cluster-configuration/cluster-configuration.spec.js +38 -0
- package/integration/cluster/cluster-legend.spec.js +1 -0
- package/integration/cluster/edit-cluster-nodes-modal.spec.js +425 -0
- package/integration/explore/graphs.overview.spec.js +4 -0
- package/integration/explore/{similariti-index-create.spec.js → similarity-index/similarity-index-create.spec.js} +4 -4
- package/integration/explore/{similarity-index.spec.js → similarity-index/similarity-index.spec.js} +6 -6
- package/integration/explore/{similarity.spec.js → similarity-index/similarity.spec.js} +7 -8
- package/integration/explore/visual-graph/visual.graph.spec.js +34 -35
- package/integration/home/cookie-policy.spec.js +83 -0
- package/integration/home/create-repository.spec.js +35 -0
- package/integration/home/documentation-link.spec.js +60 -0
- package/integration/home/google-analytics.spec.js +60 -0
- package/integration/home/language-selector.spec.js +19 -0
- package/integration/home/rdf-resource-search.spec.js +192 -0
- package/integration/home/view-resource-autocomplete.spec.js +52 -0
- package/integration/home/workbench.home.spec.js +1 -277
- package/integration/import/import-user-data-file-upload.spec.js +13 -0
- package/integration/import/import-user-data.spec.js +6 -1
- package/integration/import/import-view.spec.js +6 -1
- package/integration/license/license.spec.js +26 -0
- package/integration/repository/attach-remote-location.spec.js +94 -40
- package/integration/repository/repositories.spec.js +40 -7
- package/integration/setup/autocomplete.spec.js +21 -70
- package/integration/setup/{jdbc-create.spec.js → jdbc/jdbc-create.spec.js} +9 -10
- package/integration/setup/{jdbc.spec.js → jdbc/jdbc.spec.js} +56 -25
- package/integration/setup/my-settings.spec.js +13 -21
- package/integration/setup/namespaces.spec.js +132 -264
- package/integration/setup/plugins.spec.js +22 -51
- package/integration/setup/rdf-rank.spec.js +42 -138
- package/integration/ttyg/agent-list.spec.js +27 -25
- package/integration/ttyg/agent-select-menu.spec.js +18 -16
- package/integration/ttyg/chat-list.spec.js +72 -9
- package/integration/ttyg/chat-panel.spec.js +106 -10
- package/integration/ttyg/clone-agent.spec.js +8 -4
- package/integration/ttyg/create-agent.spec.js +303 -51
- package/integration/ttyg/create-chat.spec.js +68 -0
- package/integration/ttyg/delete-agent.spec.js +6 -5
- package/integration/ttyg/edit-agent.spec.js +16 -5
- package/integration/ttyg/ttyg-permission.spec.js +66 -0
- package/integration/ttyg/ttyg-view.spec.js +8 -4
- package/npm-shrinkwrap.json +215 -220
- package/package.json +5 -6
- package/steps/alert-dialog-steps.js +25 -0
- package/steps/cluster/cluster-configuration-steps.js +173 -5
- package/steps/cluster/cluster-page-steps.js +8 -0
- package/steps/cluster/custer-nodes-configuration-steps.js +107 -0
- package/steps/guides/guide-steps.js +1 -1
- package/steps/home-steps.js +48 -5
- package/steps/import/import-steps.js +11 -7
- package/steps/license-steps.js +25 -0
- package/steps/repositories/attach-repository-steps.js +33 -0
- package/steps/repository-steps.js +40 -11
- package/steps/setup/autocomplete-steps.js +59 -0
- package/steps/setup/namespace-steps.js +211 -0
- package/steps/setup/plugins-steps.js +37 -0
- package/steps/setup/rdf-rank-steps.js +106 -0
- package/steps/setup/settings-steps.js +17 -0
- package/steps/ttyg/chat-panel-steps.js +31 -6
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +82 -4
- package/steps/ttyg/ttyg-view-steps.js +77 -3
- package/steps/visual-graph-steps.js +29 -1
- package/steps/yasgui/yasqe-steps.js +3 -0
- package/stubs/cluster/cluster-stubs.js +162 -7
- package/stubs/cluster/remote-location-stubs.js +46 -0
- package/stubs/connector-stubs.js +24 -0
- package/stubs/environment-stubs.js +27 -0
- package/stubs/jdbc/jdbc-stubs.js +19 -0
- package/stubs/license-stubs.js +112 -0
- package/stubs/namespace-stubs.js +5 -0
- package/stubs/repositories/repositories-stubs.js +11 -8
- package/stubs/repositories-stub.js +15 -0
- package/stubs/security-stubs.js +29 -0
- package/stubs/setup/plugins-stubs.js +5 -0
- package/stubs/similarity-index-stubs.js +25 -0
- package/stubs/stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +79 -40
- package/support/commands.js +2 -0
- package/support/index.js +18 -0
- package/support/security-command.js +25 -0
- package/support/settings-commands.js +4 -5
- package/support/user-commands.js +31 -0
- package/fixtures/ttyg/chats/get-chat-1.json +0 -43
- package/integration/cluster/cluster-management.spec.js +0 -220
- package/steps/autocomplete-steps.js +0 -10
- package/steps/cluster/add-remote-location-dialog-steps.js +0 -11
- package/steps/cluster/create-cluster-dialog-steps.js +0 -39
- package/steps/cluster/replace-nodes-dialog-steps.js +0 -39
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {LicenseSteps} from "../../steps/license-steps";
|
|
2
|
+
import {LicenseStubs} from "../../stubs/license-stubs";
|
|
3
|
+
|
|
4
|
+
describe('License', () => {
|
|
5
|
+
it('Should displays an informational message if the license is provided through a file (hardcoded)', () => {
|
|
6
|
+
LicenseStubs.stubLicenseHardcoded(true);
|
|
7
|
+
LicenseStubs.stubEnterpriseLicense();
|
|
8
|
+
LicenseSteps.visit();
|
|
9
|
+
LicenseSteps.getLicenseHeader().should('have.text', "GraphDB Enterprise Edition");
|
|
10
|
+
|
|
11
|
+
LicenseSteps.getHardcodedAlertMessage().should('exist');
|
|
12
|
+
LicenseSteps.getRevertToFreeLicenseButton().should('not.exist');
|
|
13
|
+
LicenseSteps.getSetNewLicenseElement().should('not.exist');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('Should not displays an informational message if the license is not provided through a file (not hardcoded)', () => {
|
|
17
|
+
LicenseStubs.stubLicenseHardcoded(false);
|
|
18
|
+
LicenseStubs.stubEnterpriseLicense();
|
|
19
|
+
LicenseSteps.visit();
|
|
20
|
+
LicenseSteps.getLicenseHeader().should('have.text', "GraphDB Enterprise Edition");
|
|
21
|
+
|
|
22
|
+
LicenseSteps.getHardcodedAlertMessage().should('not.exist');
|
|
23
|
+
LicenseSteps.getRevertToFreeLicenseButton().should('exist');
|
|
24
|
+
LicenseSteps.getSetNewLicenseElement().should('exist');
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -3,16 +3,13 @@ import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-
|
|
|
3
3
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
4
4
|
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
* Skipped for now until the backend is ready
|
|
8
|
-
*/
|
|
9
|
-
describe.skip('Attach remote location', () => {
|
|
10
|
-
|
|
11
|
-
beforeEach(() => {
|
|
12
|
-
RepositorySteps.visit();
|
|
13
|
-
});
|
|
6
|
+
describe('Attach remote location', () => {
|
|
14
7
|
|
|
15
8
|
it('Should create and delete remote instance', () => {
|
|
9
|
+
cy.visit('/repository');
|
|
10
|
+
RepositorySteps.waitLoader();
|
|
11
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
12
|
+
|
|
16
13
|
// When I open the "Attach a remote instance" dialog.
|
|
17
14
|
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
18
15
|
|
|
@@ -24,19 +21,19 @@ describe.skip('Attach remote location', () => {
|
|
|
24
21
|
AttachRepositorySteps.getGraphDBRadioBtn().should('be.checked');
|
|
25
22
|
|
|
26
23
|
// When I fill wrong location URL
|
|
27
|
-
AttachRepositorySteps.
|
|
24
|
+
AttachRepositorySteps.enterURL("Wrong URL");
|
|
28
25
|
|
|
29
26
|
// Then I expect to see error message
|
|
30
27
|
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Note that the location should be a URL that points to a remote GraphDB installation,');
|
|
31
28
|
|
|
32
29
|
// When I clear the wrong URL
|
|
33
|
-
AttachRepositorySteps.
|
|
30
|
+
AttachRepositorySteps.clearURL();
|
|
34
31
|
|
|
35
32
|
// Then I expect to see an error message that states the location is required.
|
|
36
33
|
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Location URL is required.');
|
|
37
34
|
|
|
38
35
|
// When I fill correct URL
|
|
39
|
-
AttachRepositorySteps.
|
|
36
|
+
AttachRepositorySteps.enterURL("http://loc");
|
|
40
37
|
|
|
41
38
|
// Then I expect the "Attach" button to be enabled
|
|
42
39
|
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
@@ -48,19 +45,19 @@ describe.skip('Attach remote location', () => {
|
|
|
48
45
|
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
49
46
|
|
|
50
47
|
// When I fill Username
|
|
51
|
-
AttachRepositorySteps.
|
|
48
|
+
AttachRepositorySteps.enterUsername('username');
|
|
52
49
|
|
|
53
50
|
// Then I expect the "Attach" button to be disabled (not clickable), because Password is mandatory
|
|
54
51
|
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
55
52
|
|
|
56
53
|
// When I fill password
|
|
57
|
-
AttachRepositorySteps.
|
|
54
|
+
AttachRepositorySteps.enterPassword('password');
|
|
58
55
|
// Then I expect the "Attach" button to be enabled
|
|
59
56
|
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
60
57
|
|
|
61
58
|
// When I remove the Username and Password and
|
|
62
|
-
AttachRepositorySteps.
|
|
63
|
-
AttachRepositorySteps.
|
|
59
|
+
AttachRepositorySteps.clearUsername();
|
|
60
|
+
AttachRepositorySteps.clearPassword();
|
|
64
61
|
// switch to Signature authentication type
|
|
65
62
|
AttachRepositorySteps.selectSignatureRadioBtn();
|
|
66
63
|
|
|
@@ -68,7 +65,7 @@ describe.skip('Attach remote location', () => {
|
|
|
68
65
|
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
69
66
|
|
|
70
67
|
// When I clear the location URL
|
|
71
|
-
AttachRepositorySteps.
|
|
68
|
+
AttachRepositorySteps.clearURL();
|
|
72
69
|
|
|
73
70
|
// Then I expect the "Attach" button to be disabled (not clickable), because Location URL is mandatory
|
|
74
71
|
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
@@ -79,21 +76,21 @@ describe.skip('Attach remote location', () => {
|
|
|
79
76
|
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
80
77
|
|
|
81
78
|
// When I fill wrong location URL
|
|
82
|
-
AttachRepositorySteps.
|
|
79
|
+
AttachRepositorySteps.enterURL("Wrong URL");
|
|
83
80
|
|
|
84
81
|
// Then I expect to see error message
|
|
85
82
|
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Note that the location should be a URL that points to a remote Ontopic installation,');
|
|
86
83
|
|
|
87
84
|
// When I clear the wrong URL
|
|
88
|
-
AttachRepositorySteps.
|
|
85
|
+
AttachRepositorySteps.clearURL();
|
|
89
86
|
|
|
90
87
|
// Then I expect to see an error message that states the location is required.
|
|
91
88
|
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Location URL is required.');
|
|
92
89
|
|
|
93
90
|
// When I fill all mandatory fields
|
|
94
|
-
AttachRepositorySteps.
|
|
95
|
-
AttachRepositorySteps.
|
|
96
|
-
AttachRepositorySteps.
|
|
91
|
+
AttachRepositorySteps.enterURL('http://local');
|
|
92
|
+
AttachRepositorySteps.enterUsername("username");
|
|
93
|
+
AttachRepositorySteps.enterPassword('password');
|
|
97
94
|
|
|
98
95
|
// Then I expect the "Attach" button to be enabled
|
|
99
96
|
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
@@ -102,7 +99,7 @@ describe.skip('Attach remote location', () => {
|
|
|
102
99
|
AttachRepositorySteps.attachRemoteLocation();
|
|
103
100
|
|
|
104
101
|
// Then I expect location with URL "http://local" to be created
|
|
105
|
-
RepositorySteps.
|
|
102
|
+
RepositorySteps.getSparqlOntopicTable().should('contain', 'http://local');
|
|
106
103
|
|
|
107
104
|
// When delete the created location
|
|
108
105
|
RepositorySteps.deleteOntopicInstance('http://local');
|
|
@@ -111,17 +108,22 @@ describe.skip('Attach remote location', () => {
|
|
|
111
108
|
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to detach the location \'http://local\'?');
|
|
112
109
|
|
|
113
110
|
// When I confirm
|
|
114
|
-
ModalDialogSteps.
|
|
111
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
115
112
|
|
|
116
113
|
// Then I expect the location to be deleted.
|
|
117
|
-
RepositorySteps.
|
|
114
|
+
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
118
115
|
});
|
|
119
116
|
|
|
120
|
-
it('Should
|
|
121
|
-
// When I open the Repositories view that contains all possible kind of locations.
|
|
117
|
+
it('Should render different location types in separate tables: error, location with and without repositories', () => {
|
|
122
118
|
RepositoriesStubs.stubRepositories();
|
|
123
119
|
RepositoriesStubs.stubLocations();
|
|
120
|
+
cy.visit('/repository');
|
|
121
|
+
cy.wait('@get-all-repositories');
|
|
122
|
+
RepositorySteps.waitLoader();
|
|
123
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
124
124
|
|
|
125
|
+
// When I open the Repositories view that contains all possible kind of locations.
|
|
126
|
+
RepositorySteps.getLocalGraphDBTable().should('exist');
|
|
125
127
|
// Then I expect to see the repositories from location GraphDb instance
|
|
126
128
|
RepositorySteps.getLocalGraphDBTable().contains('test · RUNNING');
|
|
127
129
|
// and a remote GraphDB instance with no repositories in it
|
|
@@ -131,24 +133,76 @@ describe.skip('Attach remote location', () => {
|
|
|
131
133
|
// and a remote GraphDB instance with error in it
|
|
132
134
|
RepositorySteps.getRemoteGraphDBTable().contains('Cannot connect to location Connect to localhost:7212 [localhost/127.0.0.1] fa');
|
|
133
135
|
// and a remote Ontopic instance
|
|
134
|
-
RepositorySteps.
|
|
136
|
+
RepositorySteps.getSparqlOntopicTable().contains('http://local');
|
|
135
137
|
});
|
|
136
138
|
|
|
137
|
-
it('Should open edit remote location dialog', () => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
//
|
|
146
|
-
|
|
139
|
+
it('Should be able to open edit remote location dialog', () => {
|
|
140
|
+
cy.visit('/repository');
|
|
141
|
+
RepositorySteps.waitLoader();
|
|
142
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
143
|
+
|
|
144
|
+
const locationId = 'http://local';
|
|
145
|
+
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
|
146
|
+
RepositorySteps.getLocalGraphDBTable().should('exist');
|
|
147
|
+
// When I click to edit the SPARQL instance
|
|
148
|
+
RepositorySteps.editSparqlInstance(0);
|
|
149
|
+
// Then I expect to see that SPARQL instance is selected
|
|
150
|
+
AttachRepositorySteps.getSparqlEndpointRadioBtn().should('be.checked');
|
|
147
151
|
// And be disabled
|
|
148
|
-
AttachRepositorySteps.
|
|
152
|
+
AttachRepositorySteps.getSparqlEndpointRadioBtn().should('be.disabled');
|
|
149
153
|
// The location url be set
|
|
150
|
-
AttachRepositorySteps.getLocationURLInput().should('have.value',
|
|
151
|
-
// And be disabled
|
|
154
|
+
AttachRepositorySteps.getLocationURLInput().should('have.value', locationId);
|
|
155
|
+
// And be disabled for edit
|
|
152
156
|
AttachRepositorySteps.getLocationURLInput().should('be.disabled');
|
|
157
|
+
ModalDialogSteps.close();
|
|
158
|
+
// Then I can remove the new location
|
|
159
|
+
deleteRemoteLocation(locationId);
|
|
160
|
+
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('Should create and delete SPARQL endpoint instance', () => {
|
|
164
|
+
cy.visit('/repository');
|
|
165
|
+
RepositorySteps.waitLoader();
|
|
166
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
167
|
+
|
|
168
|
+
const locationId = 'http://endpoint/repo/ex';
|
|
169
|
+
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
|
170
|
+
// Then the dialog has closed
|
|
171
|
+
ModalDialogSteps.getDialog().should('not.exist');
|
|
172
|
+
// And the SPARQL table should be visible
|
|
173
|
+
RepositorySteps.getSparqlOntopicTable().should('contain', locationId);
|
|
174
|
+
// Then I can remove the new location
|
|
175
|
+
deleteRemoteLocation(locationId);
|
|
176
|
+
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
153
177
|
});
|
|
154
178
|
});
|
|
179
|
+
|
|
180
|
+
function addRemoteSPARQLLocation(url, username, password) {
|
|
181
|
+
RepositoriesStubs.spyCreateLocation();
|
|
182
|
+
// When I open the "Attach a remote instance" dialog.
|
|
183
|
+
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
184
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because location URL is mandatory
|
|
185
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
186
|
+
// And authentication type to be "None". This is default location type.
|
|
187
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'No authentication will be used with this location.');
|
|
188
|
+
// I expect GraphDB type be selected
|
|
189
|
+
AttachRepositorySteps.getGraphDBRadioBtn().should('be.checked');
|
|
190
|
+
// When I select SPARQL Endpoint instance
|
|
191
|
+
AttachRepositorySteps.selectSparqlEndpointRadioBtn();
|
|
192
|
+
// When I fill correct URL, username and password
|
|
193
|
+
AttachRepositorySteps.enterURL(url);
|
|
194
|
+
AttachRepositorySteps.enterUsername(username);
|
|
195
|
+
AttachRepositorySteps.enterPassword(password);
|
|
196
|
+
// Then I expect the "Attach" button to be enabled
|
|
197
|
+
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
198
|
+
// And when I attach the location, it should be visible in the list
|
|
199
|
+
AttachRepositorySteps.attachRemoteLocation();
|
|
200
|
+
cy.wait('@createLocation');
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function deleteRemoteLocation(locationId) {
|
|
204
|
+
RepositoriesStubs.spyDeleteLocation();
|
|
205
|
+
RepositorySteps.deleteSparqlLocation(locationId);
|
|
206
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
207
|
+
cy.wait('@deleteLocation');
|
|
208
|
+
}
|
|
@@ -5,6 +5,8 @@ import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-status
|
|
|
5
5
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
6
6
|
import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
|
|
7
7
|
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
8
|
+
import {ClusterStubs} from "../../stubs/cluster/cluster-stubs";
|
|
9
|
+
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
8
10
|
|
|
9
11
|
describe('Repositories', () => {
|
|
10
12
|
|
|
@@ -420,13 +422,7 @@ describe('Repositories', () => {
|
|
|
420
422
|
HomeSteps.visitAndWaitLoader();
|
|
421
423
|
cy.visit('/repository');
|
|
422
424
|
|
|
423
|
-
|
|
424
|
-
// and only afterwards continue with the check
|
|
425
|
-
cy.get('#wb-repositories-repositoryInGetRepositories .repository')
|
|
426
|
-
.should('have.length.greaterThan', 0)
|
|
427
|
-
.then(() => {
|
|
428
|
-
RepositorySteps.assertRepositoryStatus(repositoryId, "RUNNING");
|
|
429
|
-
});
|
|
425
|
+
RepositorySteps.assertRepositoryStatus(repositoryId, "RUNNING");
|
|
430
426
|
|
|
431
427
|
//Restart the repository
|
|
432
428
|
RepositorySteps.restartRepository(repositoryId);
|
|
@@ -509,6 +505,43 @@ describe('Repositories', () => {
|
|
|
509
505
|
ModalDialogSteps.verifyDialogBody('Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.');
|
|
510
506
|
});
|
|
511
507
|
|
|
508
|
+
it('should NOT allow restart of LOCAL repository from EDIT PAGE, if node is in cluster', () => {
|
|
509
|
+
// Given I create a repository
|
|
510
|
+
cy.createRepository({id: repositoryId});
|
|
511
|
+
// When I set the node in a cluster
|
|
512
|
+
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
513
|
+
// Then go to the local repository's edit page
|
|
514
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
515
|
+
// I expect the repository restart checkbox button to be disabled
|
|
516
|
+
RepositorySteps.getEditViewRestartButton().should('be.visible');
|
|
517
|
+
RepositorySteps.getEditViewRestartButton().should('be.disabled');
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
it('should NOT allow restart of LOCAL repositories from REPOSITORIES PAGE, if node is in cluster', () => {
|
|
521
|
+
// Given I create a repository
|
|
522
|
+
cy.createRepository({id: repositoryId});
|
|
523
|
+
// When I set the node in a cluster
|
|
524
|
+
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
525
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
526
|
+
// Then go to the repositories page
|
|
527
|
+
RepositorySteps.visit();
|
|
528
|
+
// I expect the local repository's restart button to be disabled
|
|
529
|
+
RepositorySteps.getRepositoryRestartButton(repositoryId).should('be.visible');
|
|
530
|
+
RepositorySteps.getRepositoryRestartButton(repositoryId).should('be.disabled');
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
it('should ALLOW restart of REMOTE repositories from REPOSITORIES PAGE, if node is in cluster', () => {
|
|
534
|
+
// Given I have a remote location
|
|
535
|
+
RepositoriesStubs.stubRepositories(0, '/repositories/get-remote-and-local-repositories.json');
|
|
536
|
+
RepositoriesStubs.stubLocations();
|
|
537
|
+
// When I set the node in a cluster
|
|
538
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
539
|
+
// Then go to the repositories page
|
|
540
|
+
RepositorySteps.visit();
|
|
541
|
+
// Then I expect the remote repository's restart button to be enabled
|
|
542
|
+
RepositorySteps.getRestartRemoteRepoButton(0).should('be.enabled');
|
|
543
|
+
});
|
|
544
|
+
|
|
512
545
|
function interceptRulesetFileUpload() {
|
|
513
546
|
cy.intercept(
|
|
514
547
|
{
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
+
import {AutocompleteSteps} from "../../steps/setup/autocomplete-steps";
|
|
2
|
+
import {LicenseStubs} from "../../stubs/license-stubs";
|
|
3
|
+
|
|
1
4
|
describe('Autocomplete ', () => {
|
|
2
5
|
|
|
3
6
|
let repositoryId;
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
beforeEach(() => {
|
|
6
9
|
repositoryId = 'autocomplete-' + Date.now();
|
|
7
10
|
cy.createRepository({id: repositoryId});
|
|
8
11
|
cy.presetRepository(repositoryId);
|
|
9
12
|
cy.initializeRepository(repositoryId);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function waitUntilAutocompletePageIsLoaded() {
|
|
13
|
-
// Workbench loading screen should not be visible
|
|
14
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
15
|
-
|
|
16
|
-
// No active loader
|
|
17
|
-
cy.get('.ot-loader').should('not.exist');
|
|
18
|
-
|
|
19
|
-
// No warnings should be present
|
|
20
|
-
getAutocompletePage().find('.alert-warning').should('not.be.visible');
|
|
21
|
-
|
|
22
|
-
getAutocompleteIndex().should('be.visible');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
createRepository();
|
|
27
|
-
cy.visit('/autocomplete');
|
|
28
|
-
cy.window();
|
|
29
|
-
waitUntilAutocompletePageIsLoaded();
|
|
13
|
+
LicenseStubs.spyGetLicense();
|
|
30
14
|
});
|
|
31
15
|
|
|
32
16
|
afterEach(() => {
|
|
@@ -34,85 +18,52 @@ describe('Autocomplete ', () => {
|
|
|
34
18
|
});
|
|
35
19
|
|
|
36
20
|
it('should allow to enable the autocomplete', () => {
|
|
21
|
+
AutocompleteSteps.visit();
|
|
22
|
+
cy.wait('@get-license');
|
|
23
|
+
AutocompleteSteps.waitUntilAutocompletePageIsLoaded();
|
|
24
|
+
|
|
37
25
|
// Verify initial status is OFF
|
|
38
|
-
getAutocompleteHeader()
|
|
26
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
39
27
|
.should('be.visible')
|
|
40
28
|
.and('contain', repositoryId);
|
|
41
|
-
getAutocompleteHeader()
|
|
29
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
42
30
|
.find('.tag-default')
|
|
43
31
|
.should('be.visible')
|
|
44
32
|
.and('contain', 'OFF');
|
|
45
|
-
getAutocompleteSwitch()
|
|
33
|
+
AutocompleteSteps.getAutocompleteSwitch()
|
|
46
34
|
.find('input')
|
|
47
35
|
.should('not.be.checked');
|
|
48
|
-
getAutocompleteStatus().should('not.be.visible');
|
|
49
|
-
getBuildButton().should('not.be.visible');
|
|
36
|
+
AutocompleteSteps.getAutocompleteStatus().should('not.be.visible');
|
|
37
|
+
AutocompleteSteps.getBuildButton().should('not.be.visible');
|
|
50
38
|
|
|
51
39
|
// Should allow to add autocomplete labels
|
|
52
|
-
getToggleIRIButton()
|
|
40
|
+
AutocompleteSteps.getToggleIRIButton()
|
|
53
41
|
.should('be.visible')
|
|
54
42
|
.and('not.be.disabled');
|
|
55
|
-
getAddLabelButton()
|
|
43
|
+
AutocompleteSteps.getAddLabelButton()
|
|
56
44
|
.should('be.visible')
|
|
57
45
|
.and('not.be.disabled');
|
|
58
46
|
|
|
59
47
|
// Should have default labels
|
|
60
|
-
getAutocompleteLabels()
|
|
48
|
+
AutocompleteSteps.getAutocompleteLabels()
|
|
61
49
|
.should('be.visible')
|
|
62
50
|
.find('.wb-autocomplete-labels-row')
|
|
63
51
|
.should('have.length', 1)
|
|
64
52
|
.and('contain', 'http://www.w3.org/2000/01/rdf-schema#label');
|
|
65
53
|
|
|
66
54
|
// Enable autocomplete and verify status is OK (possible slow operation)
|
|
67
|
-
getAutocompleteSwitch().click();
|
|
68
|
-
getAutocompleteHeader()
|
|
55
|
+
AutocompleteSteps.getAutocompleteSwitch().click();
|
|
56
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
69
57
|
.find('.tag-primary')
|
|
70
58
|
.should('be.visible')
|
|
71
59
|
.and('contain', 'ON');
|
|
72
|
-
getAutocompleteStatus()
|
|
60
|
+
AutocompleteSteps.getAutocompleteStatus()
|
|
73
61
|
.should('be.visible')
|
|
74
62
|
.find('.tag-success')
|
|
75
63
|
.should('be.visible')
|
|
76
64
|
.and('contain', 'Ready');
|
|
77
|
-
getBuildButton()
|
|
65
|
+
AutocompleteSteps.getBuildButton()
|
|
78
66
|
.should('be.visible')
|
|
79
67
|
.and('not.be.disabled');
|
|
80
68
|
});
|
|
81
|
-
|
|
82
|
-
function getAutocompletePage() {
|
|
83
|
-
return cy.get('#autocomplete');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getAutocompleteIndex() {
|
|
87
|
-
return getAutocompletePage().find('#toggleIndex');
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function getAutocompleteHeader() {
|
|
91
|
-
return getAutocompleteIndex().find('.autocomplete-header');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function getAutocompleteSwitch() {
|
|
95
|
-
return getAutocompleteIndex().find('.autocomplete-switch');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function getAutocompleteStatus() {
|
|
99
|
-
return getAutocompleteIndex().find('.autocomplete-status');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getBuildButton() {
|
|
103
|
-
return getAutocompleteIndex().find('.build-index-btn');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function getToggleIRIButton() {
|
|
107
|
-
return getAutocompletePage().find('#toggleIRIs');
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function getAddLabelButton() {
|
|
111
|
-
return getAutocompletePage().find('#wb-autocomplete-addLabel');
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function getAutocompleteLabels() {
|
|
115
|
-
return getAutocompletePage().find('#wb-autocomplete-labels');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
69
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {JdbcSteps} from "
|
|
2
|
-
import {JdbcCreateSteps} from "
|
|
3
|
-
import {ToasterSteps} from "
|
|
4
|
-
import {YasrSteps} from "
|
|
5
|
-
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "
|
|
6
|
-
import {YasqeSteps} from "
|
|
7
|
-
import {MainMenuSteps} from "
|
|
8
|
-
import {RepositorySelectorSteps} from "
|
|
9
|
-
import {YasguiLoader} from "
|
|
1
|
+
import {JdbcSteps} from "../../../steps/setup/jdbc-steps";
|
|
2
|
+
import {JdbcCreateSteps} from "../../../steps/setup/jdbc-create-steps";
|
|
3
|
+
import {ToasterSteps} from "../../../steps/toaster-steps";
|
|
4
|
+
import {YasrSteps} from "../../../steps/yasgui/yasr-steps";
|
|
5
|
+
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "../../../steps/modal-dialog-steps";
|
|
6
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
7
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
8
|
+
import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
|
|
9
|
+
import {YasguiLoader} from "../../../steps/yasgui/yasgui-loader";
|
|
10
10
|
|
|
11
11
|
const FILE_TO_IMPORT = '200-row-allianz.ttl';
|
|
12
12
|
const DEFAULT_QUERY = 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n' +
|
|
@@ -230,7 +230,6 @@ describe('JDBC configuration', () => {
|
|
|
230
230
|
JdbcSteps.verifyUrl();
|
|
231
231
|
});
|
|
232
232
|
|
|
233
|
-
|
|
234
233
|
it('should display confirm message when configuration name is changed', () => {
|
|
235
234
|
// When I open the create JDBC configuration page,
|
|
236
235
|
// type configuration name,
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {JdbcSteps} from "
|
|
2
|
-
import {JdbcCreateSteps} from "
|
|
3
|
-
import {ModalDialogSteps} from "
|
|
4
|
-
import {YasqeSteps} from "
|
|
1
|
+
import {JdbcSteps} from "../../../steps/setup/jdbc-steps";
|
|
2
|
+
import {JdbcCreateSteps} from "../../../steps/setup/jdbc-create-steps";
|
|
3
|
+
import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
|
|
4
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
5
|
+
import {JdbcStubs} from "../../../stubs/jdbc/jdbc-stubs";
|
|
6
|
+
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
5
7
|
|
|
6
8
|
const FILE_TO_IMPORT = '200-row-allianz.ttl';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
" \tex:customerLoyalty ?customer_loyalty_id.\n" +
|
|
17
|
-
" ?customer_loyalty_id rdfs:label ?customer_loyalty.\n" +
|
|
18
|
-
" # !filter\n" +
|
|
19
|
-
"} ";
|
|
9
|
+
|
|
10
|
+
// The closing brace is intentionally omitted because when cypress types in the query, the editor will automatically add it.
|
|
11
|
+
const EDIT_QUERY = `
|
|
12
|
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
13
|
+
SELECT ?id ?label {
|
|
14
|
+
?id rdfs:label ?label
|
|
15
|
+
#!filter
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
20
18
|
|
|
21
19
|
describe('JDBC configuration', () => {
|
|
22
20
|
|
|
@@ -34,7 +32,7 @@ describe('JDBC configuration', () => {
|
|
|
34
32
|
cy.deleteRepository(repositoryId);
|
|
35
33
|
});
|
|
36
34
|
|
|
37
|
-
it('Should
|
|
35
|
+
it('Should be able to cancel JDBC configuration creation', () => {
|
|
38
36
|
// When I am on JDBC configurations page and click on create a new table configuration button.
|
|
39
37
|
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
40
38
|
|
|
@@ -82,6 +80,7 @@ describe('JDBC configuration', () => {
|
|
|
82
80
|
// When I click on edit button,
|
|
83
81
|
JdbcSteps.clickOnEditButton();
|
|
84
82
|
// change the query,
|
|
83
|
+
YasqeSteps.clearEditor();
|
|
85
84
|
YasqeSteps.pasteQuery(EDIT_QUERY);
|
|
86
85
|
// and click on save button.
|
|
87
86
|
JdbcCreateSteps.clickOnSave();
|
|
@@ -112,13 +111,6 @@ describe('JDBC configuration', () => {
|
|
|
112
111
|
// When I click on delete button.
|
|
113
112
|
JdbcSteps.clickOnDeleteButton();
|
|
114
113
|
|
|
115
|
-
// Then I expect to be asked to confirm the deletion,
|
|
116
|
-
// and click on cancel dialog button.
|
|
117
|
-
ModalDialogSteps.clickOnCancelButton();
|
|
118
|
-
|
|
119
|
-
// When I click on delete button.
|
|
120
|
-
JdbcSteps.clickOnDeleteButton();
|
|
121
|
-
|
|
122
114
|
// Then I expect to be asked to confirm the deletion,
|
|
123
115
|
// and when click on confirm dialog button.
|
|
124
116
|
ModalDialogSteps.clickOnConfirmButton();
|
|
@@ -127,4 +119,43 @@ describe('JDBC configuration', () => {
|
|
|
127
119
|
JdbcSteps.getJDBCConfigurations().should('contain', 'No tables are defined');
|
|
128
120
|
});
|
|
129
121
|
|
|
122
|
+
it('Should show error notification on server error during jdbc configuration creation', () => {
|
|
123
|
+
// Given that the server will return an error on saving the JDBC configuration
|
|
124
|
+
JdbcStubs.stubJdbcCreateError();
|
|
125
|
+
// And I have configured a new JDBC configuration
|
|
126
|
+
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
127
|
+
JdbcCreateSteps.verifyUrl();
|
|
128
|
+
JdbcCreateSteps.typeTableName('JdbcTest');
|
|
129
|
+
JdbcCreateSteps.openColumnTypesTab();
|
|
130
|
+
JdbcCreateSteps.getColumnSuggestionRows().should('have.length', 2);
|
|
131
|
+
// When I click on save button.
|
|
132
|
+
JdbcCreateSteps.clickOnSave();
|
|
133
|
+
// Then I expect to see a notification with the error message.
|
|
134
|
+
ApplicationSteps.getErrorNotifications().should('contain', 'Could not save SQL table configuration');
|
|
135
|
+
// And the configuration to not be created.
|
|
136
|
+
cy.url().should('include', '/jdbc/configuration/create');
|
|
137
|
+
JdbcCreateSteps.getSaveButton().should('be.visible').and('be.enabled');
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('Should show error notification on server error during jdbc configuration creation', () => {
|
|
141
|
+
// Given that the server will return an error on saving the JDBC configuration
|
|
142
|
+
JdbcStubs.stubJdbcUpdateError();
|
|
143
|
+
// And I have configured and saved a new JDBC configuration
|
|
144
|
+
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
145
|
+
JdbcCreateSteps.verifyUrl();
|
|
146
|
+
JdbcCreateSteps.typeTableName('JdbcTest2');
|
|
147
|
+
JdbcCreateSteps.openColumnTypesTab();
|
|
148
|
+
JdbcCreateSteps.getColumnSuggestionRows().should('have.length', 2);
|
|
149
|
+
JdbcCreateSteps.clickOnSave();
|
|
150
|
+
JdbcSteps.verifyUrl();
|
|
151
|
+
JdbcSteps.getJDBCConfigurationResults().should('have.length', 1);
|
|
152
|
+
// When I edit the configuration
|
|
153
|
+
JdbcSteps.clickOnEditButton();
|
|
154
|
+
YasqeSteps.clearEditor();
|
|
155
|
+
YasqeSteps.pasteQuery(EDIT_QUERY);
|
|
156
|
+
// And click on save button.
|
|
157
|
+
JdbcCreateSteps.clickOnSave();
|
|
158
|
+
// Then I expect to see a notification with the error message.
|
|
159
|
+
ApplicationSteps.getErrorNotifications().should('contain', 'Could not save SQL table configuration');
|
|
160
|
+
});
|
|
130
161
|
});
|