graphdb-workbench-tests 4.0.0-TR5 → 4.0.0-TR7
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-flaky/import/import-server-files-operations.spec.js +1 -23
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +7 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
- package/e2e-legacy/import/import-server-files.spec.js +3 -5
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +0 -39
- package/e2e-legacy/import/import-user-data-url.spec.js +6 -3
- package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
- package/e2e-legacy/reactodia/reactodia.spec.js +122 -0
- package/e2e-legacy/resource/resource.spec.js +176 -39
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
- package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
- package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
- package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +1 -1
- package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
- package/fixtures/cluster/cluster-config-with-tag.json +17 -0
- package/fixtures/graphdb-import/wine.rdf +279 -285
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/error-steps.js +1 -1
- package/steps/import/import-test-constants.js +1 -1
- package/steps/main-menu-steps.js +9 -0
- package/steps/reactodia-steps.js +42 -0
- package/steps/resource/resource-steps.js +72 -5
- package/steps/setup/acl-management-steps.js +3 -23
- package/stubs/cluster/cluster-stubs.js +7 -0
- package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
- package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
- package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {AclManagementSteps} from "../../../steps/setup/acl-management-steps";
|
|
2
|
+
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
3
|
+
|
|
4
|
+
describe('ACL Management: IRI validation', () => {
|
|
5
|
+
|
|
6
|
+
let repositoryId;
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
cy.deleteRepository(repositoryId);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
repositoryId = 'acl-management-' + Date.now();
|
|
14
|
+
cy.createRepository({id: repositoryId});
|
|
15
|
+
cy.presetRepository(repositoryId);
|
|
16
|
+
cy.initializeRepository(repositoryId);
|
|
17
|
+
cy.enableAutocomplete(repositoryId);
|
|
18
|
+
AclManagementSteps.visit();
|
|
19
|
+
ApplicationSteps.getLoader().should('not.exist');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Fills in all the fields required for the rule to be otherwise valid, except the subject,
|
|
24
|
+
* so that only the subject's own validity determines whether the rule can be saved.
|
|
25
|
+
* @param {number} index
|
|
26
|
+
*/
|
|
27
|
+
const fillMandatoryFieldsExceptSubject = (index) => {
|
|
28
|
+
AclManagementSteps.fillRole(index, 'ROLE1');
|
|
29
|
+
AclManagementSteps.selectPolicy(index, 'allow');
|
|
30
|
+
AclManagementSteps.selectOperation(index, 'write');
|
|
31
|
+
AclManagementSteps.fillPredicate(index, '*');
|
|
32
|
+
AclManagementSteps.fillObject(index, '*');
|
|
33
|
+
AclManagementSteps.fillContext(index, '*');
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
it('should mark the subject field as invalid and block saving when an absolute http IRI is typed without angle brackets', () => {
|
|
37
|
+
// When I create a new rule and type an absolute http IRI without wrapping it in angle brackets
|
|
38
|
+
AclManagementSteps.addRuleInBeginning();
|
|
39
|
+
fillMandatoryFieldsExceptSubject(0);
|
|
40
|
+
AclManagementSteps.fillSubject(0, 'http://example.com/John');
|
|
41
|
+
|
|
42
|
+
// Then I expect the field to be marked as invalid
|
|
43
|
+
AclManagementSteps.getSubjectField(0).should('have.class', 'invalid');
|
|
44
|
+
// And I expect saving the rule to be forbidden
|
|
45
|
+
AclManagementSteps.checkIfRuleSavingIsForbidden(0);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should mark the subject field as valid and allow saving once the http IRI is wrapped in angle brackets', () => {
|
|
49
|
+
// When I create a new rule and type a properly wrapped absolute http IRI
|
|
50
|
+
AclManagementSteps.addRuleInBeginning();
|
|
51
|
+
fillMandatoryFieldsExceptSubject(0);
|
|
52
|
+
AclManagementSteps.fillSubject(0, '<http://example.com/John>');
|
|
53
|
+
|
|
54
|
+
// Then I expect the field to be marked as valid
|
|
55
|
+
AclManagementSteps.getSubjectField(0).should('not.have.class', 'invalid');
|
|
56
|
+
// And I expect saving the rule to be allowed
|
|
57
|
+
AclManagementSteps.checkIfRuleSavingIsAllowed(0);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should mark the subject field as invalid for a urn IRI without angle brackets and valid once wrapped', () => {
|
|
61
|
+
// When I create a new rule and type a urn IRI without angle brackets
|
|
62
|
+
AclManagementSteps.addRuleInBeginning();
|
|
63
|
+
fillMandatoryFieldsExceptSubject(0);
|
|
64
|
+
AclManagementSteps.fillSubject(0, 'urn:John');
|
|
65
|
+
|
|
66
|
+
// Then I expect the field to be marked as invalid
|
|
67
|
+
AclManagementSteps.getSubjectField(0).should('have.class', 'invalid');
|
|
68
|
+
AclManagementSteps.checkIfRuleSavingIsForbidden(0);
|
|
69
|
+
|
|
70
|
+
// When I wrap the same urn IRI in angle brackets
|
|
71
|
+
AclManagementSteps.fillSubject(0, '<urn:John>');
|
|
72
|
+
|
|
73
|
+
// Then I expect the field to become valid
|
|
74
|
+
AclManagementSteps.getSubjectField(0).should('not.have.class', 'invalid');
|
|
75
|
+
AclManagementSteps.checkIfRuleSavingIsAllowed(0);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('should keep the wildcard (*) value valid', () => {
|
|
79
|
+
// When I create a new rule and use the wildcard value for the subject
|
|
80
|
+
AclManagementSteps.addRuleInBeginning();
|
|
81
|
+
fillMandatoryFieldsExceptSubject(0);
|
|
82
|
+
AclManagementSteps.fillSubject(0, '*');
|
|
83
|
+
|
|
84
|
+
// Then I expect the field to remain valid
|
|
85
|
+
AclManagementSteps.getSubjectField(0).should('not.have.class', 'invalid');
|
|
86
|
+
AclManagementSteps.checkIfRuleSavingIsAllowed(0);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('should still query autocomplete suggestions for an absolute IRI typed without angle brackets', () => {
|
|
90
|
+
// Given I intercept the autocomplete suggestions requests
|
|
91
|
+
cy.intercept('GET', '**/rest/autocomplete/query*').as('autocompleteQuery');
|
|
92
|
+
|
|
93
|
+
// When I create a new rule and type an absolute http IRI without angle brackets
|
|
94
|
+
AclManagementSteps.addRuleInBeginning();
|
|
95
|
+
fillMandatoryFieldsExceptSubject(0);
|
|
96
|
+
AclManagementSteps.fillSubject(0, 'http://example.com/resource/John');
|
|
97
|
+
|
|
98
|
+
// Then I expect the autocomplete request to still be triggered, searching only by the
|
|
99
|
+
// local name within the detected namespace (namespace and local name joined by ";")
|
|
100
|
+
cy.wait('@autocompleteQuery');
|
|
101
|
+
cy.get('@autocompleteQuery.all').then((interceptions) => {
|
|
102
|
+
const lastCall = interceptions[interceptions.length - 1];
|
|
103
|
+
const url = new URL(lastCall.request.url);
|
|
104
|
+
expect(url.searchParams.get('q')).to.eq('http://example.com/resource/;John');
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('should reject a triple term value for a plain field validated only as an IRI', () => {
|
|
109
|
+
// Predicate only allows validate-uri/validate-default-value, so a triple term is not a valid value there
|
|
110
|
+
AclManagementSteps.addRuleInBeginning();
|
|
111
|
+
AclManagementSteps.fillRole(0, 'ROLE1');
|
|
112
|
+
AclManagementSteps.selectPolicy(0, 'allow');
|
|
113
|
+
AclManagementSteps.selectOperation(0, 'write');
|
|
114
|
+
AclManagementSteps.fillSubject(0, '*');
|
|
115
|
+
AclManagementSteps.fillObject(0, '*');
|
|
116
|
+
AclManagementSteps.fillContext(0, '*');
|
|
117
|
+
AclManagementSteps.fillPredicate(0, '<<(<http://example.com/a> <http://example.com/b> "c")>>');
|
|
118
|
+
|
|
119
|
+
AclManagementSteps.getPredicateField(0).should('have.class', 'invalid');
|
|
120
|
+
AclManagementSteps.checkIfRuleSavingIsForbidden(0);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('should accept a triple term value for the object field, where it is allowed', () => {
|
|
124
|
+
// Only the object field is configured with validate-triple-term-value="true"
|
|
125
|
+
AclManagementSteps.addRuleInBeginning();
|
|
126
|
+
AclManagementSteps.fillRole(0, 'ROLE1');
|
|
127
|
+
AclManagementSteps.selectPolicy(0, 'allow');
|
|
128
|
+
AclManagementSteps.selectOperation(0, 'write');
|
|
129
|
+
AclManagementSteps.fillSubject(0, '*');
|
|
130
|
+
AclManagementSteps.fillPredicate(0, '*');
|
|
131
|
+
AclManagementSteps.fillContext(0, '*');
|
|
132
|
+
AclManagementSteps.fillObject(0, '<<(<http://example.com/a> <http://example.com/b> "c")>>');
|
|
133
|
+
|
|
134
|
+
AclManagementSteps.getObjectField(0).should('not.have.class', 'invalid');
|
|
135
|
+
AclManagementSteps.checkIfRuleSavingIsAllowed(0);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it('should reject a malformed triple term value (missing closing brackets) for the object field', () => {
|
|
139
|
+
AclManagementSteps.addRuleInBeginning();
|
|
140
|
+
AclManagementSteps.fillRole(0, 'ROLE1');
|
|
141
|
+
AclManagementSteps.selectPolicy(0, 'allow');
|
|
142
|
+
AclManagementSteps.selectOperation(0, 'write');
|
|
143
|
+
AclManagementSteps.fillSubject(0, '*');
|
|
144
|
+
AclManagementSteps.fillPredicate(0, '*');
|
|
145
|
+
AclManagementSteps.fillContext(0, '*');
|
|
146
|
+
AclManagementSteps.fillObject(0, '<<(<http://example.com/a> <http://example.com/b> "c")');
|
|
147
|
+
|
|
148
|
+
AclManagementSteps.getObjectField(0).should('have.class', 'invalid');
|
|
149
|
+
AclManagementSteps.checkIfRuleSavingIsForbidden(0);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
@@ -280,7 +280,7 @@ describe('User and Access', () => {
|
|
|
280
280
|
LoginSteps.loginWithUser('admin', DEFAULT_ADMIN_PASSWORD);
|
|
281
281
|
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
282
282
|
|
|
283
|
-
cy.visit('/login?r=%
|
|
283
|
+
cy.visit('/login?r=%2Fsparql');
|
|
284
284
|
cy.reload();
|
|
285
285
|
UserAndAccessSteps.getUrl().should('include', '/sparql');
|
|
286
286
|
});
|
|
@@ -44,13 +44,10 @@ describe('Download results', () => {
|
|
|
44
44
|
|
|
45
45
|
// Then expect follow options to be present.
|
|
46
46
|
YasrSteps.getDownloadAsOption(0).contains('JSON');
|
|
47
|
-
YasrSteps.getDownloadAsOption(1).contains( '
|
|
48
|
-
YasrSteps.getDownloadAsOption(2).contains( '
|
|
49
|
-
YasrSteps.getDownloadAsOption(3).contains( '
|
|
50
|
-
YasrSteps.getDownloadAsOption(4).contains( '
|
|
51
|
-
YasrSteps.getDownloadAsOption(5).contains( 'TSV');
|
|
52
|
-
YasrSteps.getDownloadAsOption(6).contains( 'TSV*');
|
|
53
|
-
YasrSteps.getDownloadAsOption(7).contains( 'Binary RDF Results');
|
|
47
|
+
YasrSteps.getDownloadAsOption(1).contains( 'XML');
|
|
48
|
+
YasrSteps.getDownloadAsOption(2).contains( 'CSV');
|
|
49
|
+
YasrSteps.getDownloadAsOption(3).contains( 'TSV');
|
|
50
|
+
YasrSteps.getDownloadAsOption(4).contains( 'Binary RDF Results');
|
|
54
51
|
});
|
|
55
52
|
|
|
56
53
|
it('should download as JSON-LD after a CONSTRUCT query', () => {
|
|
@@ -19,7 +19,6 @@ describe('User and Access', () => {
|
|
|
19
19
|
repositoryId2 = 'user-access-repo2-' + Date.now();
|
|
20
20
|
cy.createRepository({id: repositoryId1});
|
|
21
21
|
cy.createRepository({id: repositoryId2});
|
|
22
|
-
cy.presetRepository(repositoryId1);
|
|
23
22
|
UserAndAccessSteps.visit();
|
|
24
23
|
// Users table should be visible
|
|
25
24
|
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"electionMinTimeout": 8000,
|
|
3
|
+
"electionRangeTimeout": 6000,
|
|
4
|
+
"heartbeatInterval": 2000,
|
|
5
|
+
"messageSizeKB": 64,
|
|
6
|
+
"verificationTimeout": 1500,
|
|
7
|
+
"transactionLogMaximumSizeGB": 50.0,
|
|
8
|
+
"batchUpdateInterval": 5000,
|
|
9
|
+
"nodes": [
|
|
10
|
+
"pc-desktop:7302",
|
|
11
|
+
"pc-desktop:7300",
|
|
12
|
+
"pc-desktop:7301"
|
|
13
|
+
],
|
|
14
|
+
"primaryTags": [
|
|
15
|
+
"test"
|
|
16
|
+
]
|
|
17
|
+
}
|