graphdb-workbench-tests 2.5.1 → 2.6.0-RC1
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 +44 -10
- 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 +220 -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 +193 -35
- 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,18 @@ 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
|
+
|
|
60
72
|
static addRuleInBeginning() {
|
|
61
73
|
this.getAddFirstRuleButton().click();
|
|
62
74
|
}
|
|
@@ -98,7 +110,7 @@ export class AclManagementSteps {
|
|
|
98
110
|
}
|
|
99
111
|
|
|
100
112
|
static getSaveRuleDisabledButton(index) {
|
|
101
|
-
return this.getRule(index).find('.save-rule-
|
|
113
|
+
return this.getRule(index).find('.save-rule-btn');
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
static saveRule(index) {
|
|
@@ -106,7 +118,7 @@ export class AclManagementSteps {
|
|
|
106
118
|
}
|
|
107
119
|
|
|
108
120
|
static getSubjectField(index) {
|
|
109
|
-
return this.getRule(index).find('.subject-cell
|
|
121
|
+
return this.getRule(index).find('.subject-cell textarea');
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
static fillSubject(index, value) {
|
|
@@ -114,7 +126,7 @@ export class AclManagementSteps {
|
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
static getPredicateField(index) {
|
|
117
|
-
return this.getRule(index).find('.predicate-cell
|
|
129
|
+
return this.getRule(index).find('.predicate-cell textarea');
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
static fillPredicate(index, value) {
|
|
@@ -122,7 +134,7 @@ export class AclManagementSteps {
|
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
static getObjectField(index) {
|
|
125
|
-
return this.getRule(index).find('.object-cell
|
|
137
|
+
return this.getRule(index).find('.object-cell textarea');
|
|
126
138
|
}
|
|
127
139
|
|
|
128
140
|
static fillObject(index, value) {
|
|
@@ -130,7 +142,7 @@ export class AclManagementSteps {
|
|
|
130
142
|
}
|
|
131
143
|
|
|
132
144
|
static getContextField(index) {
|
|
133
|
-
return this.getRule(index).find('.context-cell
|
|
145
|
+
return this.getRule(index).find('.context-cell textarea');
|
|
134
146
|
}
|
|
135
147
|
|
|
136
148
|
static fillContext(index, value) {
|
|
@@ -138,13 +150,21 @@ export class AclManagementSteps {
|
|
|
138
150
|
}
|
|
139
151
|
|
|
140
152
|
static getRoleField(index) {
|
|
141
|
-
return this.getRule(index).find('.role-cell
|
|
153
|
+
return this.getRule(index).find('.role-cell textarea');
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
static fillRole(index, value) {
|
|
145
157
|
this.getRoleField(index).clear().type(value);
|
|
146
158
|
}
|
|
147
159
|
|
|
160
|
+
static getPluginField(index) {
|
|
161
|
+
return this.getRule(index).find('.plugin-cell textarea');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
static fillPlugin(index, value) {
|
|
165
|
+
this.getPluginField(index).clear().type(value);
|
|
166
|
+
}
|
|
167
|
+
|
|
148
168
|
static getPolicySelectorField(index) {
|
|
149
169
|
return this.getRule(index).find('.policy-cell select');
|
|
150
170
|
}
|
|
@@ -153,6 +173,14 @@ export class AclManagementSteps {
|
|
|
153
173
|
this.getPolicySelectorField(index).select(value);
|
|
154
174
|
}
|
|
155
175
|
|
|
176
|
+
static getOperationSelectorField(index) {
|
|
177
|
+
return this.getRule(index).find('.operation-cell select');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
static selectOperation(index, value) {
|
|
181
|
+
this.getOperationSelectorField(index).select(value);
|
|
182
|
+
}
|
|
183
|
+
|
|
156
184
|
static getMoveUpButtons() {
|
|
157
185
|
return this.getAclTable().find('.move-up-btn');
|
|
158
186
|
}
|
|
@@ -189,23 +217,91 @@ export class AclManagementSteps {
|
|
|
189
217
|
this.getCancelAclSavingButton().click();
|
|
190
218
|
}
|
|
191
219
|
|
|
192
|
-
static
|
|
220
|
+
static checkStatementRules(rules = []) {
|
|
193
221
|
rules.forEach((rule, index) => {
|
|
194
222
|
AclManagementSteps.getRule(index).within(() => {
|
|
195
|
-
cy.get('td:nth-child(1)').should('contain.text', index);
|
|
223
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
196
224
|
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
197
225
|
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
198
226
|
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
199
227
|
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(
|
|
228
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
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
|
+
});
|
|
233
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
234
|
+
cy.get('td:nth-child(6)').should('contain.text', rule.subject);
|
|
235
|
+
cy.get('td:nth-child(7)').should('contain.text', rule.predicate);
|
|
236
|
+
cy.get('td:nth-child(8)').should('contain.text', rule.object);
|
|
237
|
+
cy.get('td:nth-child(9)').should('contain.text', rule.context);
|
|
238
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.delete-rule-btn').should('be.visible');
|
|
239
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.edit-rule-btn').should('be.visible');
|
|
240
|
+
cy.get('td:nth-child(10)').scrollIntoView().find('.add-rule-btn').should('be.visible');
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static checkClearGraphRules(rules = []) {
|
|
246
|
+
rules.forEach((rule, index) => {
|
|
247
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
248
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
249
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
250
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
251
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
252
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
253
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
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
|
+
});
|
|
258
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.context);
|
|
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');
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
static checkPluginRules(rules = []) {
|
|
267
|
+
rules.forEach((rule, index) => {
|
|
268
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
269
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
270
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
271
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
272
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
273
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
274
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
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
|
+
});
|
|
279
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
280
|
+
cy.get('td:nth-child(6)').should('contain.text', rule.plugin);
|
|
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');
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
static checkSystemRules(rules = []) {
|
|
289
|
+
rules.forEach((rule, index) => {
|
|
290
|
+
AclManagementSteps.getRule(index).within(() => {
|
|
291
|
+
cy.get('td:nth-child(1)').should('contain.text', index+1);
|
|
292
|
+
const moveUpVisibilityCommand = index > 0 ? 'be.visible' : 'not.exist';
|
|
293
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-up-btn').should(moveUpVisibilityCommand);
|
|
294
|
+
const moveDownVisibilityCommand = index < rules.length - 1 ? 'be.visible' : 'not.exist';
|
|
295
|
+
cy.get('td:nth-child(2)').scrollIntoView().find('.move-down-btn').should(moveDownVisibilityCommand);
|
|
296
|
+
cy.get('td:nth-child(3)').should('contain.text', rule.policy);
|
|
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
|
+
});
|
|
301
|
+
cy.get('td:nth-child(5)').should('contain.text', rule.operation);
|
|
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');
|
|
209
305
|
});
|
|
210
306
|
});
|
|
211
307
|
}
|
|
@@ -221,54 +317,116 @@ export class AclManagementSteps {
|
|
|
221
317
|
|
|
222
318
|
static checkIfRuleSavingIsForbidden(index) {
|
|
223
319
|
AclManagementSteps.getSaveRuleButton(index).should('not.exist');
|
|
224
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.
|
|
320
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.disabled');
|
|
225
321
|
}
|
|
226
322
|
|
|
227
323
|
static checkIfRuleSavingIsAllowed(index) {
|
|
228
324
|
AclManagementSteps.getSaveRuleButton(index).should('be.visible');
|
|
229
|
-
AclManagementSteps.getSaveRuleDisabledButton(index).should('
|
|
325
|
+
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.enabled');
|
|
230
326
|
}
|
|
231
327
|
}
|
|
232
328
|
|
|
233
|
-
export const
|
|
329
|
+
export const ACL_VIEW = [
|
|
234
330
|
{
|
|
331
|
+
"scope": "statement",
|
|
332
|
+
"policy": "allow",
|
|
333
|
+
"role": "! ROLE2",
|
|
334
|
+
"operation": "write",
|
|
235
335
|
"subject": "<urn:Mary>",
|
|
236
336
|
"predicate": "*",
|
|
237
337
|
"object": "*",
|
|
238
|
-
"context": "*"
|
|
239
|
-
"role": "!CUSTOM_ROLE2",
|
|
240
|
-
"policy": "allow"
|
|
338
|
+
"context": "*"
|
|
241
339
|
},
|
|
242
340
|
{
|
|
341
|
+
"scope": "statement",
|
|
342
|
+
"policy": "deny",
|
|
343
|
+
"role": "ROLE1",
|
|
344
|
+
"operation": "read",
|
|
243
345
|
"subject": "*",
|
|
244
346
|
"predicate": "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
|
|
245
347
|
"object": "*",
|
|
246
|
-
"context": "*"
|
|
247
|
-
"role": "CUSTOM_ROLE1",
|
|
248
|
-
"policy": "deny"
|
|
348
|
+
"context": "*"
|
|
249
349
|
},
|
|
250
350
|
{
|
|
351
|
+
"scope": "statement",
|
|
352
|
+
"policy": "deny",
|
|
353
|
+
"role": "ROLE3",
|
|
354
|
+
"operation": "read",
|
|
251
355
|
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
252
356
|
"predicate": "*",
|
|
253
357
|
"object": "\"test aber auf Deutsch\"@en",
|
|
254
|
-
"context": "<http://example.com/graph1>"
|
|
255
|
-
"role": "CUSTOM_ROLE3",
|
|
256
|
-
"policy": "deny"
|
|
358
|
+
"context": "<http://example.com/graph1>"
|
|
257
359
|
},
|
|
258
360
|
{
|
|
361
|
+
"scope": "statement",
|
|
362
|
+
"policy": "allow",
|
|
363
|
+
"role": "ROLE3",
|
|
364
|
+
"operation": "write",
|
|
259
365
|
"subject": "*",
|
|
260
366
|
"predicate": "*",
|
|
261
367
|
"object": "\"15\"^^<http://www.w3.org/2001/XMLSchema#int>",
|
|
262
|
-
"context": "*"
|
|
263
|
-
"role": "CUSTOM_ROLE3",
|
|
264
|
-
"policy": "allow"
|
|
368
|
+
"context": "*"
|
|
265
369
|
},
|
|
266
370
|
{
|
|
371
|
+
"scope": "statement",
|
|
372
|
+
"policy": "deny",
|
|
373
|
+
"role": "ROLE4",
|
|
374
|
+
"operation": "write",
|
|
267
375
|
"subject": "<urn:Cat>",
|
|
268
376
|
"predicate": "*",
|
|
269
377
|
"object": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
270
|
-
"context": "*"
|
|
378
|
+
"context": "*"
|
|
379
|
+
}
|
|
380
|
+
];
|
|
381
|
+
export const ACL = [
|
|
382
|
+
{
|
|
383
|
+
"scope": "statement",
|
|
384
|
+
"policy": "allow",
|
|
385
|
+
"role": "!CUSTOM_ROLE2",
|
|
386
|
+
"operation": "write",
|
|
387
|
+
"subject": "<urn:Mary>",
|
|
388
|
+
"predicate": "*",
|
|
389
|
+
"object": "*",
|
|
390
|
+
"context": "*"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"scope": "statement",
|
|
394
|
+
"policy": "deny",
|
|
395
|
+
"role": "CUSTOM_ROLE1",
|
|
396
|
+
"operation": "read",
|
|
397
|
+
"subject": "*",
|
|
398
|
+
"predicate": "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>",
|
|
399
|
+
"object": "*",
|
|
400
|
+
"context": "*"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"scope": "statement",
|
|
404
|
+
"policy": "deny",
|
|
405
|
+
"role": "CUSTOM_ROLE3",
|
|
406
|
+
"operation": "read",
|
|
407
|
+
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
408
|
+
"predicate": "*",
|
|
409
|
+
"object": "\"test aber auf Deutsch\"@en",
|
|
410
|
+
"context": "<http://example.com/graph1>"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"scope": "statement",
|
|
414
|
+
"policy": "allow",
|
|
415
|
+
"role": "CUSTOM_ROLE3",
|
|
416
|
+
"operation": "write",
|
|
417
|
+
"subject": "*",
|
|
418
|
+
"predicate": "*",
|
|
419
|
+
"object": "\"15\"^^<http://www.w3.org/2001/XMLSchema#int>",
|
|
420
|
+
"context": "*"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"scope": "statement",
|
|
424
|
+
"policy": "deny",
|
|
271
425
|
"role": "CUSTOM_ROLE4",
|
|
272
|
-
"
|
|
426
|
+
"operation": "write",
|
|
427
|
+
"subject": "<urn:Cat>",
|
|
428
|
+
"predicate": "*",
|
|
429
|
+
"object": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
430
|
+
"context": "*"
|
|
273
431
|
}
|
|
274
432
|
];
|
|
@@ -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);
|