graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR21
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 +8 -30
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-flaky/sparql-editor/lucene-connector.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +27 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +31 -2
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
- package/e2e-legacy/graph-navigator/graph-navigator-restrictions.spec.js +216 -0
- package/e2e-legacy/graph-navigator/graph-navigator.spec.js +447 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/home/home-page-without-repositories.spec.js +3 -1
- package/e2e-legacy/home/home-page-without-selected-repository.spec.js +2 -1
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +38 -5
- package/e2e-legacy/import/import-server-files.spec.js +39 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +47 -22
- package/e2e-legacy/import/import-user-data-settings-dialog.spec.js +81 -10
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
- package/e2e-legacy/import/import-user-data-url.spec.js +9 -5
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
- package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
- package/e2e-legacy/repository/attach-remote-location.spec.js +7 -15
- package/e2e-legacy/repository/fedx-deprecation.spec.js +178 -0
- package/e2e-legacy/repository/ontop-repository.spec.js +25 -34
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +5 -1
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/repository/repository-picker-tooltip.spec.js +72 -0
- package/e2e-legacy/repository/repository-selector-tooltip.spec.js +55 -0
- package/e2e-legacy/resource/resource.spec.js +177 -40
- 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/connectors/connectors-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +1 -1
- package/e2e-legacy/setup/settings/my-settings.spec.js +25 -15
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +34 -25
- package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
- package/e2e-legacy/sparql-editor/sparql-editor-navigation.spec.js +219 -0
- package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +1 -1
- package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
- package/e2e-legacy/ttyg/create-agent.spec.js +6 -4
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
- package/e2e-security/setup/home/cookie-policy.spec.js +4 -0
- package/e2e-security/setup/license/license-loading.spec.js +57 -0
- package/e2e-security/setup/license/license-logout.spec.js +38 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +1 -1
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -1
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/fixtures/cluster/cluster-config-with-tag.json +17 -0
- package/fixtures/connectors/get-connectors.json +0 -1
- package/fixtures/graph-navigator/graph-navigator-settings-invalid.ttl +149 -0
- package/fixtures/graph-navigator/graph-navigator-settings.ttl +148 -0
- package/fixtures/graphdb-import/wine.rdf +279 -285
- package/npm-shrinkwrap.json +1283 -1643
- package/package.json +10 -1
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/cookie-policy/cookie-consent-banner-steps.js +2 -2
- package/steps/error-steps.js +2 -2
- package/steps/explore/graphs-overview-steps.js +44 -0
- package/steps/graph-navigator-steps.js +145 -0
- package/steps/header-steps.js +5 -1
- package/steps/home-steps.js +3 -6
- package/steps/import/import-server-files-steps.js +8 -0
- package/steps/import/import-settings-dialog-steps.js +16 -0
- package/steps/import/import-steps.js +88 -17
- package/steps/import/import-test-constants.js +1 -1
- package/steps/import/import-user-data-steps.js +24 -24
- package/steps/language-selector-steps.js +4 -0
- package/steps/layout-steps.js +6 -0
- package/steps/login-steps.js +7 -3
- package/steps/main-menu-steps.js +14 -14
- package/steps/ontop-repository-steps.js +4 -0
- package/steps/page-restrictions-steps.js +24 -0
- package/steps/repositories/attach-repository-steps.js +2 -10
- package/steps/repository-picker-list-steps.js +58 -0
- package/steps/repository-selector-steps.js +20 -0
- package/steps/repository-steps.js +48 -9
- package/steps/resource/resource-steps.js +76 -9
- package/steps/setup/acl-management-steps.js +4 -24
- package/steps/setup/settings-steps.js +42 -0
- package/steps/setup/user-and-access-steps.js +18 -14
- package/steps/toaster-steps.js +4 -0
- package/steps/ttyg/ttyg-view-steps.js +1 -14
- package/steps/visual-graph-steps.js +8 -0
- package/steps/widgets/repository-errors-widget-steps.js +15 -2
- package/steps/yasgui/yasqe-steps.js +3 -1
- package/steps/yasgui/yasr-steps.js +8 -0
- package/stubs/browser-stubs.js +40 -0
- package/stubs/cluster/cluster-stubs.js +15 -1
- package/stubs/graph-navigator-stubs.js +27 -0
- package/stubs/license-stubs.js +11 -3
- package/stubs/repositories/repositories-stubs.js +44 -0
- package/stubs/yasgui/query-stubs.js +5 -0
- package/support/visual-graph-commands.js +19 -0
- package/e2e-legacy/home/solr-banner/solr-banner.spec.js +0 -137
- 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
- package/steps/deprecation-banner/deprecation-banner-steps.js +0 -13
- package/steps/deprecation-steps.js +0 -13
|
@@ -27,16 +27,16 @@ describe('ACL Management: create rule', () => {
|
|
|
27
27
|
|
|
28
28
|
it('Should add a new rule in the beginning of the list and cancel operation', () => {
|
|
29
29
|
AclManagementSteps.addRuleInBeginning();
|
|
30
|
-
AclManagementSteps.getAclRules().should('have.length', 6);
|
|
31
|
-
AclManagementSteps.cancelRuleEditing(0);
|
|
32
30
|
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
31
|
+
AclManagementSteps.cancelRuleEditing(0);
|
|
32
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it('Should add a new rule in the list and cancel operation', () => {
|
|
36
36
|
AclManagementSteps.addRule(1);
|
|
37
|
-
AclManagementSteps.getAclRules().should('have.length', 6);
|
|
38
|
-
AclManagementSteps.cancelRuleEditing(2);
|
|
39
37
|
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
38
|
+
AclManagementSteps.cancelRuleEditing(2);
|
|
39
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it('Should add a new rule in the list', () => {
|
|
@@ -80,7 +80,7 @@ describe('ACL Management: create rule', () => {
|
|
|
80
80
|
// When I save the rule
|
|
81
81
|
AclManagementSteps.saveRule(2);
|
|
82
82
|
// Then the rule should be saved
|
|
83
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
83
|
+
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
84
84
|
const newRule = {
|
|
85
85
|
"scope": "statement",
|
|
86
86
|
"policy": "deny",
|
|
@@ -93,7 +93,7 @@ describe('ACL Management: create rule', () => {
|
|
|
93
93
|
"moveUp": true,
|
|
94
94
|
"moveDown": true
|
|
95
95
|
};
|
|
96
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], newRule, ACL_VIEW[2], ACL_VIEW[3]
|
|
96
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], newRule, ACL_VIEW[2], ACL_VIEW[3]]);
|
|
97
97
|
|
|
98
98
|
cy.intercept('PUT', '/rest/repositories/acl-management-*/acl').as('putCall');
|
|
99
99
|
// When I save the rules
|
|
@@ -134,17 +134,6 @@ describe('ACL Management: create rule', () => {
|
|
|
134
134
|
"context": "*",
|
|
135
135
|
"warnForPrefix": false
|
|
136
136
|
},
|
|
137
|
-
{
|
|
138
|
-
"scope": "statement",
|
|
139
|
-
"policy": "deny",
|
|
140
|
-
"role": "CUSTOM_ROLE3",
|
|
141
|
-
"operation": "read",
|
|
142
|
-
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
143
|
-
"predicate": "*",
|
|
144
|
-
"object": "\"test aber auf Deutsch\"@en",
|
|
145
|
-
"context": "<http://example.com/graph1>",
|
|
146
|
-
"warnForPrefix": false
|
|
147
|
-
},
|
|
148
137
|
{
|
|
149
138
|
"scope": "statement",
|
|
150
139
|
"policy": "allow",
|
|
@@ -163,7 +152,7 @@ describe('ACL Management: create rule', () => {
|
|
|
163
152
|
"operation": "write",
|
|
164
153
|
"subject": "<urn:Cat>",
|
|
165
154
|
"predicate": "*",
|
|
166
|
-
"object": "
|
|
155
|
+
"object": "<<( <http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de )>>",
|
|
167
156
|
"context": "*",
|
|
168
157
|
"warnForPrefix": false
|
|
169
158
|
}
|
|
@@ -175,11 +164,11 @@ describe('ACL Management: create rule', () => {
|
|
|
175
164
|
it('Should hide all unnecessary actions during rule creation', () => {
|
|
176
165
|
// When there is no rule opened for edit
|
|
177
166
|
// Then I expect that move up, move down, edit rule, create rule, delete rule buttons to be visible
|
|
178
|
-
AclManagementSteps.getMoveUpButtons().should('have.length',
|
|
179
|
-
AclManagementSteps.getMoveDownButtons().should('have.length',
|
|
180
|
-
AclManagementSteps.deleteRuleButtons().should('have.length',
|
|
181
|
-
AclManagementSteps.editRuleButtons().should('have.length',
|
|
182
|
-
AclManagementSteps.createRuleButtons().should('have.length',
|
|
167
|
+
AclManagementSteps.getMoveUpButtons().should('have.length', 3);
|
|
168
|
+
AclManagementSteps.getMoveDownButtons().should('have.length', 3);
|
|
169
|
+
AclManagementSteps.deleteRuleButtons().should('have.length', 4);
|
|
170
|
+
AclManagementSteps.editRuleButtons().should('have.length', 4);
|
|
171
|
+
AclManagementSteps.createRuleButtons().should('have.length', 4);
|
|
183
172
|
// When a rule is in edit mode
|
|
184
173
|
AclManagementSteps.addRule(1);
|
|
185
174
|
// Then I expect that move up, move down, edit rule, create rule, delete rule buttons to be hidden
|
|
@@ -228,7 +217,7 @@ describe('ACL Management: create rule', () => {
|
|
|
228
217
|
|
|
229
218
|
it('should allow creating a new rule if CUSTOM ROLE is a wildcard (*)', () => {
|
|
230
219
|
// Given I have a defined number of rules at the beginning
|
|
231
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
220
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
232
221
|
// When I am on "ACL Management" page and create a new rule with a CUSTOM ROLE of 1 symbol (a wildcard)
|
|
233
222
|
AclManagementSteps.addRuleInBeginning();
|
|
234
223
|
AclManagementSteps.selectPolicy(0, 'allow');
|
|
@@ -247,7 +236,7 @@ describe('ACL Management: create rule', () => {
|
|
|
247
236
|
AclManagementSteps.saveAcl();
|
|
248
237
|
// Then the table should contain the new rule
|
|
249
238
|
AclManagementSteps.getSavedRoleField(0).should('contain', '*');
|
|
250
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
239
|
+
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
251
240
|
});
|
|
252
241
|
|
|
253
242
|
it('should show message if role prefix is CUSTOM_', () => {
|
|
@@ -26,7 +26,7 @@ describe('ACL Management: delete rule', () => {
|
|
|
26
26
|
|
|
27
27
|
it('Should be able to delete rule', () => {
|
|
28
28
|
// When I try to remove a rule
|
|
29
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
29
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
30
30
|
AclManagementSteps.deleteRule(0);
|
|
31
31
|
// Then I expect a confirmation dialog
|
|
32
32
|
ModalDialogSteps.getDialog().should('be.visible');
|
|
@@ -35,14 +35,14 @@ describe('ACL Management: delete rule', () => {
|
|
|
35
35
|
ModalDialogSteps.clickOnCancelButton();
|
|
36
36
|
// Then I expect the rule to remain in the list
|
|
37
37
|
ModalDialogSteps.getDialog().should('not.exist');
|
|
38
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
38
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
39
39
|
// When I try remove it again and confirm the operation
|
|
40
|
-
AclManagementSteps.deleteRule(
|
|
41
|
-
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #
|
|
40
|
+
AclManagementSteps.deleteRule(3);
|
|
41
|
+
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #4?');
|
|
42
42
|
ModalDialogSteps.clickOnConfirmButton();
|
|
43
43
|
// Then I expect the rule to be removed from the list
|
|
44
44
|
ModalDialogSteps.getDialog().should('not.exist');
|
|
45
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
46
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], ACL_VIEW[2]
|
|
45
|
+
AclManagementSteps.getAclRules().should('have.length', 3);
|
|
46
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], ACL_VIEW[2]]);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -26,11 +26,11 @@ describe('ACL Management: edit rule', () => {
|
|
|
26
26
|
it('Should hide all unnecessary actions during rule editing', () => {
|
|
27
27
|
// When there is no rule opened for edit
|
|
28
28
|
// Then I expect that move up, move down, edit rule, create rule, delete rule buttons to be visible
|
|
29
|
-
AclManagementSteps.getMoveUpButtons().should('have.length',
|
|
30
|
-
AclManagementSteps.getMoveDownButtons().should('have.length',
|
|
31
|
-
AclManagementSteps.deleteRuleButtons().should('have.length',
|
|
32
|
-
AclManagementSteps.editRuleButtons().should('have.length',
|
|
33
|
-
AclManagementSteps.createRuleButtons().should('have.length',
|
|
29
|
+
AclManagementSteps.getMoveUpButtons().should('have.length', 3);
|
|
30
|
+
AclManagementSteps.getMoveDownButtons().should('have.length', 3);
|
|
31
|
+
AclManagementSteps.deleteRuleButtons().should('have.length', 4);
|
|
32
|
+
AclManagementSteps.editRuleButtons().should('have.length', 4);
|
|
33
|
+
AclManagementSteps.createRuleButtons().should('have.length', 4);
|
|
34
34
|
// When a rule is in edit mode
|
|
35
35
|
AclManagementSteps.editRule(1);
|
|
36
36
|
// Then I expect that move up, move down, edit rule, create rule, delete rule buttons to be hidden
|
|
@@ -43,23 +43,23 @@ describe('ACL Management: edit rule', () => {
|
|
|
43
43
|
|
|
44
44
|
it('Should be able to edit rule', () => {
|
|
45
45
|
// When I edit a rule
|
|
46
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
46
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
47
47
|
AclManagementSteps.editRule(2);
|
|
48
48
|
// Then I expect rule edit form to be opened
|
|
49
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
49
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
50
50
|
AclManagementSteps.checkRuleEditForm(2, {
|
|
51
|
-
subject:
|
|
52
|
-
predicate:
|
|
53
|
-
object:
|
|
54
|
-
context:
|
|
55
|
-
role:
|
|
56
|
-
policy:
|
|
51
|
+
subject: "*",
|
|
52
|
+
predicate: "*",
|
|
53
|
+
object: "\"15\"^^<http://www.w3.org/2001/XMLSchema#int>",
|
|
54
|
+
context: "*",
|
|
55
|
+
role: "ROLE3",
|
|
56
|
+
policy: "allow"
|
|
57
57
|
});
|
|
58
58
|
AclManagementSteps.checkIfRuleSavingIsAllowed(2);
|
|
59
59
|
// When I cancel the edit operation
|
|
60
60
|
AclManagementSteps.cancelRuleEditing(2);
|
|
61
61
|
// Then I expect that the rule will be opened in preview mode again with the same values
|
|
62
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
62
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
63
63
|
AclManagementSteps.checkStatementRules(ACL_VIEW);
|
|
64
64
|
// When I edit the rule again
|
|
65
65
|
AclManagementSteps.editRule(2);
|
|
@@ -84,7 +84,7 @@ describe('ACL Management: edit rule', () => {
|
|
|
84
84
|
object: '*',
|
|
85
85
|
context: '*'
|
|
86
86
|
};
|
|
87
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], editedRule, ACL_VIEW[3]
|
|
87
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], editedRule, ACL_VIEW[3]]);
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
|
|
@@ -42,7 +42,7 @@ describe('ACL Management: render rules', () => {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
it('Should render ACL rules in a table', () => {
|
|
45
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
45
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
46
46
|
AclManagementSteps.getAddFirstRuleButton().should('be.visible');
|
|
47
47
|
AclManagementSteps.checkStatementRules(ACL_VIEW);
|
|
48
48
|
});
|
|
@@ -24,11 +24,11 @@ describe('ACL Management: reorder rules', () => {
|
|
|
24
24
|
|
|
25
25
|
it('Should move rule up', () => {
|
|
26
26
|
AclManagementSteps.moveRuleUp(1);
|
|
27
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[1], ACL_VIEW[0], ACL_VIEW[2], ACL_VIEW[3]
|
|
27
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[1], ACL_VIEW[0], ACL_VIEW[2], ACL_VIEW[3]]);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
it('Should move rule down', () => {
|
|
31
31
|
AclManagementSteps.moveRuleDown(1);
|
|
32
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[2], ACL_VIEW[1], ACL_VIEW[3]
|
|
32
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[2], ACL_VIEW[1], ACL_VIEW[3]]);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
@@ -45,14 +45,14 @@ describe('ACL Management: revert rules', () => {
|
|
|
45
45
|
AclManagementSteps.selectPolicy(1, 'allow');
|
|
46
46
|
AclManagementSteps.saveRule(1);
|
|
47
47
|
// And I delete an existing rule
|
|
48
|
-
AclManagementSteps.deleteRule(
|
|
48
|
+
AclManagementSteps.deleteRule(4);
|
|
49
49
|
ModalDialogSteps.clickOnConfirmButton();
|
|
50
50
|
// And I click on cancel button (reverting the ACL list)
|
|
51
51
|
AclManagementSteps.cancelAclSaving();
|
|
52
52
|
ModalDialogSteps.clickOnConfirmButton();
|
|
53
53
|
// Then I expect that all changes in the ACL should be reverted
|
|
54
54
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
55
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
55
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
56
56
|
AclManagementSteps.checkStatementRules(ACL_VIEW);
|
|
57
57
|
// And the model should become pristine again after the revert
|
|
58
58
|
// I should be able to navigate away from the page without any confirmation
|
|
@@ -47,14 +47,14 @@ describe('ACL Management: update rules', () => {
|
|
|
47
47
|
AclManagementSteps.selectOperation(1, 'write');
|
|
48
48
|
AclManagementSteps.saveRule(1);
|
|
49
49
|
// And I delete an existing rule
|
|
50
|
-
AclManagementSteps.deleteRule(
|
|
50
|
+
AclManagementSteps.deleteRule(4);
|
|
51
51
|
ModalDialogSteps.clickOnConfirmButton();
|
|
52
52
|
// And I save the ACL list
|
|
53
53
|
AclManagementSteps.saveAcl();
|
|
54
54
|
ApplicationSteps.getLoader().should('not.exist');
|
|
55
55
|
// Then I expect the ACL to be saved
|
|
56
56
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
57
|
-
AclManagementSteps.getAclRules().should('have.length',
|
|
57
|
+
AclManagementSteps.getAclRules().should('have.length', 4);
|
|
58
58
|
const editedRule = {
|
|
59
59
|
"scope": "statement",
|
|
60
60
|
"policy": "deny",
|
|
@@ -79,7 +79,7 @@ describe('ACL Management: update rules', () => {
|
|
|
79
79
|
"moveUp": true,
|
|
80
80
|
"moveDown": true
|
|
81
81
|
};
|
|
82
|
-
AclManagementSteps.checkStatementRules([ACL_VIEW[0], newRule, editedRule, ACL_VIEW[2]
|
|
82
|
+
AclManagementSteps.checkStatementRules([ACL_VIEW[0], newRule, editedRule, ACL_VIEW[2]]);
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
it('Should prevent leaving the page when there is new rule added', () => {
|
|
@@ -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
|
+
|
package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js
CHANGED
|
@@ -2,7 +2,7 @@ import {ConnectorsSteps} from "../../../steps/setup/connectors-steps";
|
|
|
2
2
|
import HomeSteps from "../../../steps/home-steps";
|
|
3
3
|
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
4
4
|
|
|
5
|
-
const expectedButtons = ['elasticsearch', 'opensearch', '
|
|
5
|
+
const expectedButtons = ['elasticsearch', 'opensearch', 'lucene', 'kafka', 'chatgpt-retrieval'];
|
|
6
6
|
|
|
7
7
|
function verifyConnectorsPage() {
|
|
8
8
|
expectedButtons.forEach(buttonId => {
|
|
@@ -22,7 +22,7 @@ describe('Plugins without selected repository', () => {
|
|
|
22
22
|
const verifyInitialStateWithoutSelectedRepository = () => {
|
|
23
23
|
ErrorSteps.verifyNoConnectedRepoMessage();
|
|
24
24
|
PluginsSteps.getPluginsView().should('be.visible');
|
|
25
|
-
PluginsSteps.getSearchPluginBar().should('not.
|
|
25
|
+
PluginsSteps.getSearchPluginBar().should('not.exist');
|
|
26
26
|
PluginsSteps.getPluginsList().should('not.exist');
|
|
27
27
|
};
|
|
28
28
|
})
|
|
@@ -3,6 +3,7 @@ import {YasqeSteps} from '../../../steps/yasgui/yasqe-steps';
|
|
|
3
3
|
import {SecurityStubs} from '../../../stubs/security-stubs';
|
|
4
4
|
import {VisualGraphSteps} from '../../../steps/visual-graph-steps';
|
|
5
5
|
import {ToasterSteps} from '../../../steps/toaster-steps';
|
|
6
|
+
import {SettingsSteps} from '../../../steps/setup/settings-steps';
|
|
6
7
|
|
|
7
8
|
describe('My Settings', () => {
|
|
8
9
|
|
|
@@ -32,16 +33,12 @@ describe('My Settings', () => {
|
|
|
32
33
|
//turn off inference, sameAs and count total results
|
|
33
34
|
clickLabelBtn('#sameas-on')
|
|
34
35
|
.then(() => {
|
|
35
|
-
|
|
36
|
-
.find('.switch:checkbox')
|
|
37
|
-
.should('not.be.visible');
|
|
36
|
+
SettingsSteps.getSameAsToggle().should('not.be.checked');
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
clickLabelBtn('#inference-on')
|
|
41
40
|
.then(() => {
|
|
42
|
-
|
|
43
|
-
.find('.switch:checkbox')
|
|
44
|
-
.should('not.be.visible');
|
|
41
|
+
SettingsSteps.getInferenceToggle().should('not.be.checked');
|
|
45
42
|
});
|
|
46
43
|
|
|
47
44
|
cy.get('#defaultCount:checkbox').uncheck();
|
|
@@ -95,9 +92,7 @@ describe('My Settings', () => {
|
|
|
95
92
|
visitSettingsView();
|
|
96
93
|
|
|
97
94
|
clickLabelBtn('#schema-on').then(() => {
|
|
98
|
-
|
|
99
|
-
.find('.switch:checkbox')
|
|
100
|
-
.should('not.be.visible');
|
|
95
|
+
SettingsSteps.getSchemaToggle().should('not.be.checked');
|
|
101
96
|
});
|
|
102
97
|
|
|
103
98
|
getSaveButton()
|
|
@@ -152,14 +147,29 @@ describe('My Settings', () => {
|
|
|
152
147
|
it('sameAs button should be disabled if inference is turned off', () => {
|
|
153
148
|
clickLabelBtn('#inference-on')
|
|
154
149
|
.then(() => {
|
|
155
|
-
|
|
156
|
-
.find('.switch:checkbox')
|
|
157
|
-
.should('not.be.visible');
|
|
150
|
+
SettingsSteps.getInferenceToggle().should('not.be.checked');
|
|
158
151
|
});
|
|
159
152
|
|
|
160
|
-
|
|
161
|
-
.
|
|
162
|
-
.
|
|
153
|
+
SettingsSteps.getSameAsToggle()
|
|
154
|
+
.should('be.disabled')
|
|
155
|
+
.and('not.be.checked');
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('should give the settings form controls accessible names', () => {
|
|
159
|
+
SettingsSteps.getUsernameLabel().should('contain', 'Username');
|
|
160
|
+
|
|
161
|
+
SettingsSteps.getSameAsToggleLabel().should('contain', 'Expand results over owl:SameAs');
|
|
162
|
+
SettingsSteps.getInferenceToggleLabel().should('contain', 'Enable inference');
|
|
163
|
+
SettingsSteps.getSchemaToggleLabel().should('contain', 'Show schema');
|
|
164
|
+
|
|
165
|
+
SettingsSteps.getAnyRepositoryReadCheckbox()
|
|
166
|
+
.should('have.attr', 'aria-label', 'Read access to Global (any data repository)');
|
|
167
|
+
SettingsSteps.getAnyRepositoryWriteCheckbox()
|
|
168
|
+
.should('have.attr', 'aria-label', 'Write access to Global (any data repository)');
|
|
169
|
+
SettingsSteps.getAnyRepositoryMaintainCheckbox()
|
|
170
|
+
.should('have.attr', 'aria-label', 'Maintain access to Global (any data repository)');
|
|
171
|
+
SettingsSteps.getAnyRepositoryGraphqlCheckbox()
|
|
172
|
+
.should('have.attr', 'aria-label', 'Restrict Global (any data repository) to GraphQL');
|
|
163
173
|
});
|
|
164
174
|
|
|
165
175
|
function getSaveButton() {
|