graphdb-workbench-tests 3.4.0-TR6 → 3.4.0-TR8
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/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +30 -5
- package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
- package/npm-shrinkwrap.json +8 -8
- package/package.json +1 -1
- package/steps/repositories/attach-repository-steps.js +16 -0
- package/steps/visual-graph-steps.js +4 -0
- package/stubs/cluster/remote-location-stubs.js +4 -0
- package/support/repository-commands.js +19 -0
|
@@ -43,12 +43,14 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
43
43
|
|
|
44
44
|
// Then, I expect to see the visual graph with the default linksLimit
|
|
45
45
|
BaseSteps.getUrl().should('include', `linksLimit=${DEFAULT_LINKS_LIMIT}`);
|
|
46
|
-
|
|
46
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have less than that
|
|
47
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
47
48
|
|
|
48
49
|
// When, I update the link limit from the input field
|
|
49
50
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// Then I limit shown warning to exist,since we have more than 5 links
|
|
52
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
53
|
+
// And I expect the URL to include the updated linksLimit in the URL
|
|
52
54
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
53
55
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
54
56
|
VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
|
|
@@ -98,12 +100,18 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
98
100
|
VisualGraphSteps.openGraphConfig(configName);
|
|
99
101
|
|
|
100
102
|
// Then, I expect to see 10 nodes before changing the limit
|
|
101
|
-
BaseSteps.getUrl().should('include', 'linksLimit=
|
|
103
|
+
BaseSteps.getUrl().should('include', 'linksLimit=100');
|
|
102
104
|
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
103
105
|
|
|
106
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
|
|
107
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
108
|
+
|
|
104
109
|
// When, I update the link limit from the input field
|
|
105
110
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
106
111
|
|
|
112
|
+
// Then I limit shown warning to exist, since we have more than 5 links available
|
|
113
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
114
|
+
|
|
107
115
|
// Then I expect the URL to include the updated linksLimit in the URL
|
|
108
116
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
109
117
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
@@ -125,9 +133,12 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
125
133
|
VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
|
|
126
134
|
|
|
127
135
|
// Then, I expect to see 10 nodes before changing the limit
|
|
128
|
-
BaseSteps.getUrl().should('include', 'linksLimit=
|
|
136
|
+
BaseSteps.getUrl().should('include', 'linksLimit=100');
|
|
129
137
|
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
130
138
|
|
|
139
|
+
// And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
|
|
140
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
141
|
+
|
|
131
142
|
// When, I update the link limit from the input field
|
|
132
143
|
VisualGraphSteps.updateLinksLimitField(5);
|
|
133
144
|
|
|
@@ -135,6 +146,20 @@ describe('Visual graph linksLimit URL parameter', () => {
|
|
|
135
146
|
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
136
147
|
// And, I expect to see the visual graph with the updated linksLimit
|
|
137
148
|
VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
|
|
149
|
+
|
|
150
|
+
// And, the limit shown warning should appear as we are showing the limit
|
|
151
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
152
|
+
|
|
153
|
+
// When, I set the limit to the number of nodes from the query
|
|
154
|
+
VisualGraphSteps.updateLinksLimitField(10);
|
|
155
|
+
|
|
156
|
+
// Then I expect limit shown warning to exist
|
|
157
|
+
VisualGraphSteps.getShownLimitMessage().should('exist');
|
|
158
|
+
|
|
159
|
+
// When I set it to 1 more than the number of nodes from the query
|
|
160
|
+
VisualGraphSteps.updateLinksLimitField(11);
|
|
161
|
+
// Then I expect the limit shown warning to not exist
|
|
162
|
+
VisualGraphSteps.getShownLimitMessage().should('not.exist');
|
|
138
163
|
});
|
|
139
164
|
});
|
|
140
165
|
});
|
|
@@ -2,13 +2,21 @@ import {RepositorySteps} from "../../steps/repository-steps";
|
|
|
2
2
|
import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-steps";
|
|
3
3
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
4
4
|
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
5
|
+
import {RemoteLocationStubs} from '../../stubs/cluster/remote-location-stubs.js';
|
|
5
6
|
|
|
6
7
|
describe('Attach remote location', () => {
|
|
8
|
+
let remoteLocationName;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
remoteLocationName = 'http://location-' + Date.now();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
cy.deleteRemoteLocation(remoteLocationName);
|
|
16
|
+
})
|
|
7
17
|
|
|
8
18
|
it('Should create and delete remote instance', () => {
|
|
9
|
-
|
|
10
|
-
RepositorySteps.waitLoader();
|
|
11
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
19
|
+
RepositorySteps.visit();
|
|
12
20
|
|
|
13
21
|
// When I open the "Attach a remote instance" dialog.
|
|
14
22
|
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
@@ -114,12 +122,43 @@ describe('Attach remote location', () => {
|
|
|
114
122
|
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
115
123
|
});
|
|
116
124
|
|
|
125
|
+
it('should be able to create a remote location with encrypted password', () => {
|
|
126
|
+
// Given I have a running GDB instance and I am on the Repositories view
|
|
127
|
+
RepositorySteps.visit();
|
|
128
|
+
// When I start the location creation
|
|
129
|
+
AttachRepositorySteps.openAttachRemoteLocationDialog();
|
|
130
|
+
AttachRepositorySteps.enterURL(remoteLocationName);
|
|
131
|
+
// And I select basic auth type
|
|
132
|
+
AttachRepositorySteps.selectBasicRadioBtn();
|
|
133
|
+
// Then I expect to see a security warning
|
|
134
|
+
AttachRepositorySteps.getUnencryptedPasswordWarning().should('be.visible');
|
|
135
|
+
// And I should not see the warning for the backward compatibility issues when encrypting the password
|
|
136
|
+
AttachRepositorySteps.getBackwardCompatibilityWarning().should('not.exist');
|
|
137
|
+
// When I select to encrypt the password
|
|
138
|
+
AttachRepositorySteps.encryptPassword();
|
|
139
|
+
// Then I should see the backward compatibility warning
|
|
140
|
+
AttachRepositorySteps.getBackwardCompatibilityWarning().should('be.visible');
|
|
141
|
+
// And the unencrypted password warning should not be visible
|
|
142
|
+
AttachRepositorySteps.getUnencryptedPasswordWarning().should('not.exist');
|
|
143
|
+
// When I fill in username and password
|
|
144
|
+
AttachRepositorySteps.enterUsername('locationadmin');
|
|
145
|
+
AttachRepositorySteps.enterPassword('admin123');
|
|
146
|
+
// And I save the location
|
|
147
|
+
RemoteLocationStubs.spyRemoteLocationCreate();
|
|
148
|
+
AttachRepositorySteps.attachRemoteLocation();
|
|
149
|
+
// Then encrypt password flag should be sent
|
|
150
|
+
cy.wait('@add-remote-location')
|
|
151
|
+
.its('request.body')
|
|
152
|
+
.should('include', {
|
|
153
|
+
encryptPassword: true,
|
|
154
|
+
username: 'locationadmin'
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
|
|
117
158
|
it('Should render different location types in separate tables: error, location with and without repositories', () => {
|
|
118
159
|
RepositoriesStubs.stubRepositories();
|
|
119
160
|
RepositoriesStubs.stubLocations();
|
|
120
|
-
|
|
121
|
-
RepositorySteps.waitLoader();
|
|
122
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
161
|
+
RepositorySteps.visit();
|
|
123
162
|
cy.wait('@get-all-repositories');
|
|
124
163
|
|
|
125
164
|
// When I open the Repositories view that contains all possible kind of locations.
|
|
@@ -137,9 +176,7 @@ describe('Attach remote location', () => {
|
|
|
137
176
|
});
|
|
138
177
|
|
|
139
178
|
it('Should be able to open edit remote location dialog', () => {
|
|
140
|
-
|
|
141
|
-
RepositorySteps.waitLoader();
|
|
142
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
179
|
+
RepositorySteps.visit();
|
|
143
180
|
|
|
144
181
|
const locationId = 'http://local';
|
|
145
182
|
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
|
@@ -161,9 +198,7 @@ describe('Attach remote location', () => {
|
|
|
161
198
|
});
|
|
162
199
|
|
|
163
200
|
it('Should create and delete SPARQL endpoint instance', () => {
|
|
164
|
-
|
|
165
|
-
RepositorySteps.waitLoader();
|
|
166
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
201
|
+
RepositorySteps.visit();
|
|
167
202
|
|
|
168
203
|
const locationId = 'http://endpoint/repo/ex';
|
|
169
204
|
addRemoteSPARQLLocation(locationId, 'username', 'password');
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.4.0-
|
|
3
|
+
"version": "3.4.0-TR8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.4.0-
|
|
9
|
+
"version": "3.4.0-TR8",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
@@ -1071,9 +1071,9 @@
|
|
|
1071
1071
|
}
|
|
1072
1072
|
},
|
|
1073
1073
|
"node_modules/@babel/plugin-transform-modules-systemjs": {
|
|
1074
|
-
"version": "7.29.
|
|
1075
|
-
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.
|
|
1076
|
-
"integrity": "sha512-
|
|
1074
|
+
"version": "7.29.4",
|
|
1075
|
+
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.4.tgz",
|
|
1076
|
+
"integrity": "sha512-N7QmZ0xRZfjHOfZeQLJjwgX2zS9pdGHSVl/cjSGlo4dXMqvurfxXDMKY4RqEKzPozV78VMcd0lxyG13mlbKc4w==",
|
|
1077
1077
|
"dev": true,
|
|
1078
1078
|
"license": "MIT",
|
|
1079
1079
|
"dependencies": {
|
|
@@ -5420,9 +5420,9 @@
|
|
|
5420
5420
|
"license": "MIT"
|
|
5421
5421
|
},
|
|
5422
5422
|
"node_modules/fast-uri": {
|
|
5423
|
-
"version": "3.1.
|
|
5424
|
-
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.
|
|
5425
|
-
"integrity": "sha512-
|
|
5423
|
+
"version": "3.1.2",
|
|
5424
|
+
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
|
|
5425
|
+
"integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
|
|
5426
5426
|
"dev": true,
|
|
5427
5427
|
"funding": [
|
|
5428
5428
|
{
|
package/package.json
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export class AttachRepositorySteps {
|
|
2
2
|
|
|
3
|
+
static getRemoteLocationSettingsForm() {
|
|
4
|
+
return cy.get('#remoteLocationForm');
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
static getAttachRemoteLocationBtn() {
|
|
4
8
|
return cy.get('#addAttachRemoteLocation');
|
|
5
9
|
}
|
|
@@ -115,4 +119,16 @@ export class AttachRepositorySteps {
|
|
|
115
119
|
static clearPassword() {
|
|
116
120
|
AttachRepositorySteps.getPasswordInput().clear();
|
|
117
121
|
}
|
|
122
|
+
|
|
123
|
+
static getUnencryptedPasswordWarning() {
|
|
124
|
+
return this.getRemoteLocationSettingsForm().find('.unencrypted-password-warning');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static getBackwardCompatibilityWarning() {
|
|
128
|
+
return this.getRemoteLocationSettingsForm().find('.backward-compatibility-warning');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static encryptPassword() {
|
|
132
|
+
this.getRemoteLocationSettingsForm().find('#encryptPassword').check();
|
|
133
|
+
}
|
|
118
134
|
}
|
|
@@ -411,6 +411,10 @@ export class VisualGraphSteps extends BaseSteps {
|
|
|
411
411
|
return this.getByTestId('invalid-links-limit');
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
static getShownLimitMessage() {
|
|
415
|
+
return this.getByTestId('shown-links-limit');
|
|
416
|
+
}
|
|
417
|
+
|
|
414
418
|
static openVisualGraphHome() {
|
|
415
419
|
cy.get('.toolbar-holder').should('be.visible')
|
|
416
420
|
.find('.return-home-btn').should('be.visible').click();
|
|
@@ -7,6 +7,10 @@ export class RemoteLocationStubs extends Stubs {
|
|
|
7
7
|
}).as('add-remote-location');
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
static spyRemoteLocationCreate() {
|
|
11
|
+
cy.intercept('POST', '/rest/locations').as('add-remote-location');
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
static stubGetRemoteLocations(count = 'no') {
|
|
11
15
|
cy.intercept('GET', '/rest/locations', {
|
|
12
16
|
fixture: `/remote-location/get-${count}-remote-locations.json`,
|
|
@@ -78,6 +78,25 @@ Cypress.Commands.add('initializeRepository', (id) => {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* A command for deleting remote locations by URI. It sends a DELETE request to the appropriate endpoint and waits until
|
|
83
|
+
* the response is received.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} uri - The URI of the remote location to be deleted.
|
|
86
|
+
*/
|
|
87
|
+
Cypress.Commands.add('deleteRemoteLocation', (uri) => {
|
|
88
|
+
cy.request({
|
|
89
|
+
method: 'DELETE',
|
|
90
|
+
url: '/rest/locations?uri=' + encodeURIComponent(uri),
|
|
91
|
+
headers: {
|
|
92
|
+
'Content-Type': 'application/json'
|
|
93
|
+
},
|
|
94
|
+
failOnStatusCode: false
|
|
95
|
+
}).then((response) => {
|
|
96
|
+
cy.waitUntil(() => response);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
81
100
|
Cypress.Commands.add('enableAutocomplete', (repositoryId) => {
|
|
82
101
|
toggleAutocomplete(repositoryId, true);
|
|
83
102
|
});
|