graphdb-workbench-tests 2.6.0-TR7 → 2.6.0

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.
@@ -166,34 +166,43 @@
166
166
  "predicate": "Predicate",
167
167
  "object": "Object",
168
168
  "context": "Context",
169
- "role": "Custom role",
169
+ "role": "ROLE1",
170
170
  "plugin": "Plugin"
171
171
  },
172
172
  "actions": {
173
173
  "move_up": "Move the rule up",
174
174
  "move_down": "Move the rule down",
175
175
  "delete_rule": "Delete rule",
176
- "add_rule": "Add new rule",
176
+ "add_rule_first": "Add new rule in the beginning of the list",
177
+ "add_rule_next": "Add new rule after current rule",
177
178
  "edit_rule": "Edit rule",
178
- "apply_rule": "Apply rule",
179
+ "apply_rule": "Confirm rule editing",
179
180
  "cancel_rule_editing": "Cancel rule editing",
180
181
  "save_acl": "Save ACL",
181
- "cancel_acl_saving": "Cancel"
182
+ "cancel_acl_saving": "Cancel",
183
+ "create_rule": "Create rule"
182
184
  },
183
185
  "messages": {
184
- "no_data": "There are no rules defined in current repository",
186
+ "no_data": "There are no rules defined in current scope",
185
187
  "invalid_form": "Fill in valid data in all fields before saving rule",
186
188
  "delete_rule_confirmation": "Are you sure you want to delete the selected rule #{{index}}?",
187
189
  "revert_acl_list": "This operation will revert all the changes done in the ACL. Are you sure you want to proceed?",
188
190
  "rules_updated": "ACL was updated successfully",
189
191
  "rules_reverted": "ACL was reverted successfully",
190
- "unsaved_changes_confirmation": "You have unsaved changes. Are you sure that you want to exit?"
192
+ "unsaved_changes_confirmation": "You have unsaved changes. Are you sure that you want to exit?",
193
+ "save_acl_to_apply_rules": "Rules are not applied until saved"
191
194
  }
192
195
  },
193
196
  "errors": {
194
197
  "loading_rules": "Error during ACL rules",
195
198
  "updating_rules": "Error during ACL rules update",
196
199
  "duplicated_rules": "Every ACL rule should be unique."
200
+ },
201
+ "defaults": {
202
+ "asterisk": "* - Any RDF value",
203
+ "default": "default - The default graph",
204
+ "named": "named - Any named graph",
205
+ "all": "all - CLEAR ALL graphs"
197
206
  }
198
207
  },
199
208
  "config.name.label": "Config name",
@@ -856,7 +865,6 @@
856
865
  "import.label.bnodes": "BNodes",
857
866
  "import.label.datatype": "Datatype",
858
867
  "import.popover.relative.iri": "RDF data may contain relative IRIs. In order to make sense of them, they need to be resolved against a Base IRI. Typically data does not contain relative IRIs and this field may be left empty.",
859
- "import.popover.context.link": "Context link is used when importing JSONLD documents only.",
860
868
  "import.alert.not.valid.iri": "Not a valid IRI!",
861
869
  "import.target.graphs": "Target graphs",
862
870
  "import.into.graphs": "Data is imported into one or more graphs. Some RDF formats may specify graphs, while others do not support that. The latter are treated as if they specify the default graph.",
@@ -942,7 +950,6 @@
942
950
  "import.last.import.settings": "Last import settings",
943
951
  "import.mode.not.supported.constraint": "This mode is not supported when importing multiple items.",
944
952
  "import.enable.replace.option": "Enable this to replace the data in one or more graphs with the imported data.",
945
- "import.context.link": "Context link",
946
953
  "text.snippet.text.aria.placeholder": "# Example: rdf:predicate a rdf:Property .",
947
954
  "url.import.input.placeholder": "Data URL",
948
955
  "filesTable.interrupt.import": "Interrupt import",
@@ -1128,7 +1135,6 @@
1128
1135
  "required.field": "This field is required",
1129
1136
  "created.repo.success.msg": "The repository {{repoId}} has been created.",
1130
1137
  "empty.repoid.warning": "Repository ID cannot be empty",
1131
- "empty.context.or.frame.link": "Link cannot be empty",
1132
1138
  "invalid.ruleset.file.error": "Invalid rule-set file. Please upload a valid one.",
1133
1139
  "wrong.repo.name.error": "Wrong repo name",
1134
1140
  "edit.system.repo.warning": "<b>System</b> repository can't be edited",
@@ -1649,14 +1655,6 @@
1649
1655
  "error": "error",
1650
1656
  "import.rdf.data.label": "Import RDF data",
1651
1657
  "export.rdf.data": "Export RDF data",
1652
- "export.settings": "Export settings: JSON-LD",
1653
- "export": "Export",
1654
- "jsonld.mode": "JSON-LD mode",
1655
- "jsonld.mode.info": "JSON-LD mode allows you to choose different data formats for export",
1656
- "jsonld.context.link": "Context link",
1657
- "jsonld.frame.link": "Frame link",
1658
- "jsonld.frame.uri.placeholder": "http://example.com/frame.jsonld",
1659
- "jsonld.context.uri.placeholder": "http://example.com/context.jsonld",
1660
1658
  "saved.sparql.queries.label": "Saved SPARQL queries",
1661
1659
  "saved.sparql.queries.tooltip": "Execute a saved SPARQL query directly",
1662
1660
  "common.execute": "Execute",
@@ -20,8 +20,7 @@
20
20
  "normalizeLanguageTags": false,
21
21
  "verifyURISyntax": true,
22
22
  "verifyRelativeURIs": true,
23
- "stopOnError": true,
24
- "contextLink": null
23
+ "stopOnError": true
25
24
  },
26
25
  "xRequestIdHeaders": null
27
26
  }
@@ -123,13 +123,4 @@ describe('Graphs overview screen validation', () => {
123
123
  YasrSteps.getResultTableHeader().should('be.visible');
124
124
  YasrSteps.getResultTableHeaderColumns().should('have.length', 5);
125
125
  });
126
-
127
- it('Export repository in JSONLD format', () => {
128
- cy.get('.export-repository-btn').click();
129
- cy.get('.export-repo-format-JSONLD').click();
130
- cy.get('[id=wb-JSONLD-mode]').select(5);
131
- cy.get('[id=wb-JSONLD-context]').type('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
132
- cy.get('[id=wb-export-JSONLD]').click();
133
- cy.get('.modal-content').should('not.exist');
134
- });
135
126
  });
@@ -10,8 +10,6 @@ describe('Import screen validation - server files', () => {
10
10
  const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
11
11
  const TTLS_FOR_IMPORT = 'test_turtlestar.ttls';
12
12
  const TRIGS_FOR_IMPORT = 'test-trigstar.trigs';
13
- const JSONLD_FILE_FOR_IMPORT = '0007-import-file.jsonld';
14
- const JSONLD_CONTEXT = 'https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld';
15
13
 
16
14
  beforeEach(() => {
17
15
  repositoryId = 'server-import-' + Date.now();
@@ -44,22 +42,6 @@ describe('Import screen validation - server files', () => {
44
42
  .verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
45
43
  });
46
44
 
47
- // for this test it is necessary to set up a whitelist to GraphDB in this way: -Dgraphdb.jsonld.whitelist=https://w3c.github.io/json-ld-api/tests/*
48
- it('Test import Server files successfully with JSONLD context link settings', () => {
49
- ImportSteps.selectServerFile(JSONLD_FILE_FOR_IMPORT)
50
- .importServerFiles(true)
51
- .fillBaseURI(BASE_URI)
52
- .selectNamedGraph()
53
- .fillNamedGraph(CONTEXT)
54
- .expandAdvancedSettings()
55
- .setContextLinkToBeVisible()
56
- .enablePreserveBNodes()
57
- .fillContextLink(JSONLD_CONTEXT)
58
- .importFromSettingsDialog()
59
- .verifyImportStatus(JSONLD_FILE_FOR_IMPORT, SUCCESS_MESSAGE)
60
- .verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
61
- });
62
-
63
45
  it('Test import with resetting status of imported file', () => {
64
46
  ImportSteps
65
47
  .selectServerFile(FILE_FOR_IMPORT)
@@ -30,7 +30,7 @@ describe('ACL Management: delete rule', () => {
30
30
  AclManagementSteps.deleteRule(0);
31
31
  // Then I expect a confirmation dialog
32
32
  ModalDialogSteps.getDialog().should('be.visible');
33
- ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #0?');
33
+ ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #1?');
34
34
  // When I cancel operation
35
35
  ModalDialogSteps.clickOnCancelButton();
36
36
  // Then I expect the rule to remain in the list
@@ -38,7 +38,7 @@ describe('ACL Management: delete rule', () => {
38
38
  AclManagementSteps.getAclRules().should('have.length', 5);
39
39
  // When I try remove it again and confirm the operation
40
40
  AclManagementSteps.deleteRule(4);
41
- ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #4?');
41
+ ModalDialogSteps.getDialogBody().should('contain', 'Are you sure you want to delete the selected rule #5?');
42
42
  ModalDialogSteps.clickOnConfirmButton();
43
43
  // Then I expect the rule to be removed from the list
44
44
  ModalDialogSteps.getDialog().should('not.exist');
@@ -27,31 +27,32 @@ describe('ACL Management: rule scopes', () => {
27
27
  AclManagementSteps.getAclTable().should('be.visible');
28
28
  AclManagementSteps.getAclTabs().should('be.visible');
29
29
  AclManagementSteps.getNoDataMessage().should('be.visible');
30
- AclManagementSteps.getActiveTab().should('have.text', 'Statement ');
30
+ AclManagementSteps.getActiveTab().should('have.text', 'Statement');
31
31
  // When I select Clear graph tab
32
32
  AclManagementSteps.selectTab(1);
33
33
  // I expect empty rules table
34
34
  AclManagementSteps.getAclTabs().should('be.visible');
35
35
  AclManagementSteps.getNoDataMessage().should('be.visible');
36
- AclManagementSteps.getActiveTab().should('have.text', 'Clear graph ');
36
+ AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
37
37
  // When I select Plugins tab
38
38
  AclManagementSteps.selectTab(2);
39
39
  // I expect empty rules table
40
40
  AclManagementSteps.getAclTabs().should('be.visible');
41
41
  AclManagementSteps.getNoDataMessage().should('be.visible');
42
- AclManagementSteps.getActiveTab().should('have.text', 'Plugin ');
42
+ AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
43
43
  // When I select System tab
44
44
  AclManagementSteps.selectTab(3);
45
45
  // I expect empty rules table
46
46
  AclManagementSteps.getAclTabs().should('be.visible');
47
47
  AclManagementSteps.getNoDataMessage().should('be.visible');
48
- AclManagementSteps.getActiveTab().should('have.text', 'System ');
48
+ AclManagementSteps.getActiveTab().should('have.text', 'System');
49
49
  });
50
50
 
51
51
  it('Should create rules', () => {
52
52
  // I select Clear graph tab
53
53
  AclManagementSteps.selectTab(1);
54
- AclManagementSteps.getActiveTab().should('have.text', 'Clear graph ');
54
+ AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
55
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
55
56
  // I can create rule
56
57
  AclManagementSteps.addRuleInBeginning();
57
58
  // I fill the policy
@@ -59,15 +60,16 @@ describe('ACL Management: rule scopes', () => {
59
60
  // I fill in the role field
60
61
  AclManagementSteps.fillRole(0, 'ROLE1');
61
62
  // I fill in the context field
62
- AclManagementSteps.fillContext(0, '*');
63
+ AclManagementSteps.fillContext(0, 'all');
63
64
  // I save the rule
64
65
  AclManagementSteps.saveRule(0);
65
66
  // Then the tab label is changed
66
- AclManagementSteps.getActiveTab().should('contain', '*');
67
+ AclManagementSteps.getActiveTabDirtyIcon().should('be.visible');
67
68
 
68
69
  // I select Plugin tab
69
70
  AclManagementSteps.selectTab(2);
70
- AclManagementSteps.getActiveTab().should('have.text', 'Plugin ');
71
+ AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
72
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
71
73
  // I can create rule
72
74
  AclManagementSteps.addRuleInBeginning();
73
75
  // I fill the policy
@@ -81,11 +83,12 @@ describe('ACL Management: rule scopes', () => {
81
83
  // I save the rule
82
84
  AclManagementSteps.saveRule(0);
83
85
  // Then the tab label is changed
84
- AclManagementSteps.getActiveTab().should('contain', '*');
86
+ AclManagementSteps.getActiveTabDirtyIcon().should('be.visible');
85
87
 
86
88
  // I select System tab
87
89
  AclManagementSteps.selectTab(3);
88
- AclManagementSteps.getActiveTab().should('have.text', 'System ');
90
+ AclManagementSteps.getActiveTab().should('have.text', 'System');
91
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
89
92
  // I can create rule
90
93
  AclManagementSteps.addRuleInBeginning();
91
94
  // I fill the policy
@@ -97,11 +100,12 @@ describe('ACL Management: rule scopes', () => {
97
100
  // I save the rule
98
101
  AclManagementSteps.saveRule(0);
99
102
  // Then the tab label is changed
100
- AclManagementSteps.getActiveTab().should('contain', '*');
103
+ AclManagementSteps.getActiveTabDirtyIcon().should('be.visible');
101
104
 
102
105
  // I select Statement tab
103
106
  AclManagementSteps.selectTab(0);
104
- AclManagementSteps.getActiveTab().should('have.text', 'Statement ');
107
+ AclManagementSteps.getActiveTab().should('have.text', 'Statement');
108
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
105
109
  // I can create rule
106
110
  AclManagementSteps.addRuleInBeginning();
107
111
  // I fill the policy
@@ -121,7 +125,7 @@ describe('ACL Management: rule scopes', () => {
121
125
  // I save the rule
122
126
  AclManagementSteps.saveRule(0);
123
127
  // Then the tab label is changed
124
- AclManagementSteps.getActiveTab().should('contain', '*');
128
+ AclManagementSteps.getActiveTabDirtyIcon().should('be.visible');
125
129
 
126
130
  cy.intercept('PUT', '/rest/repositories/acl-management-*/acl').as('putCall');
127
131
 
@@ -134,7 +138,7 @@ describe('ACL Management: rule scopes', () => {
134
138
  "scope": "clear_graph",
135
139
  "policy": "deny",
136
140
  "role": "CUSTOM_ROLE1",
137
- "context": "*"
141
+ "context": "all"
138
142
  },
139
143
  {
140
144
  "scope": "plugin",
@@ -168,7 +172,8 @@ describe('ACL Management: rule scopes', () => {
168
172
  ApplicationSteps.getSuccessNotifications().should('be.visible');
169
173
 
170
174
  // I expect to be on Statement tab
171
- AclManagementSteps.getActiveTab().should('have.text', 'Statement ');
175
+ AclManagementSteps.getActiveTab().should('have.text', 'Statement');
176
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
172
177
  // I expect to have one statement rule
173
178
  AclManagementSteps.getAclRules().should('have.length', 1);
174
179
  const expectedStatementRule = {
@@ -185,18 +190,20 @@ describe('ACL Management: rule scopes', () => {
185
190
 
186
191
  // I visit Clear graph tab
187
192
  AclManagementSteps.selectTab(1);
188
- AclManagementSteps.getActiveTab().should('have.text', 'Clear graph ');
193
+ AclManagementSteps.getActiveTab().should('have.text', 'Clear graph');
194
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
189
195
  const expectedClearGraphRule = {
190
196
  "scope": "clear_graph",
191
197
  "policy": "deny",
192
198
  "role": "ROLE1",
193
- "context": "*"
199
+ "context": "all"
194
200
  };
195
201
  AclManagementSteps.checkClearGraphRules([expectedClearGraphRule]);
196
202
 
197
203
  // I visit Plugin tab
198
204
  AclManagementSteps.selectTab(2);
199
- AclManagementSteps.getActiveTab().should('have.text', 'Plugin ');
205
+ AclManagementSteps.getActiveTab().should('have.text', 'Plugin');
206
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
200
207
  const expectedPluginRule = {
201
208
  "scope": "plugin",
202
209
  "policy": "deny",
@@ -208,7 +215,8 @@ describe('ACL Management: rule scopes', () => {
208
215
 
209
216
  // I visit System tab
210
217
  AclManagementSteps.selectTab(3);
211
- AclManagementSteps.getActiveTab().should('have.text', 'System ');
218
+ AclManagementSteps.getActiveTab().should('have.text', 'System');
219
+ AclManagementSteps.getActiveTabDirtyIcon().should('not.exist');
212
220
  const expectedSystemRule = {
213
221
  "scope": "system",
214
222
  "policy": "allow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.6.0-TR7",
3
+ "version": "2.6.0",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -193,20 +193,6 @@ class ImportSteps {
193
193
  return ImportSteps;
194
194
  }
195
195
 
196
- static fillContextLink(contextLink) {
197
- ImportSteps.getSettingsForm().find('input[name="contextLink"]').type(contextLink).should('have.value', contextLink);
198
-
199
- return ImportSteps;
200
- }
201
-
202
- static setContextLinkToBeVisible() {
203
- ImportSteps.getSettingsForm().within(() => {
204
- cy.get('.contextLinkRow').invoke('attr', 'style', 'display: block !important');
205
- });
206
-
207
- return ImportSteps;
208
- }
209
-
210
196
  static resetStatusOfUploadedFiles() {
211
197
  // Button should disappear
212
198
  cy.get('#import-server #wb-import-clearStatuses')
@@ -69,6 +69,10 @@ export class AclManagementSteps {
69
69
  return this.getAclTabs().eq(index).click();
70
70
  }
71
71
 
72
+ static getActiveTabDirtyIcon() {
73
+ return this.getActiveTab().find('.icon-exclamation');
74
+ }
75
+
72
76
  static addRuleInBeginning() {
73
77
  this.getAddFirstRuleButton().click();
74
78
  }
@@ -110,7 +114,7 @@ export class AclManagementSteps {
110
114
  }
111
115
 
112
116
  static getSaveRuleDisabledButton(index) {
113
- return this.getRule(index).find('.save-rule-disabled-btn');
117
+ return this.getRule(index).find('.save-rule-btn');
114
118
  }
115
119
 
116
120
  static saveRule(index) {
@@ -122,7 +126,7 @@ export class AclManagementSteps {
122
126
  }
123
127
 
124
128
  static fillSubject(index, value) {
125
- this.getSubjectField(index).clear().type(value);
129
+ this.getSubjectField(index).clear({force: true}).scrollIntoView().type(value);
126
130
  }
127
131
 
128
132
  static getPredicateField(index) {
@@ -130,7 +134,7 @@ export class AclManagementSteps {
130
134
  }
131
135
 
132
136
  static fillPredicate(index, value) {
133
- this.getPredicateField(index).clear().type(value);
137
+ this.getPredicateField(index).clear({force: true}).scrollIntoView().type(value);
134
138
  }
135
139
 
136
140
  static getObjectField(index) {
@@ -138,7 +142,7 @@ export class AclManagementSteps {
138
142
  }
139
143
 
140
144
  static fillObject(index, value) {
141
- this.getObjectField(index).clear().type(value);
145
+ this.getObjectField(index).clear({force: true}).scrollIntoView().type(value);
142
146
  }
143
147
 
144
148
  static getContextField(index) {
@@ -146,7 +150,7 @@ export class AclManagementSteps {
146
150
  }
147
151
 
148
152
  static fillContext(index, value) {
149
- this.getContextField(index).clear().type(value);
153
+ this.getContextField(index).clear({force: true}).scrollIntoView().type(value);
150
154
  }
151
155
 
152
156
  static getRoleField(index) {
@@ -317,12 +321,12 @@ export class AclManagementSteps {
317
321
 
318
322
  static checkIfRuleSavingIsForbidden(index) {
319
323
  AclManagementSteps.getSaveRuleButton(index).should('not.exist');
320
- AclManagementSteps.getSaveRuleDisabledButton(index).should('be.visible');
324
+ AclManagementSteps.getSaveRuleDisabledButton(index).should('be.disabled');
321
325
  }
322
326
 
323
327
  static checkIfRuleSavingIsAllowed(index) {
324
328
  AclManagementSteps.getSaveRuleButton(index).should('be.visible');
325
- AclManagementSteps.getSaveRuleDisabledButton(index).should('not.exist');
329
+ AclManagementSteps.getSaveRuleDisabledButton(index).should('be.enabled');
326
330
  }
327
331
  }
328
332
 
@@ -1,27 +0,0 @@
1
- {
2
- "@graph": [
3
- {
4
- "@id": "http://example.org/test#chapter",
5
- "http://purl.org/dc/elements/1.1/description": ["Fun"],
6
- "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
7
- },
8
- {
9
- "@id": "http://example.org/test#jane",
10
- "http://example.org/vocab#authored": [{"@id": "http://example.org/test#chapter"}],
11
- "http://xmlns.com/foaf/0.1/name": ["Jane"]
12
- },
13
- {
14
- "@id": "http://example.org/test#john",
15
- "http://xmlns.com/foaf/0.1/name": ["John"]
16
- },
17
- {
18
- "@id": "http://example.org/test#library",
19
- "http://example.org/vocab#contains": [{
20
- "@id": "http://example.org/test#book",
21
- "http://example.org/vocab#contains": [ "this-is-not-an-IRI" ],
22
- "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
23
- "http://purl.org/dc/elements/1.1/title": ["My Book"]
24
- }]
25
- }
26
- ]
27
- }