graphdb-workbench-tests 2.7.2 → 2.8.0-TR1
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/fixtures/locale-en.json +1 -0
- package/fixtures/repositories/get-locations.json +72 -0
- package/fixtures/repositories/get-repositories.json +106 -0
- package/integration/cluster/cluster-management.spec.js +22 -0
- package/integration/import/import-server-files.spec.js +2 -2
- package/integration/import/import-user-data-file-upload.spec.js +35 -1
- package/integration/repository/attach-remote-location.spec.js +154 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/import/import-resource-message-dialog.js +4 -23
- package/steps/import/import-settings-dialog-steps.js +20 -0
- package/steps/modal-dialog-steps.js +6 -2
- package/steps/repositories/attach-repository-steps.js +85 -0
- package/steps/repository-steps.js +28 -0
- package/stubs/repositories/repositories-stubs.js +11 -0
package/fixtures/locale-en.json
CHANGED
|
@@ -1522,6 +1522,7 @@
|
|
|
1522
1522
|
"password.required": "Password*",
|
|
1523
1523
|
"my.password.placeholder": "my-password",
|
|
1524
1524
|
"signature.auth.info": "Signature authentication uses the token secret, which must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
|
|
1525
|
+
"signature.cluster.auth.info": "The token secret must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
|
|
1525
1526
|
"signature.auth.info.last": " in the documentation.",
|
|
1526
1527
|
"update.file.content.header": "Update file contents",
|
|
1527
1528
|
"update.file.edit.content.header": "Edit \"{{fileName}}\" contents",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"uri": "http://local",
|
|
4
|
+
"label": "Remote Ontopic Instance (http://local)",
|
|
5
|
+
"username": "username",
|
|
6
|
+
"password": "password",
|
|
7
|
+
"authType": "basic",
|
|
8
|
+
"locationType": "ONTOPIC",
|
|
9
|
+
"active": false,
|
|
10
|
+
"local": false,
|
|
11
|
+
"system": false,
|
|
12
|
+
"errorMsg": null,
|
|
13
|
+
"defaultRepository": null,
|
|
14
|
+
"isInCluster": false
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"uri": "http://localhost:7212",
|
|
18
|
+
"label": "Remote (http://localhost:7212)",
|
|
19
|
+
"username": null,
|
|
20
|
+
"password": null,
|
|
21
|
+
"authType": "none",
|
|
22
|
+
"locationType": "GDB",
|
|
23
|
+
"active": false,
|
|
24
|
+
"local": false,
|
|
25
|
+
"system": false,
|
|
26
|
+
"errorMsg": "Cannot connect to location Connect to localhost:7212 [localhost/127.0.0.1] failed: Connection refused (Connection refused) (Connect to localhost:7212 [localhost/127.0.0.1] failed: Connection refused (Connection refused)).",
|
|
27
|
+
"defaultRepository": null,
|
|
28
|
+
"isInCluster": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"uri": "",
|
|
32
|
+
"label": "Local",
|
|
33
|
+
"username": null,
|
|
34
|
+
"password": null,
|
|
35
|
+
"authType": "none",
|
|
36
|
+
"locationType": null,
|
|
37
|
+
"active": true,
|
|
38
|
+
"local": true,
|
|
39
|
+
"system": true,
|
|
40
|
+
"errorMsg": null,
|
|
41
|
+
"defaultRepository": null,
|
|
42
|
+
"isInCluster": false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"uri": "http://localhost:7201",
|
|
46
|
+
"label": "Remote (http://localhost:7201)",
|
|
47
|
+
"username": null,
|
|
48
|
+
"password": null,
|
|
49
|
+
"authType": "none",
|
|
50
|
+
"locationType": "GDB",
|
|
51
|
+
"active": false,
|
|
52
|
+
"local": false,
|
|
53
|
+
"system": false,
|
|
54
|
+
"errorMsg": null,
|
|
55
|
+
"defaultRepository": null,
|
|
56
|
+
"isInCluster": false
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"uri": "http://localhost:7202",
|
|
60
|
+
"label": "Remote (http://localhost:7202)",
|
|
61
|
+
"username": null,
|
|
62
|
+
"password": null,
|
|
63
|
+
"authType": "none",
|
|
64
|
+
"locationType": "GDB",
|
|
65
|
+
"active": false,
|
|
66
|
+
"local": false,
|
|
67
|
+
"system": false,
|
|
68
|
+
"errorMsg": null,
|
|
69
|
+
"defaultRepository": null,
|
|
70
|
+
"isInCluster": false
|
|
71
|
+
}
|
|
72
|
+
]
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"": [
|
|
3
|
+
{
|
|
4
|
+
"id": "test",
|
|
5
|
+
"title": "",
|
|
6
|
+
"uri": "http://localhost:8080/graphdb/repositories/test",
|
|
7
|
+
"externalUrl": "http://boyantonchev:9000/repositories/test",
|
|
8
|
+
"local": true,
|
|
9
|
+
"type": "graphdb",
|
|
10
|
+
"sesameType": "graphdb:SailRepository",
|
|
11
|
+
"location": "",
|
|
12
|
+
"readable": true,
|
|
13
|
+
"writable": true,
|
|
14
|
+
"unsupported": false,
|
|
15
|
+
"state": "RUNNING"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"http://ghh": [],
|
|
19
|
+
"http://localhost:7201": [],
|
|
20
|
+
"http://localhost:7202": [
|
|
21
|
+
{
|
|
22
|
+
"id": "movies",
|
|
23
|
+
"title": "",
|
|
24
|
+
"uri": "http://localhost:7202/repositories/movies",
|
|
25
|
+
"externalUrl": "http://localhost:7202/repositories/movies",
|
|
26
|
+
"local": false,
|
|
27
|
+
"type": "graphdb",
|
|
28
|
+
"sesameType": "graphdb:SailRepository",
|
|
29
|
+
"location": "http://localhost:7202",
|
|
30
|
+
"readable": true,
|
|
31
|
+
"writable": true,
|
|
32
|
+
"unsupported": false,
|
|
33
|
+
"state": "RUNNING"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "configurations",
|
|
37
|
+
"title": "",
|
|
38
|
+
"uri": "http://localhost:7202/repositories/configurations",
|
|
39
|
+
"externalUrl": "http://localhost:7202/repositories/configurations",
|
|
40
|
+
"local": false,
|
|
41
|
+
"type": "graphdb",
|
|
42
|
+
"sesameType": "graphdb:SailRepository",
|
|
43
|
+
"location": "http://localhost:7202",
|
|
44
|
+
"readable": true,
|
|
45
|
+
"writable": true,
|
|
46
|
+
"unsupported": false,
|
|
47
|
+
"state": "RUNNING"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "schedules",
|
|
51
|
+
"title": "",
|
|
52
|
+
"uri": "http://localhost:7202/repositories/schedules",
|
|
53
|
+
"externalUrl": "http://localhost:7202/repositories/schedules",
|
|
54
|
+
"local": false,
|
|
55
|
+
"type": "graphdb",
|
|
56
|
+
"sesameType": "graphdb:SailRepository",
|
|
57
|
+
"location": "http://localhost:7202",
|
|
58
|
+
"readable": true,
|
|
59
|
+
"writable": true,
|
|
60
|
+
"unsupported": false,
|
|
61
|
+
"state": "RUNNING"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "statuses",
|
|
65
|
+
"title": "",
|
|
66
|
+
"uri": "http://localhost:7202/repositories/statuses",
|
|
67
|
+
"externalUrl": "http://localhost:7202/repositories/statuses",
|
|
68
|
+
"local": false,
|
|
69
|
+
"type": "graphdb",
|
|
70
|
+
"sesameType": "graphdb:SailRepository",
|
|
71
|
+
"location": "http://localhost:7202",
|
|
72
|
+
"readable": true,
|
|
73
|
+
"writable": true,
|
|
74
|
+
"unsupported": false,
|
|
75
|
+
"state": "RUNNING"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "home-repository-1716184222365",
|
|
79
|
+
"title": "",
|
|
80
|
+
"uri": "http://localhost:7202/repositories/home-repository-1716184222365",
|
|
81
|
+
"externalUrl": "http://localhost:7202/repositories/home-repository-1716184222365",
|
|
82
|
+
"local": false,
|
|
83
|
+
"type": "graphdb",
|
|
84
|
+
"sesameType": "graphdb:SailRepository",
|
|
85
|
+
"location": "http://localhost:7202",
|
|
86
|
+
"readable": true,
|
|
87
|
+
"writable": true,
|
|
88
|
+
"unsupported": false,
|
|
89
|
+
"state": "RUNNING"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "repository-1716184200859",
|
|
93
|
+
"title": "",
|
|
94
|
+
"uri": "http://localhost:7202/repositories/repository-1716184200859",
|
|
95
|
+
"externalUrl": "http://localhost:7202/repositories/repository-1716184200859",
|
|
96
|
+
"local": false,
|
|
97
|
+
"type": "graphdb",
|
|
98
|
+
"sesameType": "graphdb:SailRepository",
|
|
99
|
+
"location": "http://localhost:7202",
|
|
100
|
+
"readable": true,
|
|
101
|
+
"writable": true,
|
|
102
|
+
"unsupported": false,
|
|
103
|
+
"state": "RUNNING"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
@@ -187,6 +187,28 @@ describe('Cluster management', () => {
|
|
|
187
187
|
ReplaceNodesDialogSteps.getDialog().should('not.exist');
|
|
188
188
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
189
189
|
});
|
|
190
|
+
|
|
191
|
+
it('Should not see "Authentication type" while attaching remote GDB node in cluster view', () => {
|
|
192
|
+
// Given I have opened the cluster management page
|
|
193
|
+
ClusterPageSteps.visit();
|
|
194
|
+
|
|
195
|
+
// When there is no cluster configured yet
|
|
196
|
+
ClusterStubs.stubNoClusterGroupStatus();
|
|
197
|
+
ClusterStubs.stubNoClusterNodeStatus();
|
|
198
|
+
ClusterStubs.stubNoClusterConfig();
|
|
199
|
+
RemoteLocationStubs.stubAddRemoteLocation();
|
|
200
|
+
RemoteLocationStubs.stubGetRemoteLocations(0);
|
|
201
|
+
|
|
202
|
+
// When I open the create cluster dialog
|
|
203
|
+
ClusterPageSteps.getClusterPage().should('be.visible');
|
|
204
|
+
ClusterPageSteps.createCluster();
|
|
205
|
+
CreateClusterDialogSteps.getDialog().should('be.visible');
|
|
206
|
+
// And I add a remote location
|
|
207
|
+
RemoteLocationStubs.stubRemoteLocationCheck();
|
|
208
|
+
CreateClusterDialogSteps.openAddRemoteLocationDialog();
|
|
209
|
+
AddRemoteLocationDialogSteps.getDialog().should('be.visible');
|
|
210
|
+
AddRemoteLocationDialogSteps.verifyDialogBody("The token secret must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ");
|
|
211
|
+
});
|
|
190
212
|
});
|
|
191
213
|
|
|
192
214
|
function addRemoteLocation(location, locationsCount) {
|
|
@@ -124,13 +124,13 @@ describe('Import server files', () => {
|
|
|
124
124
|
ImportServerFilesSteps.openErrorDialog(importResourceName);
|
|
125
125
|
|
|
126
126
|
// Then I expect to see dialog,
|
|
127
|
-
|
|
127
|
+
ImportResourceMessageDialog.getDialog().should('be.visible');
|
|
128
128
|
|
|
129
129
|
// with full error message
|
|
130
130
|
ImportResourceMessageDialog.getMessage().should('have.value', 'RDF Parse Error: The element type "ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame" must be terminated by the matching end-tag "</ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>". [line 9, column 6]');
|
|
131
131
|
|
|
132
132
|
// When I click on corner close button.
|
|
133
|
-
ImportResourceMessageDialog.
|
|
133
|
+
ImportResourceMessageDialog.close();
|
|
134
134
|
|
|
135
135
|
// // Then I expect the dialog closed
|
|
136
136
|
ImportResourceMessageDialog.getDialog().should('not.exist');
|
|
@@ -47,6 +47,40 @@ describe('Import user data: File upload', () => {
|
|
|
47
47
|
// Then I should see the uploaded file
|
|
48
48
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
49
49
|
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
50
|
+
// When I try to import the same file again
|
|
51
|
+
ImportUserDataSteps.importFile(0);
|
|
52
|
+
// Then I should not see the upload only option
|
|
53
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
54
|
+
ImportSettingsDialogSteps.getUploadOnlyButton().should('not.exist');
|
|
55
|
+
ImportSettingsDialogSteps.getCancelUploadButton().should('be.visible');
|
|
56
|
+
ImportSettingsDialogSteps.import();
|
|
57
|
+
ImportSettingsDialogSteps.getDialog().should('not.exist');
|
|
58
|
+
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
59
|
+
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('Should be able to cancel the file upload', () => {
|
|
63
|
+
// Given there are no files uploaded yet
|
|
64
|
+
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
65
|
+
// And I have selected to upload a file
|
|
66
|
+
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
67
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
68
|
+
// When I cancel the file upload via the cancel button
|
|
69
|
+
ImportSettingsDialogSteps.cancelUpload();
|
|
70
|
+
// Then the file upload dialog should close
|
|
71
|
+
ImportSettingsDialogSteps.getDialog().should('not.exist');
|
|
72
|
+
// And there should be no files uploaded
|
|
73
|
+
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
74
|
+
// When I select to upload a file again
|
|
75
|
+
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
76
|
+
// Then the import settings dialog should open
|
|
77
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
78
|
+
// And I close the file upload dialog via the close button
|
|
79
|
+
ImportSettingsDialogSteps.close();
|
|
80
|
+
// Then the file upload dialog should close
|
|
81
|
+
ImportSettingsDialogSteps.getDialog().should('not.exist');
|
|
82
|
+
// And there should be no files uploaded
|
|
83
|
+
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
50
84
|
});
|
|
51
85
|
|
|
52
86
|
it('Should allow replacing graph when uploading and importing single file', () => {
|
|
@@ -97,7 +131,7 @@ describe('Import user data: File upload', () => {
|
|
|
97
131
|
// When I start to upload a file
|
|
98
132
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
99
133
|
// Then the import settings dialog should open automatically
|
|
100
|
-
ImportSettingsDialogSteps.
|
|
134
|
+
ImportSettingsDialogSteps.uploadOnly();
|
|
101
135
|
// Then I should see the uploaded file
|
|
102
136
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
103
137
|
ImportUserDataSteps.checkUserDataUploadedResource(0, 'bnodes.ttl');
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {RepositorySteps} from "../../steps/repository-steps";
|
|
2
|
+
import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-steps";
|
|
3
|
+
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
4
|
+
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
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
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Should create and delete remote instance', () => {
|
|
16
|
+
// When I open the "Attach a remote instance" dialog.
|
|
17
|
+
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
18
|
+
|
|
19
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because location URL is mandatory
|
|
20
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
21
|
+
// and authentication type to be "None". This is default location type.
|
|
22
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'No authentication will be used with this location.');
|
|
23
|
+
// I expect GraphDB type be selected
|
|
24
|
+
AttachRepositorySteps.getGraphDBRadioBtn().should('be.checked');
|
|
25
|
+
|
|
26
|
+
// When I fill wrong location URL
|
|
27
|
+
AttachRepositorySteps.getLocationURLInput().type("Wrong URL");
|
|
28
|
+
|
|
29
|
+
// Then I expect to see error message
|
|
30
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Note that the location should be a URL that points to a remote GraphDB installation,');
|
|
31
|
+
|
|
32
|
+
// When I clear the wrong URL
|
|
33
|
+
AttachRepositorySteps.getLocationURLInput().clear();
|
|
34
|
+
|
|
35
|
+
// Then I expect to see an error message that states the location is required.
|
|
36
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Location URL is required.');
|
|
37
|
+
|
|
38
|
+
// When I fill correct URL
|
|
39
|
+
AttachRepositorySteps.getLocationURLInput().type("http://loc");
|
|
40
|
+
|
|
41
|
+
// Then I expect the "Attach" button to be enabled
|
|
42
|
+
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
43
|
+
|
|
44
|
+
// When I switch to basic authentication
|
|
45
|
+
AttachRepositorySteps.selectBasicRadioBtn();
|
|
46
|
+
|
|
47
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because Username and Password are mandatory
|
|
48
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
49
|
+
|
|
50
|
+
// When I fill Username
|
|
51
|
+
AttachRepositorySteps.getUsernameInput().type('username');
|
|
52
|
+
|
|
53
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because Password is mandatory
|
|
54
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
55
|
+
|
|
56
|
+
// When I fill password
|
|
57
|
+
AttachRepositorySteps.getPasswordInput().type('password');
|
|
58
|
+
// Then I expect the "Attach" button to be enabled
|
|
59
|
+
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
60
|
+
|
|
61
|
+
// When I remove the Username and Password and
|
|
62
|
+
AttachRepositorySteps.getUsernameInput().clear();
|
|
63
|
+
AttachRepositorySteps.getPasswordInput().clear();
|
|
64
|
+
// switch to Signature authentication type
|
|
65
|
+
AttachRepositorySteps.selectSignatureRadioBtn();
|
|
66
|
+
|
|
67
|
+
// Then I expect the "Attach" button to be enabled, because only location URL is mandatory
|
|
68
|
+
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
69
|
+
|
|
70
|
+
// When I clear the location URL
|
|
71
|
+
AttachRepositorySteps.getLocationURLInput().clear();
|
|
72
|
+
|
|
73
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because Location URL is mandatory
|
|
74
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
75
|
+
|
|
76
|
+
// When I switch to Ontopic instance
|
|
77
|
+
AttachRepositorySteps.selectOntopicRadioBtn();
|
|
78
|
+
// Then I expect the "Attach" button to be disabled (not clickable), because Location URL, ClienatId and Secret are mandatory
|
|
79
|
+
AttachRepositorySteps.getAttachBtn().should('be.disabled');
|
|
80
|
+
|
|
81
|
+
// When I fill wrong location URL
|
|
82
|
+
AttachRepositorySteps.getLocationURLInput().type("Wrong URL");
|
|
83
|
+
|
|
84
|
+
// Then I expect to see error message
|
|
85
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Note that the location should be a URL that points to a remote Ontopic installation,');
|
|
86
|
+
|
|
87
|
+
// When I clear the wrong URL
|
|
88
|
+
AttachRepositorySteps.getLocationURLInput().clear();
|
|
89
|
+
|
|
90
|
+
// Then I expect to see an error message that states the location is required.
|
|
91
|
+
AttachRepositorySteps.getRemoteLocationDialog().should('contain', 'Location URL is required.');
|
|
92
|
+
|
|
93
|
+
// When I fill all mandatory fields
|
|
94
|
+
AttachRepositorySteps.getLocationURLInput().type('http://local');
|
|
95
|
+
AttachRepositorySteps.getUsernameInput().type("username");
|
|
96
|
+
AttachRepositorySteps.getPasswordInput().type('password');
|
|
97
|
+
|
|
98
|
+
// Then I expect the "Attach" button to be enabled
|
|
99
|
+
AttachRepositorySteps.getAttachBtn().should('be.enabled');
|
|
100
|
+
|
|
101
|
+
// When I click the "Attach" button
|
|
102
|
+
AttachRepositorySteps.attachRemoteLocation();
|
|
103
|
+
|
|
104
|
+
// Then I expect location with URL "http://local" to be created
|
|
105
|
+
RepositorySteps.getOntopicTable().should('contain', 'http://local');
|
|
106
|
+
|
|
107
|
+
// When delete the created location
|
|
108
|
+
RepositorySteps.deleteOntopicInstance('http://local');
|
|
109
|
+
|
|
110
|
+
// I expect to see deleting confirmation dialog.
|
|
111
|
+
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to detach the location \'http://local\'?');
|
|
112
|
+
|
|
113
|
+
// When I confirm
|
|
114
|
+
ModalDialogSteps.getConfirmButton().click();
|
|
115
|
+
|
|
116
|
+
// Then I expect the location to be deleted.
|
|
117
|
+
RepositorySteps.getOntopicTable().should('not.exist');
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it('Should information be present for all location possible scenarios: error, location with and without repositories', () => {
|
|
121
|
+
// When I open the Repositories view that contains all possible kind of locations.
|
|
122
|
+
RepositoriesStubs.stubRepositories();
|
|
123
|
+
RepositoriesStubs.stubLocations();
|
|
124
|
+
|
|
125
|
+
// Then I expect to see the repositories from location GraphDb instance
|
|
126
|
+
RepositorySteps.getLocalGraphDBTable().contains('test · RUNNING');
|
|
127
|
+
// and a remote GraphDB instance with no repositories in it
|
|
128
|
+
RepositorySteps.getRemoteGraphDBTable().contains('There are no repositories in the current location');
|
|
129
|
+
// and a remote GrapDB instance with repositories
|
|
130
|
+
RepositorySteps.getRemoteGraphDBTable().contains('repository-1716184200859 · RUNNI');
|
|
131
|
+
// and a remote GraphDB instance with error in it
|
|
132
|
+
RepositorySteps.getRemoteGraphDBTable().contains('Cannot connect to location Connect to localhost:7212 [localhost/127.0.0.1] fa');
|
|
133
|
+
// and a remote Ontopic instance
|
|
134
|
+
RepositorySteps.getOntopicTable().contains('http://local');
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it('Should open edit remote location dialog', () => {
|
|
138
|
+
// When I open the Repositories view that contains all possible kind of locations.
|
|
139
|
+
RepositoriesStubs.stubRepositories();
|
|
140
|
+
RepositoriesStubs.stubLocations();
|
|
141
|
+
|
|
142
|
+
// When I click on edit ontopic istance
|
|
143
|
+
RepositorySteps.editOntopicInstance('http://local');
|
|
144
|
+
|
|
145
|
+
// Then I expect to see that Ontopic instance is set
|
|
146
|
+
AttachRepositorySteps.getOntopicRadioBtn().should('be.checked');
|
|
147
|
+
// And be disabled
|
|
148
|
+
AttachRepositorySteps.getOntopicRadioBtn().should('be.disabled');
|
|
149
|
+
// The location url be set
|
|
150
|
+
AttachRepositorySteps.getLocationURLInput().should('have.value', 'http://local');
|
|
151
|
+
// And be disabled
|
|
152
|
+
AttachRepositorySteps.getLocationURLInput().should('be.disabled');
|
|
153
|
+
});
|
|
154
|
+
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0-TR1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.8.0-TR1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import {ModalDialogSteps} from "../modal-dialog-steps";
|
|
2
2
|
|
|
3
|
+
export class ImportResourceMessageDialog extends ModalDialogSteps {
|
|
3
4
|
static getDialog() {
|
|
4
|
-
return
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
static getDialogHeader() {
|
|
8
|
-
return ImportResourceMessageDialog.getDialog().find('.modal-header');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static getCornerCloseButton() {
|
|
12
|
-
return ImportResourceMessageDialog.getDialogHeader().find('.close');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
static clickOnCornerCloseButton() {
|
|
16
|
-
ImportResourceMessageDialog.getCornerCloseButton().click();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getDialogBody() {
|
|
20
|
-
return ImportResourceMessageDialog.getDialog().find('.modal-body');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getDialogFooter() {
|
|
24
|
-
return ImportResourceMessageDialog.getDialog().find('.modal-footer');
|
|
5
|
+
return super.getDialog('.import-resource-message-dialog');
|
|
25
6
|
}
|
|
26
7
|
|
|
27
8
|
static getCloseButton() {
|
|
@@ -37,7 +18,7 @@ export class ImportResourceMessageDialog {
|
|
|
37
18
|
}
|
|
38
19
|
|
|
39
20
|
static getCopyToClipboard() {
|
|
40
|
-
return ImportResourceMessageDialog.getDialogFooter().find('.copy-to-clipboard-btn')
|
|
21
|
+
return ImportResourceMessageDialog.getDialogFooter().find('.copy-to-clipboard-btn');
|
|
41
22
|
}
|
|
42
23
|
|
|
43
24
|
static copyToClipboard() {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import {ModalDialogSteps} from "../modal-dialog-steps";
|
|
2
2
|
|
|
3
3
|
export class ImportSettingsDialogSteps extends ModalDialogSteps {
|
|
4
|
+
static getDialog() {
|
|
5
|
+
return super.getDialog('.import-settings-modal');
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
static getImportButton() {
|
|
5
9
|
return this.getDialog().find('.import-settings-import-button');
|
|
6
10
|
}
|
|
@@ -17,6 +21,22 @@ export class ImportSettingsDialogSteps extends ModalDialogSteps {
|
|
|
17
21
|
this.getCancelImportButton().click();
|
|
18
22
|
}
|
|
19
23
|
|
|
24
|
+
static getUploadOnlyButton() {
|
|
25
|
+
return this.getDialog().find('.upload-only-button');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static uploadOnly() {
|
|
29
|
+
this.getUploadOnlyButton().click();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getCancelUploadButton() {
|
|
33
|
+
return this.getDialog().find('.cancel-btn');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static cancelUpload() {
|
|
37
|
+
this.getCancelUploadButton().click();
|
|
38
|
+
}
|
|
39
|
+
|
|
20
40
|
static getSettingsForm() {
|
|
21
41
|
return this.getDialog().find('.settings-form');
|
|
22
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class ModalDialogSteps {
|
|
2
|
-
static getDialog() {
|
|
3
|
-
return cy.get(
|
|
2
|
+
static getDialog(cssClass = '.modal-dialog') {
|
|
3
|
+
return cy.get(cssClass);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
static getDialogHeader() {
|
|
@@ -15,6 +15,10 @@ export class ModalDialogSteps {
|
|
|
15
15
|
ModalDialogSteps.getCloseButton().click();
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
static close() {
|
|
19
|
+
this.clickOnCloseButton();
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
static getDialogBody() {
|
|
19
23
|
return ModalDialogSteps.getDialog().find('.modal-body');
|
|
20
24
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export class AttachRepositorySteps {
|
|
2
|
+
|
|
3
|
+
static getAttachRemoteLocationBtn() {
|
|
4
|
+
return cy.get('#addAttachRemoteLocation');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static openAttachRemoteLocationDialog() {
|
|
8
|
+
AttachRepositorySteps.getAttachRemoteLocationBtn().click();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getAttachBtn() {
|
|
12
|
+
return cy.get('.attach-location');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static attachRemoteLocation() {
|
|
16
|
+
AttachRepositorySteps.getAttachBtn().click();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static getCancelBtn() {
|
|
20
|
+
return cy.get('.cancel-attaching-location');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static cancelAttaching() {
|
|
24
|
+
AttachRepositorySteps.getCancelBtn().click();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static saveRemoteLocation() {
|
|
28
|
+
AttachRepositorySteps.getAttachBtn().click();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static getRemoteLocationDialog() {
|
|
32
|
+
return cy.get('#remoteLocationForm');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getAuthenticationRadioBtn() {
|
|
36
|
+
return AttachRepositorySteps.getRemoteLocationDialog().find('.none-authentication');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static selectAuthenticationRadioBtn() {
|
|
40
|
+
AttachRepositorySteps.getAuthenticationRadioBtn().check();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getBasicRadioBtn() {
|
|
44
|
+
return AttachRepositorySteps.getRemoteLocationDialog().find('.basic-authentication');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static selectBasicRadioBtn() {
|
|
48
|
+
AttachRepositorySteps.getBasicRadioBtn().check();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getSignatureRadioBtn() {
|
|
52
|
+
return AttachRepositorySteps.getRemoteLocationDialog().find('.signature-authentication');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static selectSignatureRadioBtn() {
|
|
56
|
+
AttachRepositorySteps.getSignatureRadioBtn().check();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static getGraphDBRadioBtn() {
|
|
60
|
+
return AttachRepositorySteps.getRemoteLocationDialog().find('.graph-db-instance');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static selectGraphDBRadioBtn() {
|
|
64
|
+
AttachRepositorySteps.getGraphDBRadioBtn().check();
|
|
65
|
+
}
|
|
66
|
+
static getOntopicRadioBtn() {
|
|
67
|
+
return AttachRepositorySteps.getRemoteLocationDialog().find('.ontopic-instance');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static selectOntopicRadioBtn() {
|
|
71
|
+
AttachRepositorySteps.getOntopicRadioBtn().check();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static getLocationURLInput() {
|
|
75
|
+
return AttachRepositorySteps.getRemoteLocationDialog().get('#location');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static getUsernameInput() {
|
|
79
|
+
return AttachRepositorySteps.getRemoteLocationDialog().get('#username');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static getPasswordInput() {
|
|
83
|
+
return AttachRepositorySteps.getRemoteLocationDialog().get('#password');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -206,4 +206,32 @@ export class RepositorySteps {
|
|
|
206
206
|
.and('contain', 'Repositories from: ')
|
|
207
207
|
.and('contain', 'Local');
|
|
208
208
|
}
|
|
209
|
+
|
|
210
|
+
static getOntopicTable() {
|
|
211
|
+
return cy.get('#wb-repositories-ontopic-repositoryInGetRepositories');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static getDeleteOntopicInstanceBtn(url) {
|
|
215
|
+
return RepositorySteps.getOntopicTable().find('tr').contains(url).parent().find('.delete-ontopic-location');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
static deleteOntopicInstance(url) {
|
|
219
|
+
RepositorySteps.getDeleteOntopicInstanceBtn(url).click();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
static getEditOntopicInstanceBtn(url) {
|
|
223
|
+
return RepositorySteps.getOntopicTable().find('tr').contains(url).parent().find('.edit-ontopic-location');
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static editOntopicInstance(url) {
|
|
227
|
+
RepositorySteps.getEditOntopicInstanceBtn(url).click();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
static getRemoteGraphDBTable() {
|
|
231
|
+
return cy.get('#wb-locations-locationInGetRemoteLocations');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
static getLocalGraphDBTable() {
|
|
235
|
+
return cy.get('#wb-locations-locationInGetLocations');
|
|
236
|
+
}
|
|
209
237
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {Stubs} from "../stubs";
|
|
2
|
+
|
|
3
|
+
export class RepositoriesStubs extends Stubs {
|
|
4
|
+
static stubRepositories(withDelay = 0) {
|
|
5
|
+
RepositoriesStubs.stubQueryResponse('/rest/repositories/all', '/repositories/get-repositories.json', 'backup-and-restore-response', withDelay);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static stubLocations(withDelay = 0) {
|
|
9
|
+
RepositoriesStubs.stubQueryResponse('/rest/locations?filterClusterLocations=true', '/repositories/get-locations.json', 'backup-and-restore-response', withDelay);
|
|
10
|
+
}
|
|
11
|
+
}
|