graphdb-workbench-tests 2.6.0-TR6 → 2.6.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/fixtures/locale-en.json +6 -15
- package/fixtures/url-import-template.json +1 -2
- package/integration/explore/graphs.overview.spec.js +0 -9
- package/integration/import/import.server.files.spec.js +0 -18
- package/integration/setup/aclmanagement/create-rule.spec.js +1 -1
- package/integration/setup/aclmanagement/delete-rule.spec.js +2 -2
- package/integration/setup/aclmanagement/edit-rule.spec.js +1 -1
- package/integration/setup/aclmanagement/scopes.spec.js +12 -12
- package/package.json +1 -1
- package/steps/import-steps.js +0 -14
- package/steps/setup/acl-management-steps.js +35 -23
- package/fixtures/graphdb-import/0007-import-file.jsonld +0 -27
package/fixtures/locale-en.json
CHANGED
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"column": {
|
|
154
154
|
"index": "#",
|
|
155
155
|
"policy": "Policy",
|
|
156
|
-
"role": "
|
|
156
|
+
"role": "Custom role",
|
|
157
157
|
"operation": "Operation",
|
|
158
158
|
"subject": "Subject",
|
|
159
159
|
"predicate": "Predicate",
|
|
@@ -166,16 +166,17 @@
|
|
|
166
166
|
"predicate": "Predicate",
|
|
167
167
|
"object": "Object",
|
|
168
168
|
"context": "Context",
|
|
169
|
-
"role": "
|
|
169
|
+
"role": "ROLE1",
|
|
170
170
|
"plugin": "Plugin"
|
|
171
171
|
},
|
|
172
172
|
"actions": {
|
|
173
173
|
"move_up": "Move the rule up",
|
|
174
174
|
"move_down": "Move the rule down",
|
|
175
175
|
"delete_rule": "Delete rule",
|
|
176
|
-
"
|
|
176
|
+
"add_rule_first": "Add new rule in the beginning of the list",
|
|
177
|
+
"add_rule_next": "Add new rule after current rule",
|
|
177
178
|
"edit_rule": "Edit rule",
|
|
178
|
-
"
|
|
179
|
+
"apply_rule": "Confirm rule editing",
|
|
179
180
|
"cancel_rule_editing": "Cancel rule editing",
|
|
180
181
|
"save_acl": "Save ACL",
|
|
181
182
|
"cancel_acl_saving": "Cancel"
|
|
@@ -856,7 +857,6 @@
|
|
|
856
857
|
"import.label.bnodes": "BNodes",
|
|
857
858
|
"import.label.datatype": "Datatype",
|
|
858
859
|
"import.popover.relative.iri": "RDF data may contain relative IRIs. In order to make sense of them, they need to be resolved against a Base IRI. Typically data does not contain relative IRIs and this field may be left empty.",
|
|
859
|
-
"import.popover.context.link": "Context link is used when importing JSONLD documents only.",
|
|
860
860
|
"import.alert.not.valid.iri": "Not a valid IRI!",
|
|
861
861
|
"import.target.graphs": "Target graphs",
|
|
862
862
|
"import.into.graphs": "Data is imported into one or more graphs. Some RDF formats may specify graphs, while others do not support that. The latter are treated as if they specify the default graph.",
|
|
@@ -942,7 +942,6 @@
|
|
|
942
942
|
"import.last.import.settings": "Last import settings",
|
|
943
943
|
"import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
|
|
944
944
|
"import.enable.replace.option": "Enable this to replace the data in one or more graphs with the imported data.",
|
|
945
|
-
"import.context.link": "Context link",
|
|
946
945
|
"text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
|
|
947
946
|
"url.import.input.placeholder": "Data URL",
|
|
948
947
|
"filesTable.interrupt.import": "Interrupt import",
|
|
@@ -1128,7 +1127,6 @@
|
|
|
1128
1127
|
"required.field": "This field is required",
|
|
1129
1128
|
"created.repo.success.msg": "The repository {{repoId}} has been created.",
|
|
1130
1129
|
"empty.repoid.warning": "Repository ID cannot be empty",
|
|
1131
|
-
"empty.context.or.frame.link": "Link cannot be empty",
|
|
1132
1130
|
"invalid.ruleset.file.error": "Invalid rule-set file. Please upload a valid one.",
|
|
1133
1131
|
"wrong.repo.name.error": "Wrong repo name",
|
|
1134
1132
|
"edit.system.repo.warning": "<b>System</b> repository can't be edited",
|
|
@@ -1649,14 +1647,6 @@
|
|
|
1649
1647
|
"error": "error",
|
|
1650
1648
|
"import.rdf.data.label": "Import RDF data",
|
|
1651
1649
|
"export.rdf.data": "Export RDF data",
|
|
1652
|
-
"export.settings": "Export settings: JSON-LD",
|
|
1653
|
-
"export": "Export",
|
|
1654
|
-
"jsonld.mode": "JSON-LD mode",
|
|
1655
|
-
"jsonld.mode.info": "JSON-LD mode allows you to choose different data formats for export",
|
|
1656
|
-
"jsonld.context.link": "Context link",
|
|
1657
|
-
"jsonld.frame.link": "Frame link",
|
|
1658
|
-
"jsonld.frame.uri.placeholder": "http://example.com/frame.jsonld",
|
|
1659
|
-
"jsonld.context.uri.placeholder": "http://example.com/context.jsonld",
|
|
1660
1650
|
"saved.sparql.queries.label": "Saved SPARQL queries",
|
|
1661
1651
|
"saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
|
|
1662
1652
|
"common.execute": "Execute",
|
|
@@ -1846,6 +1836,7 @@
|
|
|
1846
1836
|
"clear.tooltip": "Clear",
|
|
1847
1837
|
"repo.page.location.label": "Location",
|
|
1848
1838
|
"repo.page.location.input.field.tooltip": "The location where to create repository. The default is the local one.",
|
|
1839
|
+
"repo.page.repository.info.loading.error": "Currently selected repository cannot be edited due to an error during repository metadata loading.",
|
|
1849
1840
|
"guide.button.guide-paused": "Guide paused",
|
|
1850
1841
|
"guide.button.guide-resume": "Continue the guide",
|
|
1851
1842
|
"guide.validate.no-next": "Cannot continue to next",
|
|
@@ -123,13 +123,4 @@ describe('Graphs overview screen validation', () => {
|
|
|
123
123
|
YasrSteps.getResultTableHeader().should('be.visible');
|
|
124
124
|
YasrSteps.getResultTableHeaderColumns().should('have.length', 5);
|
|
125
125
|
});
|
|
126
|
-
|
|
127
|
-
it('Export repository in JSONLD format', () => {
|
|
128
|
-
cy.get('.export-repository-btn').click();
|
|
129
|
-
cy.get('.export-repo-format-JSONLD').click();
|
|
130
|
-
cy.get('[id=wb-JSONLD-mode]').select(5);
|
|
131
|
-
cy.get('[id=wb-JSONLD-context]').type('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
132
|
-
cy.get('[id=wb-export-JSONLD]').click();
|
|
133
|
-
cy.get('.modal-content').should('not.exist');
|
|
134
|
-
});
|
|
135
126
|
});
|
|
@@ -10,8 +10,6 @@ describe('Import screen validation - server files', () => {
|
|
|
10
10
|
const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
|
|
11
11
|
const TTLS_FOR_IMPORT = 'test_turtlestar.ttls';
|
|
12
12
|
const TRIGS_FOR_IMPORT = 'test-trigstar.trigs';
|
|
13
|
-
const JSONLD_FILE_FOR_IMPORT = '0007-import-file.jsonld';
|
|
14
|
-
const JSONLD_CONTEXT = 'https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld';
|
|
15
13
|
|
|
16
14
|
beforeEach(() => {
|
|
17
15
|
repositoryId = 'server-import-' + Date.now();
|
|
@@ -44,22 +42,6 @@ describe('Import screen validation - server files', () => {
|
|
|
44
42
|
.verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
|
|
45
43
|
});
|
|
46
44
|
|
|
47
|
-
// for this test it is necessary to set up a whitelist to GraphDB in this way: -Dgraphdb.jsonld.whitelist=https://w3c.github.io/json-ld-api/tests/*
|
|
48
|
-
it('Test import Server files successfully with JSONLD context link settings', () => {
|
|
49
|
-
ImportSteps.selectServerFile(JSONLD_FILE_FOR_IMPORT)
|
|
50
|
-
.importServerFiles(true)
|
|
51
|
-
.fillBaseURI(BASE_URI)
|
|
52
|
-
.selectNamedGraph()
|
|
53
|
-
.fillNamedGraph(CONTEXT)
|
|
54
|
-
.expandAdvancedSettings()
|
|
55
|
-
.setContextLinkToBeVisible()
|
|
56
|
-
.enablePreserveBNodes()
|
|
57
|
-
.fillContextLink(JSONLD_CONTEXT)
|
|
58
|
-
.importFromSettingsDialog()
|
|
59
|
-
.verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
60
|
-
.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
45
|
it('Test import with resetting status of imported file', () => {
|
|
64
46
|
ImportSteps
|
|
65
47
|
.selectServerFile(FILE_FOR_IMPORT)
|
|
@@ -172,7 +172,7 @@ describe('ACL Management: create rule', () => {
|
|
|
172
172
|
AclManagementSteps.getMoveDownButtons().should('have.length', 4);
|
|
173
173
|
AclManagementSteps.deleteRuleButtons().should('have.length', 5);
|
|
174
174
|
AclManagementSteps.editRuleButtons().should('have.length', 5);
|
|
175
|
-
AclManagementSteps.createRuleButtons().should('have.length',
|
|
175
|
+
AclManagementSteps.createRuleButtons().should('have.length', 5);
|
|
176
176
|
// When a rule is in edit mode
|
|
177
177
|
AclManagementSteps.addRule(1);
|
|
178
178
|
// Then I expect that move up, move down, edit rule, create rule, delete rule buttons to be hidden
|
|
@@ -30,7 +30,7 @@ describe('ACL Management: delete rule', () => {
|
|
|
30
30
|
AclManagementSteps.deleteRule(0);
|
|
31
31
|
// Then I expect a confirmation dialog
|
|
32
32
|
ModalDialogSteps.getDialog().should('be.visible');
|
|
33
|
-
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #
|
|
33
|
+
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #1?');
|
|
34
34
|
// When I cancel operation
|
|
35
35
|
ModalDialogSteps.clickOnCancelButton();
|
|
36
36
|
// Then I expect the rule to remain in the list
|
|
@@ -38,7 +38,7 @@ describe('ACL Management: delete rule', () => {
|
|
|
38
38
|
AclManagementSteps.getAclRules().should('have.length', 5);
|
|
39
39
|
// When I try remove it again and confirm the operation
|
|
40
40
|
AclManagementSteps.deleteRule(4);
|
|
41
|
-
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #
|
|
41
|
+
ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #5?');
|
|
42
42
|
ModalDialogSteps.clickOnConfirmButton();
|
|
43
43
|
// Then I expect the rule to be removed from the list
|
|
44
44
|
ModalDialogSteps.getDialog().should('not.exist');
|
|
@@ -30,7 +30,7 @@ describe('ACL Management: edit rule', () => {
|
|
|
30
30
|
AclManagementSteps.getMoveDownButtons().should('have.length', 4);
|
|
31
31
|
AclManagementSteps.deleteRuleButtons().should('have.length', 5);
|
|
32
32
|
AclManagementSteps.editRuleButtons().should('have.length', 5);
|
|
33
|
-
AclManagementSteps.createRuleButtons().should('have.length',
|
|
33
|
+
AclManagementSteps.createRuleButtons().should('have.length', 5);
|
|
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
|
|
@@ -27,31 +27,31 @@ describe('ACL Management: rule scopes', () => {
|
|
|
27
27
|
AclManagementSteps.getAclTable().should('be.visible');
|
|
28
28
|
AclManagementSteps.getAclTabs().should('be.visible');
|
|
29
29
|
AclManagementSteps.getNoDataMessage().should('be.visible');
|
|
30
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Statement
|
|
30
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Statement');
|
|
31
31
|
// When I select Clear graph tab
|
|
32
32
|
AclManagementSteps.selectTab(1);
|
|
33
33
|
// I expect empty rules table
|
|
34
34
|
AclManagementSteps.getAclTabs().should('be.visible');
|
|
35
35
|
AclManagementSteps.getNoDataMessage().should('be.visible');
|
|
36
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph
|
|
36
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
|
|
37
37
|
// When I select Plugins tab
|
|
38
38
|
AclManagementSteps.selectTab(2);
|
|
39
39
|
// I expect empty rules table
|
|
40
40
|
AclManagementSteps.getAclTabs().should('be.visible');
|
|
41
41
|
AclManagementSteps.getNoDataMessage().should('be.visible');
|
|
42
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Plugin
|
|
42
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
|
|
43
43
|
// When I select System tab
|
|
44
44
|
AclManagementSteps.selectTab(3);
|
|
45
45
|
// I expect empty rules table
|
|
46
46
|
AclManagementSteps.getAclTabs().should('be.visible');
|
|
47
47
|
AclManagementSteps.getNoDataMessage().should('be.visible');
|
|
48
|
-
AclManagementSteps.getActiveTab().should('have.text', 'System
|
|
48
|
+
AclManagementSteps.getActiveTab().should('have.text', 'System');
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it('Should create rules', () => {
|
|
52
52
|
// I select Clear graph tab
|
|
53
53
|
AclManagementSteps.selectTab(1);
|
|
54
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph
|
|
54
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
|
|
55
55
|
// I can create rule
|
|
56
56
|
AclManagementSteps.addRuleInBeginning();
|
|
57
57
|
// I fill the policy
|
|
@@ -67,7 +67,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
67
67
|
|
|
68
68
|
// I select Plugin tab
|
|
69
69
|
AclManagementSteps.selectTab(2);
|
|
70
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Plugin
|
|
70
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
|
|
71
71
|
// I can create rule
|
|
72
72
|
AclManagementSteps.addRuleInBeginning();
|
|
73
73
|
// I fill the policy
|
|
@@ -85,7 +85,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
85
85
|
|
|
86
86
|
// I select System tab
|
|
87
87
|
AclManagementSteps.selectTab(3);
|
|
88
|
-
AclManagementSteps.getActiveTab().should('have.text', 'System
|
|
88
|
+
AclManagementSteps.getActiveTab().should('have.text', 'System');
|
|
89
89
|
// I can create rule
|
|
90
90
|
AclManagementSteps.addRuleInBeginning();
|
|
91
91
|
// I fill the policy
|
|
@@ -101,7 +101,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
101
101
|
|
|
102
102
|
// I select Statement tab
|
|
103
103
|
AclManagementSteps.selectTab(0);
|
|
104
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Statement
|
|
104
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Statement');
|
|
105
105
|
// I can create rule
|
|
106
106
|
AclManagementSteps.addRuleInBeginning();
|
|
107
107
|
// I fill the policy
|
|
@@ -168,7 +168,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
168
168
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
169
169
|
|
|
170
170
|
// I expect to be on Statement tab
|
|
171
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Statement
|
|
171
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Statement');
|
|
172
172
|
// I expect to have one statement rule
|
|
173
173
|
AclManagementSteps.getAclRules().should('have.length', 1);
|
|
174
174
|
const expectedStatementRule = {
|
|
@@ -185,7 +185,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
185
185
|
|
|
186
186
|
// I visit Clear graph tab
|
|
187
187
|
AclManagementSteps.selectTab(1);
|
|
188
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph
|
|
188
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
|
|
189
189
|
const expectedClearGraphRule = {
|
|
190
190
|
"scope": "clear_graph",
|
|
191
191
|
"policy": "deny",
|
|
@@ -196,7 +196,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
196
196
|
|
|
197
197
|
// I visit Plugin tab
|
|
198
198
|
AclManagementSteps.selectTab(2);
|
|
199
|
-
AclManagementSteps.getActiveTab().should('have.text', 'Plugin
|
|
199
|
+
AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
|
|
200
200
|
const expectedPluginRule = {
|
|
201
201
|
"scope": "plugin",
|
|
202
202
|
"policy": "deny",
|
|
@@ -208,7 +208,7 @@ describe('ACL Management: rule scopes', () => {
|
|
|
208
208
|
|
|
209
209
|
// I visit System tab
|
|
210
210
|
AclManagementSteps.selectTab(3);
|
|
211
|
-
AclManagementSteps.getActiveTab().should('have.text', 'System
|
|
211
|
+
AclManagementSteps.getActiveTab().should('have.text', 'System');
|
|
212
212
|
const expectedSystemRule = {
|
|
213
213
|
"scope": "system",
|
|
214
214
|
"policy": "allow",
|
package/package.json
CHANGED
package/steps/import-steps.js
CHANGED
|
@@ -193,20 +193,6 @@ class ImportSteps {
|
|
|
193
193
|
return ImportSteps;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
static fillContextLink(contextLink) {
|
|
197
|
-
ImportSteps.getSettingsForm().find('input[name="contextLink"]').type(contextLink).should('have.value', contextLink);
|
|
198
|
-
|
|
199
|
-
return ImportSteps;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
static setContextLinkToBeVisible() {
|
|
203
|
-
ImportSteps.getSettingsForm().within(() => {
|
|
204
|
-
cy.get('.contextLinkRow').invoke('attr', 'style', 'display: block !important');
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
return ImportSteps;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
196
|
static resetStatusOfUploadedFiles() {
|
|
211
197
|
// Button should disappear
|
|
212
198
|
cy.get('#import-server #wb-import-clearStatuses')
|
|
@@ -20,7 +20,7 @@ export class AclManagementSteps {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
static getAddFirstRuleButton() {
|
|
23
|
-
return
|
|
23
|
+
return cy.get('.add-first-rule-btn').scrollIntoView();
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
static getRule(index) {
|
|
@@ -110,7 +110,7 @@ export class AclManagementSteps {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
static getSaveRuleDisabledButton(index) {
|
|
113
|
-
return this.getRule(index).find('.save-rule-
|
|
113
|
+
return this.getRule(index).find('.save-rule-btn');
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
static saveRule(index) {
|
|
@@ -150,7 +150,7 @@ export class AclManagementSteps {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
static getRoleField(index) {
|
|
153
|
-
return this.getRule(index).find('.role-cell
|
|
153
|
+
return this.getRule(index).find('.role-cell textarea');
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
static fillRole(index, value) {
|
|
@@ -220,13 +220,16 @@ export class AclManagementSteps {
|
|
|
220
220
|
static checkStatementRules(rules = []) {
|
|
221
221
|
rules.forEach((rule, index) => {
|
|
222
222
|
AclManagementSteps.getRule(index).within(() => {
|
|
223
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
223
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
224
224
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
225
225
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
226
226
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
227
227
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
228
228
|
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
229
|
-
cy.get('td:nth-child(4)').
|
|
229
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
230
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
231
|
+
expect(normalizedText).to.equal(rule.role);
|
|
232
|
+
});
|
|
230
233
|
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
231
234
|
cy.get('td:nth-child(6)').should('contain.text', rule.subject);
|
|
232
235
|
cy.get('td:nth-child(7)').should('contain.text', rule.predicate);
|
|
@@ -242,17 +245,20 @@ export class AclManagementSteps {
|
|
|
242
245
|
static checkClearGraphRules(rules = []) {
|
|
243
246
|
rules.forEach((rule, index) => {
|
|
244
247
|
AclManagementSteps.getRule(index).within(() => {
|
|
245
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
248
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
246
249
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
247
250
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
248
251
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
249
252
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
250
253
|
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
251
|
-
cy.get('td:nth-child(4)').
|
|
254
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
255
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
256
|
+
expect(normalizedText).to.equal(rule.role);
|
|
257
|
+
});
|
|
252
258
|
cy.get('td:nth-child(5)').should('contain.text', rule.context);
|
|
253
|
-
cy.get('td:nth-child(
|
|
254
|
-
cy.get('td:nth-child(
|
|
255
|
-
cy.get('td:nth-child(
|
|
259
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
260
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
261
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
256
262
|
});
|
|
257
263
|
});
|
|
258
264
|
}
|
|
@@ -260,18 +266,21 @@ export class AclManagementSteps {
|
|
|
260
266
|
static checkPluginRules(rules = []) {
|
|
261
267
|
rules.forEach((rule, index) => {
|
|
262
268
|
AclManagementSteps.getRule(index).within(() => {
|
|
263
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
269
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
264
270
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
265
271
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
266
272
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
267
273
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
268
274
|
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
269
|
-
cy.get('td:nth-child(4)').
|
|
275
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
276
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
277
|
+
expect(normalizedText).to.equal(rule.role);
|
|
278
|
+
});
|
|
270
279
|
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
271
280
|
cy.get('td:nth-child(6)').should('contain.text', rule.plugin);
|
|
272
|
-
cy.get('td:nth-child(
|
|
273
|
-
cy.get('td:nth-child(
|
|
274
|
-
cy.get('td:nth-child(
|
|
281
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
282
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
283
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
275
284
|
});
|
|
276
285
|
});
|
|
277
286
|
}
|
|
@@ -279,17 +288,20 @@ export class AclManagementSteps {
|
|
|
279
288
|
static checkSystemRules(rules = []) {
|
|
280
289
|
rules.forEach((rule, index) => {
|
|
281
290
|
AclManagementSteps.getRule(index).within(() => {
|
|
282
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
291
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
283
292
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
284
293
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
285
294
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
286
295
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
287
296
|
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
288
|
-
cy.get('td:nth-child(4)').
|
|
297
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
298
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
299
|
+
expect(normalizedText).to.equal(rule.role);
|
|
300
|
+
});
|
|
289
301
|
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
290
|
-
cy.get('td:nth-child(
|
|
291
|
-
cy.get('td:nth-child(
|
|
292
|
-
cy.get('td:nth-child(
|
|
302
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
303
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
304
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
293
305
|
});
|
|
294
306
|
});
|
|
295
307
|
}
|
|
@@ -305,12 +317,12 @@ export class AclManagementSteps {
|
|
|
305
317
|
|
|
306
318
|
static checkIfRuleSavingIsForbidden(index) {
|
|
307
319
|
AclManagementSteps.getSaveRuleButton(index).should('not.exist');
|
|
308
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.
|
|
320
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.disabled');
|
|
309
321
|
}
|
|
310
322
|
|
|
311
323
|
static checkIfRuleSavingIsAllowed(index) {
|
|
312
324
|
AclManagementSteps.getSaveRuleButton(index).should('be.visible');
|
|
313
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('
|
|
325
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.enabled');
|
|
314
326
|
}
|
|
315
327
|
}
|
|
316
328
|
|
|
@@ -318,7 +330,7 @@ export const ACL_VIEW = [
|
|
|
318
330
|
{
|
|
319
331
|
"scope": "statement",
|
|
320
332
|
"policy": "allow",
|
|
321
|
-
"role": "!ROLE2",
|
|
333
|
+
"role": "! ROLE2",
|
|
322
334
|
"operation": "write",
|
|
323
335
|
"subject": "<urn:Mary>",
|
|
324
336
|
"predicate": "*",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@graph": [
|
|
3
|
-
{
|
|
4
|
-
"@id": "http://example.org/test#chapter",
|
|
5
|
-
"http://purl.org/dc/elements/1.1/description": ["Fun"],
|
|
6
|
-
"http://purl.org/dc/elements/1.1/title": ["Chapter One"]
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"@id": "http://example.org/test#jane",
|
|
10
|
-
"http://example.org/vocab#authored": [{"@id": "http://example.org/test#chapter"}],
|
|
11
|
-
"http://xmlns.com/foaf/0.1/name": ["Jane"]
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"@id": "http://example.org/test#john",
|
|
15
|
-
"http://xmlns.com/foaf/0.1/name": ["John"]
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"@id": "http://example.org/test#library",
|
|
19
|
-
"http://example.org/vocab#contains": [{
|
|
20
|
-
"@id": "http://example.org/test#book",
|
|
21
|
-
"http://example.org/vocab#contains": [ "this-is-not-an-IRI" ],
|
|
22
|
-
"http://purl.org/dc/elements/1.1/contributor": ["Writer"],
|
|
23
|
-
"http://purl.org/dc/elements/1.1/title": ["My Book"]
|
|
24
|
-
}]
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|