graphdb-workbench-tests 3.5.1-TR3 → 4.0.0-SPARQL12

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.
Files changed (50) hide show
  1. package/cypress-guides.config.js +45 -0
  2. package/e2e-flaky/import/import-server-files-operations.spec.js +8 -30
  3. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
  4. package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
  5. package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +7 -0
  6. package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
  7. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +45 -9
  8. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
  9. package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
  10. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +27 -32
  11. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
  12. package/e2e-legacy/import/import-server-files-batch-operations.spec.js +5 -5
  13. package/e2e-legacy/import/import-server-files.spec.js +20 -22
  14. package/e2e-legacy/import/import-user-data-file-upload.spec.js +21 -22
  15. package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
  16. package/e2e-legacy/import/import-user-data-url.spec.js +9 -6
  17. package/e2e-legacy/import/import-view.spec.js +2 -2
  18. package/e2e-legacy/repository/ontop-repository.spec.js +2 -1
  19. package/e2e-legacy/repository/rename-repository-restrictions.spec.js +129 -0
  20. package/e2e-legacy/repository/repositories.spec.js +3 -3
  21. package/e2e-legacy/resource/resource.spec.js +160 -35
  22. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
  23. package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
  24. package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
  25. package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
  26. package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
  27. package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
  28. package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
  29. package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
  30. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +21 -20
  31. package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
  32. package/e2e-legacy/ttyg/edit-agent.spec.js +8 -0
  33. package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
  34. package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
  35. package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
  36. package/eslint.config.js +5 -0
  37. package/fixtures/cluster/cluster-config-with-tag.json +17 -0
  38. package/fixtures/graphdb-import/wine.rdf +279 -285
  39. package/npm-shrinkwrap.json +138 -497
  40. package/package.json +3 -2
  41. package/steps/import/import-steps.js +26 -6
  42. package/steps/import/import-test-constants.js +1 -1
  43. package/steps/main-menu-steps.js +5 -14
  44. package/steps/resource/resource-steps.js +64 -5
  45. package/steps/setup/acl-management-steps.js +3 -23
  46. package/stubs/cluster/cluster-stubs.js +7 -0
  47. package/stubs/repositories/repositories-stubs.js +4 -0
  48. package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
  49. package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
  50. package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
@@ -1,5 +1,5 @@
1
1
  import HomeSteps from "../../steps/home-steps";
2
- import {ResourceSteps} from "../../steps/resource/resource-steps";
2
+ import {ResourceSteps, TRIPLE_TERM_ROLE_LABEL} from "../../steps/resource/resource-steps";
3
3
  import {QueryStubs} from "../../stubs/yasgui/query-stubs";
4
4
  import {VisualGraphSteps} from "../../steps/visual-graph-steps";
5
5
  import {SparqlEditorSteps} from "../../steps/sparql-editor-steps";
@@ -17,9 +17,39 @@ const PREDICATE_SOURCE = 'http:%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23subCl
17
17
  const CONTEXT_EXPLICIT = 'http://www.ontotext.com/explicit';
18
18
  const OBJECT_RESOURCE = 'http:%2F%2Fexample.com%2Fontology%23Metric';
19
19
  const IMPLICIT_EXPLICIT_RESOURCE = 'http:%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type';
20
- const TRIPLE_RESOURCE = '%3C%3C%3Chttp:%2F%2Fexample.com%2Fresource%2Fperson%2FW6J1827%3E%20%3Chttp:%2F%2Fexample.com%2Fontology%23hasAddress%3E%20%3Chttp:%2F%2Fexample.com%2Fresource%2Fperson%2FW6J1827%2Faddress%3E%3E%3E';
21
-
22
- describe('Resource view', () => {
20
+ // A triple term in the SPARQL 1.2 syntax. The resource view expects it wrapped in <<( )>>.
21
+ const TRIPLE_RESOURCE_DECODED = '<<(<http://example.com/resource/person/W6J1827> <http://example.com/ontology#hasAddress> <http://example.com/resource/person/W6J1827/address>)>>';
22
+ const TRIPLE_RESOURCE = encodeURIComponent(TRIPLE_RESOURCE_DECODED);
23
+ const TRIPLE_RESOURCE_LOCAL_NAMES = '<<(<W6J1827> <hasAddress> <address>)>>';
24
+ // A triple term whose object is a literal. It is deliberately not part of the test data, because it is
25
+ // used only to verify that shortening the IRIs of a triple term leaves its literals untouched.
26
+ const LITERAL_TRIPLE_RESOURCE_DECODED = '<<(<http://example.com/resource/person/W6J1827> <http://example.com/ontology#firstName> "Burgunda")>>';
27
+ const LITERAL_TRIPLE_RESOURCE = encodeURIComponent(LITERAL_TRIPLE_RESOURCE_DECODED);
28
+ const LITERAL_TRIPLE_RESOURCE_LOCAL_NAMES = '<<(<W6J1827> <firstName> "Burgunda")>>';
29
+ // The number of statements the resource view lists for the triple term - the four statements which
30
+ // annotate it in the test data plus the "rdf:reifies" statement which binds its reifier to it.
31
+ const TRIPLE_RESOURCE_STATEMENTS_COUNT = 5;
32
+ // The query which the resource view builds for a triple term - it looks up all statements having the triple term as an object.
33
+ const TRIPLE_TERM_LOOKUP_QUERY = `SELECT ?s ?p ?tt
34
+ WHERE {
35
+ VALUES ?tt {
36
+ ${TRIPLE_RESOURCE_DECODED}
37
+ }
38
+ ?s ?p ?tt .
39
+ }`;
40
+ // The link which both the header and the target link of a triple term point to.
41
+ const TRIPLE_TERM_LOOKUP_HREF = `sparql?query=${encodeURIComponent(TRIPLE_TERM_LOOKUP_QUERY)}`;
42
+ // The statement counts of the test data. The data annotates eleven triples with the RDF 1.2 reification
43
+ // syntax (<<s p o>>), and GraphDB expands each of them to a reifier plus an "rdf:reifies" statement
44
+ // pointing at the triple term. Those eleven extra statements are the reason why these counts are higher
45
+ // than the ones expected before the SPARQL 1.2 support was added.
46
+ const EXPLICIT_TYPE_STATEMENTS_COUNT = 24;
47
+ const IMPLICIT_TYPE_STATEMENTS_COUNT = 68;
48
+ const ALL_TYPE_STATEMENTS_COUNT = EXPLICIT_TYPE_STATEMENTS_COUNT + IMPLICIT_TYPE_STATEMENTS_COUNT;
49
+ const EXPLICIT_GRAPH_STATEMENTS_COUNT = 97;
50
+
51
+ // FIXME: Unskip when triple terms are implemented for resource view
52
+ describe.skip('Resource view', () => {
23
53
  let repositoryId;
24
54
  beforeEach(() => {
25
55
  repositoryId = 'repository-' + Date.now();
@@ -34,7 +64,7 @@ describe('Resource view', () => {
34
64
  });
35
65
 
36
66
  it('should open resource view with active role tab depend on url role parameter', () => {
37
- ResourceSteps.getAllRoles().forEach((role) => {
67
+ ResourceSteps.getPlainResourceRoles().forEach((role) => {
38
68
  ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=${role}`);
39
69
  ResourceSteps.verifyActiveRoleTab(role);
40
70
  });
@@ -98,26 +128,26 @@ describe('Resource view', () => {
98
128
  ResourceSteps.visit(`uri=${IMPLICIT_EXPLICIT_RESOURCE}&role=all`);
99
129
 
100
130
  // Then I expect to see all triples of explicit context, because default value of the dropdown is "Explicit only".
101
- YasrSteps.getResults().should('have.length', 24);
131
+ YasrSteps.getResults().should('have.length', EXPLICIT_TYPE_STATEMENTS_COUNT);
102
132
  YasrSteps.getResultLink(0, 4).should('contain', CONTEXT_EXPLICIT);
103
133
 
104
134
  // When I chose to display implicit only.
105
135
  ResourceSteps.selectImplicitOnlyInference();
106
136
 
107
137
  // Then I expect triples of implicit context to be displayed only.
108
- YasrSteps.getResults().should('have.length', 67);
138
+ YasrSteps.getResults().should('have.length', IMPLICIT_TYPE_STATEMENTS_COUNT);
109
139
 
110
140
  // When I chose to display both context.
111
141
  ResourceSteps.selectExplicitAndImplicitInference();
112
142
 
113
143
  // Then I expect the triples of both context to be displayed.
114
- YasrSteps.getResults().should('have.length', 91);
144
+ YasrSteps.getResults().should('have.length', ALL_TYPE_STATEMENTS_COUNT);
115
145
 
116
146
  // When I chose to display explicit context only.
117
147
  ResourceSteps.selectExplicitOnlyInference();
118
148
 
119
149
  // Then I expect triples of explicit context to be displayed only.
120
- YasrSteps.getResults().should('have.length', 24);
150
+ YasrSteps.getResults().should('have.length', EXPLICIT_TYPE_STATEMENTS_COUNT);
121
151
  });
122
152
 
123
153
  context('Same as', () => {
@@ -330,7 +360,7 @@ describe('Resource view', () => {
330
360
  ResourceSteps.selectContextRole();
331
361
 
332
362
  // Then I expect to see all triples of resource without mater of its role,
333
- YasrSteps.getResults().should('have.length', 86);
363
+ YasrSteps.getResults().should('have.length', EXPLICIT_GRAPH_STATEMENTS_COUNT);
334
364
  // and inference dropdown should be disabled.
335
365
  ResourceSteps.getInferenceSelectElement().should('be.disabled');
336
366
 
@@ -338,46 +368,141 @@ describe('Resource view', () => {
338
368
  ResourceSteps.selectAllRole();
339
369
 
340
370
  // Then I expect to see all triples of resource without mater of its role.
341
- YasrSteps.getResults().should('have.length', 86);
371
+ YasrSteps.getResults().should('have.length', EXPLICIT_GRAPH_STATEMENTS_COUNT);
372
+ });
373
+
374
+ it('should keep all role tabs enabled when the resource is not a triple term', () => {
375
+ // When I load a resource which is not a triple term.
376
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
377
+
378
+ // Then I expect all role tabs to be enabled,
379
+ ResourceSteps.getPlainResourceRoles().forEach((role) => ResourceSteps.verifyRoleTabEnabled(role));
380
+
381
+ // and the triple term links to not be rendered,
382
+ ResourceSteps.getTripleResourceLink().should('not.exist');
383
+ ResourceSteps.getTargetLink().should('not.exist');
384
+
385
+ // but the source link of a plain resource to be rendered instead.
386
+ ResourceSteps.getSourceLink().should('exist');
387
+ });
388
+
389
+ it('should not offer the "triple term" role tab when the resource is not a triple term', () => {
390
+ // When I load a resource which is not a triple term.
391
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
392
+
393
+ // Then I expect the "triple term" tab to not be rendered at all, because that role
394
+ // applies to triple terms only,
395
+ ResourceSteps.verifyRoleTabMissing(TRIPLE_TERM_ROLE_LABEL);
396
+ // and only the roles of a plain resource to be offered.
397
+ ResourceSteps.getRoleTabs().should('have.length', ResourceSteps.getPlainResourceRoles().length);
398
+ });
399
+
400
+ it('should fall back to the subject role when the url asks for the "triple term" role of a plain resource', () => {
401
+ // When I load a resource which is not a triple term with the triple term role.
402
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=triple-term`);
403
+
404
+ // Then I expect the role to fall back to the default one,
405
+ ResourceSteps.verifyActiveRoleTab('subject');
406
+ // and the role url parameter to be corrected as well.
407
+ cy.getQueryParam('role').should('eq', 'subject');
408
+
409
+ // And I expect the triples of the resource as subject to be listed.
410
+ YasrSteps.getResults().should('have.length', 1);
411
+ YasrSteps.getResultLink(0, 1).should('contain', SUBJECT_RESOURCE);
342
412
  });
343
413
  });
344
414
 
345
415
  context('Triple resource', () => {
346
- it('should show triple resource', () => {
416
+ it('should show triple resource shortened in the header and in full as a target', () => {
347
417
  // When I visit resource view with triple resource.
348
418
  ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
349
419
 
350
- // Then I expect resource link to exist.
351
- ResourceSteps.getTripleResourceLink().should('contain.text', '<<<W6J1827> <hasAddress> <address>>>');
420
+ // Then I expect the header link to show the triple term with shortened IRIs,
421
+ ResourceSteps.verifyTrimmedText(ResourceSteps.getTripleResourceLink(), TRIPLE_RESOURCE_LOCAL_NAMES);
422
+ // and the full triple term to be shown as a tooltip.
423
+ ResourceSteps.getTripleResourceLink().should('have.attr', 'gdb-tooltip', TRIPLE_RESOURCE_DECODED);
424
+
425
+ // And I expect the target link to show the triple term with its full IRIs.
426
+ ResourceSteps.verifyTrimmedText(ResourceSteps.getTargetLink(), TRIPLE_RESOURCE_DECODED);
352
427
 
353
- // And I expect to see data table
428
+ // And I expect the source link of a plain resource to not be rendered.
429
+ ResourceSteps.getSourceLink().should('not.exist');
430
+
431
+ // And I expect to see data table with the statements annotating the triple term.
354
432
  ResourceSteps.getDataTable().should('exist').and('be.visible');
355
- // When I click on the link.
356
- ResourceSteps.clickOnTripleResourceLink();
433
+ YasrSteps.getResults().should('have.length', TRIPLE_RESOURCE_STATEMENTS_COUNT);
434
+ });
357
435
 
358
- // Then I expect to see sparql query view,
359
- SparqlEditorSteps.verifyUrl();
360
- YasguiSteps.getTabs().should('have.length', 2);
361
- // and a describe query to be present
362
- YasqeSteps.getActiveTabQuery().should('contain', 'describe <<<http://example.com/resource/person/W6J1827> <http://example.com/ontology#hasAddress> <http://example.com/resource/person/W6J1827/address>>>');
436
+ it('should shorten only the IRIs of a triple term and leave its literals unchanged', () => {
437
+ // When I visit resource view with a triple term whose object is a literal.
438
+ ResourceSteps.visit(`triple=${LITERAL_TRIPLE_RESOURCE}&role=subject`);
363
439
 
440
+ // Then I expect the header link to show the IRIs shortened and the literal as it is,
441
+ ResourceSteps.verifyTrimmedText(ResourceSteps.getTripleResourceLink(), LITERAL_TRIPLE_RESOURCE_LOCAL_NAMES);
442
+ // and the target link to show the whole triple term as it is.
443
+ ResourceSteps.verifyTrimmedText(ResourceSteps.getTargetLink(), LITERAL_TRIPLE_RESOURCE_DECODED);
444
+ });
445
+
446
+ it('should point both the header and the target link to the triple term lookup query', () => {
364
447
  // When I visit resource view with triple resource.
365
448
  ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
366
449
 
367
- // Then I expect target link to exist.
368
- ResourceSteps.getTargetLink().should('contain.text', '<<<http://example.com/resource/person/W6J1827> <http://example.com/ontology#hasAddress> <http://example.com/resource/person/W6J1827/address>>>');
450
+ // Then I expect both links to point to the sparql editor with the triple term lookup query.
451
+ ResourceSteps.getTripleResourceLink().should('have.attr', 'href', TRIPLE_TERM_LOOKUP_HREF);
452
+ ResourceSteps.getTargetLink().should('have.attr', 'href', TRIPLE_TERM_LOOKUP_HREF);
453
+ });
369
454
 
370
- // And I expect to see data table
371
- ResourceSteps.getDataTable().should('exist').and('be.visible');
372
- // When I click on the link.
373
- ResourceSteps.clickOnTripleResourceLink();
374
-
375
- // Then I expect to see sparql query view,
376
- SparqlEditorSteps.verifyUrl();
377
- YasguiSteps.getTabs().should('have.length', 2);
378
- // and a describe query to be present
379
- YasqeSteps.getActiveTabQuery().should('contain', 'describe <<<http://example.com/resource/person/W6J1827> <http://example.com/ontology#hasAddress> <http://example.com/resource/person/W6J1827/address>>>');
380
- YasguiSteps.getCurrentTab().should('contain', 'Unnamed 1');
455
+ it('should activate the "triple term" role tab and disable all other role tabs', () => {
456
+ // When I visit resource view with triple resource.
457
+ ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
458
+
459
+ // Then I expect the "triple term" tab to be the active one, regardless of the role url parameter,
460
+ ResourceSteps.verifyActiveRoleTab(TRIPLE_TERM_ROLE_LABEL);
461
+ // and the role url parameter to be corrected to the triple term role.
462
+ cy.getQueryParam('role').should('eq', 'triple-term');
463
+
464
+ // And I expect all other role tabs to be disabled.
465
+ ResourceSteps.getRoleTabs().should('have.length', ResourceSteps.getAllRoles().length);
466
+ ResourceSteps.getPlainResourceRoles().forEach((role) => ResourceSteps.verifyRoleTabDisabled(role));
467
+
468
+ // When I click on a disabled role tab.
469
+ ResourceSteps.selectSubjectRole();
470
+
471
+ // Then I expect the role to remain unchanged.
472
+ ResourceSteps.verifyActiveRoleTab(TRIPLE_TERM_ROLE_LABEL);
473
+ cy.getQueryParam('role').should('eq', 'triple-term');
474
+ });
475
+
476
+ it('should activate the "triple term" role tab when the role url parameter is missing', () => {
477
+ // When I visit resource view with a triple resource and without a role parameter.
478
+ ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}`);
479
+
480
+ // Then I expect the "triple term" tab to be the active one,
481
+ ResourceSteps.verifyActiveRoleTab(TRIPLE_TERM_ROLE_LABEL);
482
+ // and the role url parameter to be set to the triple term role.
483
+ cy.getQueryParam('role').should('eq', 'triple-term');
484
+ });
485
+
486
+ // The header link and the target link render the same triple term, so both of them have to lead
487
+ // to the same lookup query in the sparql editor.
488
+ [
489
+ {label: 'header', click: () => ResourceSteps.clickOnTripleResourceLink()},
490
+ {label: 'target', click: () => ResourceSteps.clickOnTargetLink()}
491
+ ].forEach(({label, click}) => {
492
+ it(`should open the sparql editor with a triple term lookup query when the ${label} link is clicked`, () => {
493
+ // When I visit resource view with triple resource.
494
+ ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
495
+
496
+ // When I click on the link.
497
+ click();
498
+
499
+ // Then I expect to see sparql query view,
500
+ SparqlEditorSteps.verifyUrl();
501
+ YasguiSteps.getTabs().should('have.length', 2);
502
+ YasguiSteps.getCurrentTab().should('contain', 'Unnamed 1');
503
+ // and the triple term lookup query to be present.
504
+ YasqeSteps.getActiveTabQuery().should('eq', TRIPLE_TERM_LOOKUP_QUERY);
505
+ });
381
506
  });
382
507
  });
383
508
 
@@ -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', 6);
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], ACL_VIEW[4]]);
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": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
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', 4);
179
- AclManagementSteps.getMoveDownButtons().should('have.length', 4);
180
- AclManagementSteps.deleteRuleButtons().should('have.length', 5);
181
- AclManagementSteps.editRuleButtons().should('have.length', 5);
182
- AclManagementSteps.createRuleButtons().should('have.length', 5);
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', 5);
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', 6);
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', 5);
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', 5);
38
+ AclManagementSteps.getAclRules().should('have.length', 4);
39
39
  // When I try remove it again and confirm the operation
40
- AclManagementSteps.deleteRule(4);
41
- ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #5?');
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', 4);
46
- AclManagementSteps.checkStatementRules([ACL_VIEW[0], ACL_VIEW[1], ACL_VIEW[2], ACL_VIEW[3]]);
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', 4);
30
- AclManagementSteps.getMoveDownButtons().should('have.length', 4);
31
- AclManagementSteps.deleteRuleButtons().should('have.length', 5);
32
- AclManagementSteps.editRuleButtons().should('have.length', 5);
33
- AclManagementSteps.createRuleButtons().should('have.length', 5);
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', 5);
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', 5);
49
+ AclManagementSteps.getAclRules().should('have.length', 4);
50
50
  AclManagementSteps.checkRuleEditForm(2, {
51
- subject: '<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> "test aber auf Deutsch"@de>>',
52
- predicate: '*',
53
- object: '"test aber auf Deutsch"@en',
54
- context: '<http://example.com/graph1>',
55
- role: 'ROLE3',
56
- policy: 'deny'
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', 5);
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], ACL_VIEW[4]]);
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', 5);
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], ACL_VIEW[4]]);
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], ACL_VIEW[4]]);
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(5);
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', 5);
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(5);
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', 5);
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], ACL_VIEW[3]]);
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', () => {