graphdb-workbench-tests 2.8.1-TR1 → 2.8.2-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 +2 -1
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/integration/repository/repositories.spec.js +39 -0
- package/integration/setup/aclmanagement/create-rule.spec.js +31 -2
- package/integration/setup/plugins.spec.js +5 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/repository-steps.js +14 -0
package/fixtures/locale-en.json
CHANGED
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
"loading_rules": "Error during ACL rules",
|
|
270
270
|
"updating_rules": "Error during ACL rules update",
|
|
271
271
|
"duplicated_rules": "Every ACL rule should be unique.",
|
|
272
|
-
"role_length_too_short": "Too short"
|
|
272
|
+
"role_length_too_short": "Too short or not \"*\""
|
|
273
273
|
},
|
|
274
274
|
"defaults": {
|
|
275
275
|
"asterisk": "* - Any RDF value",
|
|
@@ -1755,6 +1755,7 @@
|
|
|
1755
1755
|
"delete.repo.warning.msg": "<p>Are you sure you want to delete the repository <strong>{{repositoryId}}</strong>?</p><p><span class=\"icon-2x icon-warning\" style=\"color: var(--primary-color-dark)\"></span>All data in the repository will be lost.</p>",
|
|
1756
1756
|
"confirm.restart.repo": "Confirm restart",
|
|
1757
1757
|
"confirm.restart.repo.warning.msg": "<p>Are you sure you want to restart the repository <strong>{{repositoryId}}</strong>?</p><p><span class=\"icon-2x icon-warning\" style=\"color: var(--primary-color-dark)\"></span>The repository will be shut down immediately and all running queries and updates will be cancelled.</p>",
|
|
1758
|
+
"restart.repo.in.cluster.tooltip": "Restarting a repository is not supported in a cluster environment. To apply configuration changes, restart all cluster nodes.",
|
|
1758
1759
|
"location.cannot.be.empty.error": "Location cannot be empty",
|
|
1759
1760
|
"required.field": "This field is required",
|
|
1760
1761
|
"created.repo.success.msg": "The repository {{repoId}} has been created.",
|
|
@@ -0,0 +1,34 @@
|
|
|
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://localhost:7201": [
|
|
19
|
+
{
|
|
20
|
+
"id": "movies",
|
|
21
|
+
"title": "",
|
|
22
|
+
"uri": "http://localhost:7202/repositories/movies",
|
|
23
|
+
"externalUrl": "http://localhost:7202/repositories/movies",
|
|
24
|
+
"local": false,
|
|
25
|
+
"type": "graphdb",
|
|
26
|
+
"sesameType": "graphdb:SailRepository",
|
|
27
|
+
"location": "http://localhost:7202",
|
|
28
|
+
"readable": true,
|
|
29
|
+
"writable": true,
|
|
30
|
+
"unsupported": false,
|
|
31
|
+
"state": "RUNNING"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -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
|
|
|
@@ -503,6 +505,43 @@ describe('Repositories', () => {
|
|
|
503
505
|
ModalDialogSteps.verifyDialogBody('Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.');
|
|
504
506
|
});
|
|
505
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
|
+
|
|
506
545
|
function interceptRulesetFileUpload() {
|
|
507
546
|
cy.intercept(
|
|
508
547
|
{
|
|
@@ -211,6 +211,10 @@ describe('ACL Management: create rule', () => {
|
|
|
211
211
|
AclManagementSteps.addRuleInBeginning();
|
|
212
212
|
AclManagementSteps.selectPolicy(0, 'allow');
|
|
213
213
|
AclManagementSteps.fillRole(0, 'A');
|
|
214
|
+
// And I expect the prefix warning to NOT appear
|
|
215
|
+
AclManagementSteps.getPrefixWarning(0).should('not.exist');
|
|
216
|
+
// And I expect the prefix warning icon to NOT appear
|
|
217
|
+
AclManagementSteps.getWarningIcon(0).should('not.exist');
|
|
214
218
|
AclManagementSteps.selectOperation(0, 'write');
|
|
215
219
|
AclManagementSteps.fillSubject(0, '<urn:Mary>');
|
|
216
220
|
AclManagementSteps.fillPredicate(0, '*');
|
|
@@ -218,14 +222,39 @@ describe('ACL Management: create rule', () => {
|
|
|
218
222
|
AclManagementSteps.fillContext(0, '*');
|
|
219
223
|
|
|
220
224
|
// Then I expect an error notification to be displayed that tells me this ROLE length is not allowed
|
|
221
|
-
AclManagementSteps.getFieldError().contains('Too short');
|
|
225
|
+
AclManagementSteps.getFieldError().contains('Too short or not "*"');
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it('should allow creating a new rule if CUSTOM ROLE is a wildcard (*)', () => {
|
|
229
|
+
// Given I have a defined number of rules at the beginning
|
|
230
|
+
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
231
|
+
// When I am on "ACL Management" page and create a new rule with a CUSTOM ROLE of 1 symbol (a wildcard)
|
|
232
|
+
AclManagementSteps.addRuleInBeginning();
|
|
233
|
+
AclManagementSteps.selectPolicy(0, 'allow');
|
|
234
|
+
AclManagementSteps.fillRole(0, '*');
|
|
235
|
+
AclManagementSteps.selectOperation(0, 'write');
|
|
236
|
+
AclManagementSteps.fillSubject(0, '<urn:Mary>');
|
|
237
|
+
AclManagementSteps.fillPredicate(0, '*');
|
|
238
|
+
AclManagementSteps.fillObject(0, '*');
|
|
239
|
+
AclManagementSteps.fillContext(0, '*');
|
|
240
|
+
|
|
241
|
+
// Then I expect to not see an error
|
|
242
|
+
AclManagementSteps.getFieldError().should('not.exist');
|
|
243
|
+
// When I save the rule
|
|
244
|
+
AclManagementSteps.saveRule(0);
|
|
245
|
+
// When I save the rules
|
|
246
|
+
AclManagementSteps.saveAcl();
|
|
247
|
+
// Then the table should contain the new rule
|
|
248
|
+
AclManagementSteps.getSavedRoleField(0).should('contain', '*');
|
|
249
|
+
AclManagementSteps.getAclRules().should('have.length', 6);
|
|
222
250
|
});
|
|
223
251
|
|
|
224
252
|
it('should show message if role prefix is CUSTOM_', () => {
|
|
225
253
|
// When I am on "ACL Management" page and create a new rule with a CUSTOM_ prefix
|
|
226
254
|
AclManagementSteps.addRuleInBeginning();
|
|
227
255
|
AclManagementSteps.selectPolicy(0, 'allow');
|
|
228
|
-
|
|
256
|
+
// When I enter the prefix in lowercase, the logic should still detect it
|
|
257
|
+
AclManagementSteps.fillRole(0, 'custom_ROLE_FOO');
|
|
229
258
|
|
|
230
259
|
// Then I expect the prefix warning to appear
|
|
231
260
|
AclManagementSteps.getPrefixWarning(0).should('be.visible');
|
|
@@ -12,6 +12,8 @@ describe('Plugins view', () => {
|
|
|
12
12
|
cy.presetRepository(repositoryId);
|
|
13
13
|
cy.initializeRepository(repositoryId);
|
|
14
14
|
LicenseStubs.spyGetLicense();
|
|
15
|
+
PluginsStubs.spyPluginsGet(repositoryId);
|
|
16
|
+
PluginsSteps.visit();
|
|
15
17
|
});
|
|
16
18
|
|
|
17
19
|
afterEach(() => {
|
|
@@ -19,8 +21,6 @@ describe('Plugins view', () => {
|
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
it('Should allow to enable and disable the plugins', () => {
|
|
22
|
-
PluginsStubs.spyPluginsGet(repositoryId);
|
|
23
|
-
PluginsSteps.visit();
|
|
24
24
|
cy.wait('@get-license');
|
|
25
25
|
cy.wait('@get-plugins');
|
|
26
26
|
PluginsSteps.waitUntilPluginsPageIsLoaded();
|
|
@@ -31,9 +31,10 @@ describe('Plugins view', () => {
|
|
|
31
31
|
PluginsSteps.getPluginSwitchField('history').should('be.checked');
|
|
32
32
|
PluginsSteps.togglePlugin('history');
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
cy.reload();
|
|
35
35
|
cy.wait('@get-plugins');
|
|
36
|
-
|
|
36
|
+
PluginsSteps.waitUntilPluginsPageIsLoaded();
|
|
37
|
+
PluginsSteps.getPluginsView().should('be.visible');
|
|
37
38
|
PluginsSteps.getPluginByName('history').should('be.visible');
|
|
38
39
|
PluginsSteps.getPluginSwitchField('history').should('not.be.checked');
|
|
39
40
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2-TR1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "2.8.
|
|
9
|
+
"version": "2.8.2-TR1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
|
@@ -85,6 +85,16 @@ export class RepositorySteps {
|
|
|
85
85
|
RepositorySteps.clickRepositoryIcon(repositoryId, '.repository-actions .restart-repository-btn');
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
static getEditViewRestartButton() {
|
|
89
|
+
return cy.get('#restartRepo');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static getRepositoryRestartButton(repositoryId) {
|
|
93
|
+
return RepositorySteps.getRepositoryFromList(repositoryId)
|
|
94
|
+
.should('be.visible')
|
|
95
|
+
.find('.repository-actions .restart-repository-btn');
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
static createRepository() {
|
|
89
99
|
RepositorySteps.getCreateRepositoryButton().click();
|
|
90
100
|
}
|
|
@@ -265,6 +275,10 @@ export class RepositorySteps {
|
|
|
265
275
|
RepositorySteps.getEditSparqlInstanceBtn(row).click();
|
|
266
276
|
}
|
|
267
277
|
|
|
278
|
+
static getRestartRemoteRepoButton(row) {
|
|
279
|
+
return this.getRemoteGraphDBTable().eq(row).find('.repository-actions .restart-repository-btn');
|
|
280
|
+
}
|
|
281
|
+
|
|
268
282
|
static getRemoteGraphDBTable() {
|
|
269
283
|
return cy.get('#wb-locations-locationInGetRemoteLocations');
|
|
270
284
|
}
|