graphdb-workbench-tests 2.5.1 → 2.6.0-RC2
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/graphdb-import/resource-test-data.ttl +99 -0
- package/fixtures/graphql-editor/default-query-response.json +517 -0
- package/fixtures/guides/guides.json +764 -0
- package/fixtures/guides/movies.ttl +629 -0
- package/fixtures/guides/starwars.ttl +4384 -0
- package/fixtures/locale-en.json +53 -12
- package/fixtures/namespaces/ontotext-generated-namespace.json +22 -0
- package/fixtures/queries/empty-query-response.json +11 -0
- package/integration/cluster/cluster-management.spec.js +1 -2
- package/integration/explore/graphs.overview.spec.js +4 -2
- package/integration/explore/similariti-index-create.spec.js +333 -0
- package/integration/explore/similarity-index.spec.js +88 -0
- package/integration/explore/similarity.spec.js +180 -56
- package/integration/explore/visual-graph/graphs-config.spec.js +453 -0
- package/integration/explore/{visual.graph.spec.js → visual-graph/visual.graph.spec.js} +146 -347
- package/integration/guides/movies-interactive-guide.spec.js +73 -0
- package/integration/guides/star-wars-interactive-guide.js +60 -0
- package/integration/home/language-change.spec.js +3 -3
- package/integration/import/import.user.data.spec.js +2 -0
- package/integration/resource/resource.spec.js +357 -0
- package/integration/setup/aclmanagement/create-rule.spec.js +88 -11
- package/integration/setup/aclmanagement/delete-rule.spec.js +6 -4
- package/integration/setup/aclmanagement/edit-rule.spec.js +13 -8
- package/integration/setup/aclmanagement/render-rules.spec.js +4 -2
- package/integration/setup/aclmanagement/reorder-rules.spec.js +5 -3
- package/integration/setup/aclmanagement/revert-rules.spec.js +4 -3
- package/integration/setup/aclmanagement/scopes.spec.js +228 -0
- package/integration/setup/aclmanagement/update-rules.spec.js +17 -9
- package/integration/setup/jdbc-create.spec.js +330 -0
- package/integration/setup/jdbc.spec.js +78 -154
- package/integration/setup/my-settings.spec.js +9 -41
- package/integration/setup/sparql-template-create.js +150 -0
- package/integration/setup/sparql-templates.spec.js +82 -146
- package/integration/sparql-editor/actions/execute-query.spec.js +44 -0
- package/integration/sparql-editor/actions/expand-results-over-sameas.spec.js +136 -0
- package/integration/sparql-editor/actions/include-inferred-statements.spec.js +100 -0
- package/integration/sparql-editor/actions/inferred-sameas.spec.js +47 -0
- package/integration/sparql-editor/actions/save-query.spec.js +70 -0
- package/integration/sparql-editor/actions/show-saved-queries.spec.js +61 -0
- package/integration/sparql-editor/internationalization.spec.js +41 -0
- package/integration/sparql-editor/saved-query/abort-query.spec.js +51 -0
- package/integration/sparql-editor/saved-query/delete-query.spec.js +56 -0
- package/integration/sparql-editor/saved-query/edit-query.spec.js +68 -0
- package/integration/sparql-editor/saved-query/share-query.spec.js +78 -0
- package/integration/sparql-editor/sparql-editor.spec.js +55 -0
- package/integration/sparql-editor/yasgui-tabs.spec.js +107 -0
- package/integration/sparql-editor/yasr/download-as.spec.js +54 -0
- package/integration/sparql-editor/yasr/pagination.spec.js +234 -0
- package/integration/sparql-editor/yasr/table-plugin.spec.js +39 -0
- package/integration/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +57 -0
- package/integration-flaky/explore/visual.graph.spec.js +3 -2
- package/integration-flaky/setup/sparql-template-create.js +139 -0
- package/integration-flaky/sparql-editor/actions/execute-update-query.spec.js +89 -0
- package/integration-flaky/sparql-editor/actions/share-query.spec.js +84 -0
- package/integration-flaky/sparql-editor/lucene-connector.spec.js +62 -0
- package/integration-flaky/sparql-editor/plugins/error-plugin.spec.js +83 -0
- package/integration-flaky/sparql-editor/yasr/table-plugin.spec.js +81 -0
- package/package.json +3 -1
- package/steps/application-steps.js +5 -0
- package/steps/autocomplete-steps.js +10 -0
- package/steps/error-steps.js +9 -0
- package/steps/explore/graphs-overview-steps.js +24 -0
- package/steps/explore/similarity-index-create-steps.js +113 -0
- package/steps/explore/similarity-indexes-steps.js +18 -0
- package/steps/guides/guide-dialog-steps.js +38 -0
- package/steps/guides/guide-steps.js +278 -0
- package/steps/guides/movies-guide-steps.js +241 -0
- package/steps/guides/star-wars-guide-steps.js +188 -0
- package/steps/import-steps.js +16 -0
- package/steps/language-selector-steps.js +22 -0
- package/steps/loader-steps.js +10 -0
- package/steps/lucene-connector-steps.js +43 -0
- package/steps/main-menu-steps.js +67 -0
- package/steps/repository-selector-steps.js +26 -0
- package/steps/repository-steps.js +4 -0
- package/steps/resource/resource-edit-steps.js +111 -0
- package/steps/resource/resource-steps.js +149 -0
- package/steps/setup/acl-management-steps.js +201 -39
- package/steps/setup/jdbc-create-steps.js +97 -0
- package/steps/setup/jdbc-steps.js +42 -0
- package/steps/setup/sparql-create-update-steps.js +55 -0
- package/steps/setup/sparql-templates-steps.js +38 -0
- package/steps/sparql-editor-steps.js +20 -0
- package/steps/sparql-steps.js +0 -6
- package/steps/visual-graph-steps.js +365 -6
- package/steps/yasgui/confirmation-dialog-steps.js +13 -0
- package/steps/yasgui/pagination-steps.js +47 -0
- package/steps/yasgui/plugin/error-plugin-steps.js +30 -0
- package/steps/yasgui/save-query-dialog.js +61 -0
- package/steps/yasgui/saved-queries-dialog.js +29 -0
- package/steps/yasgui/saved-query.js +25 -0
- package/steps/yasgui/share-saved-query-dialog.js +25 -0
- package/steps/yasgui/table-plugin-steps.js +29 -0
- package/steps/yasgui/yasgui-loader.js +10 -0
- package/steps/yasgui/yasgui-steps.js +191 -0
- package/steps/yasgui/yasqe-steps.js +187 -0
- package/steps/yasgui/yasr-steps.js +108 -0
- package/stubs/namespace-stubs.js +10 -0
- package/stubs/repositories-stub.js +58 -0
- package/stubs/security-stubs.js +69 -0
- package/stubs/yasgui/connectors-stubs.js +12 -0
- package/stubs/yasgui/query-stubs.js +253 -0
- package/support/index.js +3 -0
- package/support/repository-commands.js +5 -5
- package/support/sparql-commands.js +1 -1
- package/support/visual-graph-commands.js +25 -0
- package/integration/sparql/main.menu.spec.js +0 -232
- package/integration/sparql/sparql-error-handling.spec.js +0 -74
- package/integration/sparql/sparql-language-change.spec.js +0 -58
- package/integration/sparql/sparql-result-formating.spec.js +0 -84
- package/integration/sparql/sparql.menu.spec.js +0 -1253
- package/integration-flaky/setup/sparql-templates.spec.js +0 -125
- package/integration-flaky/sparql/sparql-language-change.spec.js +0 -45
- package/integration-flaky/sparql/sparql.menu.spec.js +0 -75
|
@@ -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) {
|
|
@@ -57,6 +57,22 @@ export class AclManagementSteps {
|
|
|
57
57
|
return this.getAclTable().find('.no-data');
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
static getAclTabs() {
|
|
61
|
+
return cy.get('.nav-tabs.acl-tabs .nav-item');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static getActiveTab() {
|
|
65
|
+
return this.getAclTabs().find('.active');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static selectTab(index) {
|
|
69
|
+
return this.getAclTabs().eq(index).click();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static getActiveTabDirtyIcon() {
|
|
73
|
+
return this.getActiveTab().find('.icon-exclamation');
|
|
74
|
+
}
|
|
75
|
+
|
|
60
76
|
static addRuleInBeginning() {
|
|
61
77
|
this.getAddFirstRuleButton().click();
|
|
62
78
|
}
|
|
@@ -98,7 +114,7 @@ export class AclManagementSteps {
|
|
|
98
114
|
}
|
|
99
115
|
|
|
100
116
|
static getSaveRuleDisabledButton(index) {
|
|
101
|
-
return this.getRule(index).find('.save-rule-
|
|
117
|
+
return this.getRule(index).find('.save-rule-btn');
|
|
102
118
|
}
|
|
103
119
|
|
|
104
120
|
static saveRule(index) {
|
|
@@ -106,45 +122,53 @@ export class AclManagementSteps {
|
|
|
106
122
|
}
|
|
107
123
|
|
|
108
124
|
static getSubjectField(index) {
|
|
109
|
-
return this.getRule(index).find('.subject-cell
|
|
125
|
+
return this.getRule(index).find('.subject-cell textarea');
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
static fillSubject(index, value) {
|
|
113
|
-
this.getSubjectField(index).clear().type(value);
|
|
129
|
+
this.getSubjectField(index).clear({force: true}).scrollIntoView().type(value);
|
|
114
130
|
}
|
|
115
131
|
|
|
116
132
|
static getPredicateField(index) {
|
|
117
|
-
return this.getRule(index).find('.predicate-cell
|
|
133
|
+
return this.getRule(index).find('.predicate-cell textarea');
|
|
118
134
|
}
|
|
119
135
|
|
|
120
136
|
static fillPredicate(index, value) {
|
|
121
|
-
this.getPredicateField(index).clear().type(value);
|
|
137
|
+
this.getPredicateField(index).clear({force: true}).scrollIntoView().type(value);
|
|
122
138
|
}
|
|
123
139
|
|
|
124
140
|
static getObjectField(index) {
|
|
125
|
-
return this.getRule(index).find('.object-cell
|
|
141
|
+
return this.getRule(index).find('.object-cell textarea');
|
|
126
142
|
}
|
|
127
143
|
|
|
128
144
|
static fillObject(index, value) {
|
|
129
|
-
this.getObjectField(index).clear().type(value);
|
|
145
|
+
this.getObjectField(index).clear({force: true}).scrollIntoView().type(value);
|
|
130
146
|
}
|
|
131
147
|
|
|
132
148
|
static getContextField(index) {
|
|
133
|
-
return this.getRule(index).find('.context-cell
|
|
149
|
+
return this.getRule(index).find('.context-cell textarea');
|
|
134
150
|
}
|
|
135
151
|
|
|
136
152
|
static fillContext(index, value) {
|
|
137
|
-
this.getContextField(index).clear().type(value);
|
|
153
|
+
this.getContextField(index).clear({force: true}).scrollIntoView().type(value);
|
|
138
154
|
}
|
|
139
155
|
|
|
140
156
|
static getRoleField(index) {
|
|
141
|
-
return this.getRule(index).find('.role-cell
|
|
157
|
+
return this.getRule(index).find('.role-cell textarea');
|
|
142
158
|
}
|
|
143
159
|
|
|
144
160
|
static fillRole(index, value) {
|
|
145
161
|
this.getRoleField(index).clear().type(value);
|
|
146
162
|
}
|
|
147
163
|
|
|
164
|
+
static getPluginField(index) {
|
|
165
|
+
return this.getRule(index).find('.plugin-cell textarea');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
static fillPlugin(index, value) {
|
|
169
|
+
this.getPluginField(index).clear().type(value);
|
|
170
|
+
}
|
|
171
|
+
|
|
148
172
|
static getPolicySelectorField(index) {
|
|
149
173
|
return this.getRule(index).find('.policy-cell select');
|
|
150
174
|
}
|
|
@@ -153,6 +177,14 @@ export class AclManagementSteps {
|
|
|
153
177
|
this.getPolicySelectorField(index).select(value);
|
|
154
178
|
}
|
|
155
179
|
|
|
180
|
+
static getOperationSelectorField(index) {
|
|
181
|
+
return this.getRule(index).find('.operation-cell select');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
static selectOperation(index, value) {
|
|
185
|
+
this.getOperationSelectorField(index).select(value);
|
|
186
|
+
}
|
|
187
|
+
|
|
156
188
|
static getMoveUpButtons() {
|
|
157
189
|
return this.getAclTable().find('.move-up-btn');
|
|
158
190
|
}
|
|
@@ -189,23 +221,91 @@ export class AclManagementSteps {
|
|
|
189
221
|
this.getCancelAclSavingButton().click();
|
|
190
222
|
}
|
|
191
223
|
|
|
192
|
-
static
|
|
224
|
+
static checkStatementRules(rules = []) {
|
|
225
|
+
rules.forEach((rule, index) => {
|
|
226
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
227
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
228
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
229
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
230
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
231
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
232
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
233
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
234
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
235
|
+
expect(normalizedText).to.equal(rule.role);
|
|
236
|
+
});
|
|
237
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
238
|
+
cy.get('td:nth-child(6)').should('contain.text', rule.subject);
|
|
239
|
+
cy.get('td:nth-child(7)').should('contain.text', rule.predicate);
|
|
240
|
+
cy.get('td:nth-child(8)').should('contain.text', rule.object);
|
|
241
|
+
cy.get('td:nth-child(9)').should('contain.text', rule.context);
|
|
242
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
243
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
244
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
static checkClearGraphRules(rules = []) {
|
|
193
250
|
rules.forEach((rule, index) => {
|
|
194
251
|
AclManagementSteps.getRule(index).within(() => {
|
|
195
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
252
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
196
253
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
197
254
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
198
255
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
199
256
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
200
|
-
cy.get('td:nth-child(3)').should('contain.text', rule.
|
|
201
|
-
cy.get('td:nth-child(4)').
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
cy.get('td:nth-child(
|
|
206
|
-
cy.get('td:nth-child(
|
|
207
|
-
cy.get('td:nth-child(
|
|
208
|
-
cy.get('td:nth-child(
|
|
257
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
258
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
259
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
260
|
+
expect(normalizedText).to.equal(rule.role);
|
|
261
|
+
});
|
|
262
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.context);
|
|
263
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
264
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
265
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static checkPluginRules(rules = []) {
|
|
271
|
+
rules.forEach((rule, index) => {
|
|
272
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
273
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
274
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
275
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
276
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
277
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
278
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
279
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
280
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
281
|
+
expect(normalizedText).to.equal(rule.role);
|
|
282
|
+
});
|
|
283
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
284
|
+
cy.get('td:nth-child(6)').should('contain.text', rule.plugin);
|
|
285
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
286
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
287
|
+
cy.get('td:nth-child(8)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
static checkSystemRules(rules = []) {
|
|
293
|
+
rules.forEach((rule, index) => {
|
|
294
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
295
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
296
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
297
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
298
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
299
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
300
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
301
|
+
cy.get('td:nth-child(4)').invoke('text').then((text) => {
|
|
302
|
+
const normalizedText = text.replace(/\u00A0/g, ' ').trim();
|
|
303
|
+
expect(normalizedText).to.equal(rule.role);
|
|
304
|
+
});
|
|
305
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
306
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
307
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
308
|
+
cy.get('td:nth-child(7)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
209
309
|
});
|
|
210
310
|
});
|
|
211
311
|
}
|
|
@@ -221,54 +321,116 @@ export class AclManagementSteps {
|
|
|
221
321
|
|
|
222
322
|
static checkIfRuleSavingIsForbidden(index) {
|
|
223
323
|
AclManagementSteps.getSaveRuleButton(index).should('not.exist');
|
|
224
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.
|
|
324
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.disabled');
|
|
225
325
|
}
|
|
226
326
|
|
|
227
327
|
static checkIfRuleSavingIsAllowed(index) {
|
|
228
328
|
AclManagementSteps.getSaveRuleButton(index).should('be.visible');
|
|
229
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('
|
|
329
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.enabled');
|
|
230
330
|
}
|
|
231
331
|
}
|
|
232
332
|
|
|
233
|
-
export const
|
|
333
|
+
export const ACL_VIEW = [
|
|
234
334
|
{
|
|
335
|
+
"scope": "statement",
|
|
336
|
+
"policy": "allow",
|
|
337
|
+
"role": "! ROLE2",
|
|
338
|
+
"operation": "write",
|
|
235
339
|
"subject": "<urn:Mary>",
|
|
236
340
|
"predicate": "*",
|
|
237
341
|
"object": "*",
|
|
238
|
-
"context": "*"
|
|
239
|
-
"role": "!CUSTOM_ROLE2",
|
|
240
|
-
"policy": "allow"
|
|
342
|
+
"context": "*"
|
|
241
343
|
},
|
|
242
344
|
{
|
|
345
|
+
"scope": "statement",
|
|
346
|
+
"policy": "deny",
|
|
347
|
+
"role": "ROLE1",
|
|
348
|
+
"operation": "read",
|
|
243
349
|
"subject": "*",
|
|
244
350
|
"predicate": "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
|
|
245
351
|
"object": "*",
|
|
246
|
-
"context": "*"
|
|
247
|
-
"role": "CUSTOM_ROLE1",
|
|
248
|
-
"policy": "deny"
|
|
352
|
+
"context": "*"
|
|
249
353
|
},
|
|
250
354
|
{
|
|
355
|
+
"scope": "statement",
|
|
356
|
+
"policy": "deny",
|
|
357
|
+
"role": "ROLE3",
|
|
358
|
+
"operation": "read",
|
|
251
359
|
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
252
360
|
"predicate": "*",
|
|
253
361
|
"object": "\"test aber auf Deutsch\"@en",
|
|
254
|
-
"context": "<http://example.com/graph1>"
|
|
255
|
-
"role": "CUSTOM_ROLE3",
|
|
256
|
-
"policy": "deny"
|
|
362
|
+
"context": "<http://example.com/graph1>"
|
|
257
363
|
},
|
|
258
364
|
{
|
|
365
|
+
"scope": "statement",
|
|
366
|
+
"policy": "allow",
|
|
367
|
+
"role": "ROLE3",
|
|
368
|
+
"operation": "write",
|
|
259
369
|
"subject": "*",
|
|
260
370
|
"predicate": "*",
|
|
261
371
|
"object": "\"15\"^^<http://www.w3.org/2001/XMLSchema#int>",
|
|
262
|
-
"context": "*"
|
|
263
|
-
"role": "CUSTOM_ROLE3",
|
|
264
|
-
"policy": "allow"
|
|
372
|
+
"context": "*"
|
|
265
373
|
},
|
|
266
374
|
{
|
|
375
|
+
"scope": "statement",
|
|
376
|
+
"policy": "deny",
|
|
377
|
+
"role": "ROLE4",
|
|
378
|
+
"operation": "write",
|
|
267
379
|
"subject": "<urn:Cat>",
|
|
268
380
|
"predicate": "*",
|
|
269
381
|
"object": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
270
|
-
"context": "*"
|
|
382
|
+
"context": "*"
|
|
383
|
+
}
|
|
384
|
+
];
|
|
385
|
+
export const ACL = [
|
|
386
|
+
{
|
|
387
|
+
"scope": "statement",
|
|
388
|
+
"policy": "allow",
|
|
389
|
+
"role": "!CUSTOM_ROLE2",
|
|
390
|
+
"operation": "write",
|
|
391
|
+
"subject": "<urn:Mary>",
|
|
392
|
+
"predicate": "*",
|
|
393
|
+
"object": "*",
|
|
394
|
+
"context": "*"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"scope": "statement",
|
|
398
|
+
"policy": "deny",
|
|
399
|
+
"role": "CUSTOM_ROLE1",
|
|
400
|
+
"operation": "read",
|
|
401
|
+
"subject": "*",
|
|
402
|
+
"predicate": "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
|
|
403
|
+
"object": "*",
|
|
404
|
+
"context": "*"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"scope": "statement",
|
|
408
|
+
"policy": "deny",
|
|
409
|
+
"role": "CUSTOM_ROLE3",
|
|
410
|
+
"operation": "read",
|
|
411
|
+
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
412
|
+
"predicate": "*",
|
|
413
|
+
"object": "\"test aber auf Deutsch\"@en",
|
|
414
|
+
"context": "<http://example.com/graph1>"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"scope": "statement",
|
|
418
|
+
"policy": "allow",
|
|
419
|
+
"role": "CUSTOM_ROLE3",
|
|
420
|
+
"operation": "write",
|
|
421
|
+
"subject": "*",
|
|
422
|
+
"predicate": "*",
|
|
423
|
+
"object": "\"15\"^^<http://www.w3.org/2001/XMLSchema#int>",
|
|
424
|
+
"context": "*"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"scope": "statement",
|
|
428
|
+
"policy": "deny",
|
|
271
429
|
"role": "CUSTOM_ROLE4",
|
|
272
|
-
"
|
|
430
|
+
"operation": "write",
|
|
431
|
+
"subject": "<urn:Cat>",
|
|
432
|
+
"predicate": "*",
|
|
433
|
+
"object": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
434
|
+
"context": "*"
|
|
273
435
|
}
|
|
274
436
|
];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export class JdbcCreateSteps {
|
|
2
|
+
|
|
3
|
+
static visit(jdbcConfigurationName) {
|
|
4
|
+
cy.visit(`/jdbc/configuration/create${jdbcConfigurationName ? '?name=' + jdbcConfigurationName : ''}`);
|
|
5
|
+
cy.get('.ontotext-yasgui').should('be.visible');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static verifyUrl() {
|
|
9
|
+
cy.url().should('include', '/jdbc/configuration/create');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static getJDBCConfigNameField() {
|
|
13
|
+
return cy.get('.jdbc-configuration-name');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static typeTableName(tableName) {
|
|
17
|
+
// force is needed because ontotext-yasgui is created with focus on editor
|
|
18
|
+
// and if it appears in the middle of templateId typing the last part of template is written in ontotext-yasgui instead input element.
|
|
19
|
+
JdbcCreateSteps.getJDBCConfigNameField().type(tableName, {force: true});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getTab(index = 0) {
|
|
23
|
+
return cy.get('.nav-item').eq(index);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static getActiveTab() {
|
|
27
|
+
return cy.get('.nav-item.active');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static openDataQueryTab() {
|
|
31
|
+
JdbcCreateSteps.getTab(0).click();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static openColumnTypesTab() {
|
|
35
|
+
JdbcCreateSteps.getTab(1).click();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static getSaveButton() {
|
|
39
|
+
return cy.get('.save-query-btn');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static clickOnSave() {
|
|
43
|
+
JdbcCreateSteps.getSaveButton().click();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static getCancelButton() {
|
|
47
|
+
return cy.get('.cancel-button');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static clickOnCancel() {
|
|
51
|
+
JdbcCreateSteps.getCancelButton().click();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static getPreviewButton() {
|
|
55
|
+
return cy.get('.preview-btn');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static clickOnPreviewButton() {
|
|
59
|
+
JdbcCreateSteps.getPreviewButton().click();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static getSuggestButton() {
|
|
63
|
+
return cy.get('.suggest-btn');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static clickOnSuggestButton() {
|
|
67
|
+
JdbcCreateSteps.getSuggestButton().click();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static getColumnSuggestionRows() {
|
|
71
|
+
return cy.get('.column-suggestion-row');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static getColumnSuggestion(columnSuggestionRowIndex = 0) {
|
|
75
|
+
return JdbcCreateSteps.getColumnSuggestionRows().eq(columnSuggestionRowIndex);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static getColumnDeleteButton(columnSuggestionRowIndex = 0) {
|
|
79
|
+
return JdbcCreateSteps.getColumnSuggestion(columnSuggestionRowIndex).find('.delete-column-btn');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static clickOnDeleteColumnButton(columnSuggestionRowIndex = 0) {
|
|
83
|
+
JdbcCreateSteps.getColumnDeleteButton(columnSuggestionRowIndex).click();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static getJdbcConfigurationNameIsRequired() {
|
|
87
|
+
return cy.get('.jdbc-configuration-name-required');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static getInvalidQueryMode() {
|
|
91
|
+
return cy.get('.invalid-query-mode');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static getInvalidQuery() {
|
|
95
|
+
return cy.get('.invalid-query');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export class JdbcSteps {
|
|
2
|
+
|
|
3
|
+
static visit() {
|
|
4
|
+
cy.visit('/jdbc');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static verifyUrl() {
|
|
8
|
+
cy.url().should('include', '/jdbc');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getCreateNewJDBCConfigurationButton() {
|
|
12
|
+
return cy.get('.create-sql-table-configuration');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static clickOnCreateJdbcConfigurationButton() {
|
|
16
|
+
JdbcSteps.getCreateNewJDBCConfigurationButton().click();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static getJDBCConfigurations() {
|
|
20
|
+
return cy.get('#configurations-table');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getJDBCConfigurationResults(configurationIndex = 0) {
|
|
24
|
+
return JdbcSteps.getJDBCConfigurations(configurationIndex).find('tr');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getEditButton(configurationIndex = 0) {
|
|
28
|
+
return JdbcSteps.getJDBCConfigurationResults(configurationIndex).find('.edit-query-btn');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static clickOnEditButton(configurationIndex = 0) {
|
|
32
|
+
JdbcSteps.getEditButton(configurationIndex).click();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getDeleteButton(configurationIndex = 0) {
|
|
36
|
+
return JdbcSteps.getJDBCConfigurationResults(configurationIndex).find('.delete-configuration-btn');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static clickOnDeleteButton(configurationIndex = 0) {
|
|
40
|
+
JdbcSteps.getDeleteButton(configurationIndex).click();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export class SparqlCreateUpdateSteps {
|
|
2
|
+
static visit(templateId) {
|
|
3
|
+
cy.visit(`/sparql-template/create${templateId ? '?templateID=' + templateId : ''}`);
|
|
4
|
+
cy.get('.ontotext-yasgui').should('be.visible');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static verifyUrl() {
|
|
8
|
+
cy.url().should('include', '/sparql-template/create');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getSaveButton() {
|
|
12
|
+
return cy.get('.save-query-btn');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static clickOnSaveButton() {
|
|
16
|
+
SparqlCreateUpdateSteps.getSaveButton().click();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static getCancelButton() {
|
|
20
|
+
return cy.get('.cancel-query-btn');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static clickOnCancelButton() {
|
|
24
|
+
SparqlCreateUpdateSteps.getCancelButton().click();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static typeTemplateId(templateId) {
|
|
28
|
+
SparqlCreateUpdateSteps.getTemplateIdField()
|
|
29
|
+
.should('exist')
|
|
30
|
+
.click()
|
|
31
|
+
// force is needed because ontotext-yasgui is created with focus on editor
|
|
32
|
+
// and if it appears in the middle of templateId typing the last part of template is written in ontotext-yasgui instead input element.
|
|
33
|
+
.type(templateId, {force: true});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getTemplateIdField() {
|
|
37
|
+
return cy.get('.sparql-template-id');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getRequiredErrorElement() {
|
|
41
|
+
return cy.get('.template-id-required');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static getInvalidErrorElement() {
|
|
45
|
+
return cy.get('.template-id-invalid');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static getInvalidQueryModeElement() {
|
|
49
|
+
return cy.get('.invalid-query-mode');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static getInvalidQueryElement() {
|
|
53
|
+
return cy.get('.invalid-query');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export class SparqlTemplatesSteps {
|
|
2
|
+
|
|
3
|
+
static visit() {
|
|
4
|
+
cy.visit('/sparql-templates');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static verifyUrl() {
|
|
8
|
+
cy.url().should('include', '/sparql-templates');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getSparqlTemplatesListContainer() {
|
|
12
|
+
return cy.get('.sparql-templates-list');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static getCreateSparqlTemplateButton() {
|
|
16
|
+
return cy.get('.create-sparql-template');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static clickOnCreateSparqlTemplateButton () {
|
|
20
|
+
SparqlTemplatesSteps.getCreateSparqlTemplateButton().realClick();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getSparqlTemplates() {
|
|
24
|
+
return cy.get('#configurations-table tr');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getSparqlTemplate(templateName) {
|
|
28
|
+
return SparqlTemplatesSteps.getSparqlTemplates().contains(templateName);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static deleteTemplate(templateName) {
|
|
32
|
+
SparqlTemplatesSteps.getSparqlTemplate(templateName).parents('tr').find('.delete-configuration-btn').click();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getNoTemplateDefinedElement() {
|
|
36
|
+
return cy.get('.no-indexes');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {YasqeSteps} from "./yasgui/yasqe-steps";
|
|
2
|
+
|
|
3
|
+
const VIEW_URL = '/sparql';
|
|
4
|
+
|
|
5
|
+
export class SparqlEditorSteps {
|
|
6
|
+
static visitSparqlEditorPage() {
|
|
7
|
+
cy.visit(VIEW_URL);
|
|
8
|
+
// Because we use angularjs less than 1.7.3 we use additional library ng-custom-element.umd.js to solve problem with property bindings
|
|
9
|
+
// This library make additional call to ontotext-yasgui-web-component and the component that's way the component renders twice when page loaded.
|
|
10
|
+
// This is bad because in tests cypress can find an element when it is rendered from first call and try to click it for example.
|
|
11
|
+
// If time of clicking such element is when second call to the component is done then exception that element is detached will be thrown.
|
|
12
|
+
// We will wait a little , to give a chance page is loaded correctly before test start.
|
|
13
|
+
cy.wait(1000);
|
|
14
|
+
YasqeSteps.waitUntilQueryIsVisible();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static verifyUrl() {
|
|
18
|
+
cy.url().should('include', `${Cypress.config('baseUrl')}${VIEW_URL}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
package/steps/sparql-steps.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
class SparqlSteps {
|
|
2
2
|
|
|
3
|
-
static changeLanguage(language) {
|
|
4
|
-
// Change the language
|
|
5
|
-
cy.get('#languageGroupDrop').should('be.visible').click();
|
|
6
|
-
cy.get('#lang-select-' + language).click();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
3
|
static createRepoAndVisit(repositoryId, repoOptions = {}) {
|
|
10
4
|
this.createRepository(repositoryId, repoOptions);
|
|
11
5
|
this.visitSparql(true, repositoryId);
|