graphdb-workbench-tests 2.7.3 → 2.7.4-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/locale-en.json +6 -2
- package/integration/import/import-server-files.spec.js +40 -0
- package/integration/setup/aclmanagement/create-rule.spec.js +20 -0
- package/integration/setup/user-and-access.spec.js +9 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/import/import-steps.js +9 -1
- package/steps/setup/acl-management-steps.js +20 -0
- package/steps/setup/user-and-access-steps.js +4 -0
package/fixtures/locale-en.json
CHANGED
|
@@ -176,6 +176,9 @@
|
|
|
176
176
|
"role": "ROLE1",
|
|
177
177
|
"plugin": "Plugin"
|
|
178
178
|
},
|
|
179
|
+
"prefix_warning": {
|
|
180
|
+
"text": "Custom roles should be entered without the \"CUSTOM_\" prefix in Workbench"
|
|
181
|
+
},
|
|
179
182
|
"actions": {
|
|
180
183
|
"move_up": "Move the rule up",
|
|
181
184
|
"move_down": "Move the rule down",
|
|
@@ -935,6 +938,7 @@
|
|
|
935
938
|
"could.not.send.data": "Could not send data for import; {{data}}",
|
|
936
939
|
"could.not.send.url": "Could not send url for import; {{data}}",
|
|
937
940
|
"could.not.upload.file": "Could not upload file; {{data}}",
|
|
941
|
+
"upload.file.failure": "File upload failed.",
|
|
938
942
|
"could.not.update.text": "Could not update text import; {{data}}",
|
|
939
943
|
"text.snippet.not.imported": "Text snippet was edited but has not been imported again.",
|
|
940
944
|
"graph.already.in.list": "This graph is already in the list.",
|
|
@@ -1003,7 +1007,7 @@
|
|
|
1003
1007
|
"execution": "Import execution",
|
|
1004
1008
|
"work_in_background": "Imports are executed in the background while you continue working on other things.",
|
|
1005
1009
|
"to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
|
|
1006
|
-
"interrupt_support": "Interrupt is supported only when the
|
|
1010
|
+
"interrupt_support": "Interrupt is supported only when the repository is local.",
|
|
1007
1011
|
"parser_config": "Parser config options are not available for remote locations."
|
|
1008
1012
|
},
|
|
1009
1013
|
"on_server_import": {
|
|
@@ -1015,7 +1019,7 @@
|
|
|
1015
1019
|
"execution": "Import execution",
|
|
1016
1020
|
"work_in_background": "Imports are executed in the background while you continue working on other things.",
|
|
1017
1021
|
"to_reimport_again": "To reimport a file, URL or text snippet click the Import button again.",
|
|
1018
|
-
"interrupt_support": "Interrupt is supported only when the
|
|
1022
|
+
"interrupt_support": "Interrupt is supported only when the repository is local."
|
|
1019
1023
|
},
|
|
1020
1024
|
"on_file_size_limit": {
|
|
1021
1025
|
"file_import_options_info_1": "Explore other file import options - ",
|
|
@@ -144,4 +144,44 @@ describe('Import server files', () => {
|
|
|
144
144
|
// Then I expect the dialog closed
|
|
145
145
|
ImportResourceMessageDialog.getDialog().should('not.exist');
|
|
146
146
|
});
|
|
147
|
+
|
|
148
|
+
it('Should order by size', () => {
|
|
149
|
+
// When I sort the listed files by their size.
|
|
150
|
+
ImportServerFilesSteps.orderBySize();
|
|
151
|
+
|
|
152
|
+
// Then I expect the directories to be sorted in ascending order,
|
|
153
|
+
ImportServerFilesSteps.getResource(0).should('contain', "more-files");
|
|
154
|
+
ImportServerFilesSteps.getResource(3).should('contain', "more-files-with-error");
|
|
155
|
+
|
|
156
|
+
// and inner files to be sorted ascending as well.
|
|
157
|
+
// checks first folder files
|
|
158
|
+
ImportServerFilesSteps.getResource(1).should('contain', "jsonld-file.jsonld");
|
|
159
|
+
ImportServerFilesSteps.getResource(2).should('contain', "rdfxml.rdf");
|
|
160
|
+
// checks second folder files
|
|
161
|
+
ImportServerFilesSteps.getResource(4).should('contain', "import-resource-with-correct-data.jsonld");
|
|
162
|
+
ImportServerFilesSteps.getResource(5).should('contain', "import-resource-with-incorrect-data.rdf");
|
|
163
|
+
ImportServerFilesSteps.getResource(6).should('contain', "import-resource-with-long-error.rdf");
|
|
164
|
+
// checks files in root
|
|
165
|
+
ImportServerFilesSteps.getResource(7).should('contain', "bnodes.ttl");
|
|
166
|
+
ImportServerFilesSteps.getResource(8).should('contain', "test_turtlestar.ttls");
|
|
167
|
+
ImportServerFilesSteps.getResource(9).should('contain', "0007-import-file.jsonld");
|
|
168
|
+
|
|
169
|
+
// When I change the order by size.
|
|
170
|
+
ImportServerFilesSteps.orderBySize();
|
|
171
|
+
|
|
172
|
+
// Then I expect the directories to be sorted in descending order,
|
|
173
|
+
ImportServerFilesSteps.getResource(0).should('contain', "more-files-with-error");
|
|
174
|
+
ImportServerFilesSteps.getResource(4).should('contain', "more-files");
|
|
175
|
+
// checks first folder files
|
|
176
|
+
ImportServerFilesSteps.getResource(1).should('contain', "import-resource-with-long-error.rdf");
|
|
177
|
+
ImportServerFilesSteps.getResource(2).should('contain', "import-resource-with-incorrect-data.rdf");
|
|
178
|
+
ImportServerFilesSteps.getResource(3).should('contain', "import-resource-with-correct-data.jsonld");
|
|
179
|
+
// checks second folder files
|
|
180
|
+
ImportServerFilesSteps.getResource(5).should('contain', "rdfxml.rdf");
|
|
181
|
+
ImportServerFilesSteps.getResource(6).should('contain', "jsonld-file.jsonld");
|
|
182
|
+
// checks files in root
|
|
183
|
+
ImportServerFilesSteps.getResource(15).should('contain', "0007-import-file.jsonld");
|
|
184
|
+
ImportServerFilesSteps.getResource(16).should('contain', "test_turtlestar.ttls");
|
|
185
|
+
ImportServerFilesSteps.getResource(17).should('contain', "bnodes.ttl");
|
|
186
|
+
});
|
|
147
187
|
});
|
|
@@ -214,5 +214,25 @@ describe('ACL Management: create rule', () => {
|
|
|
214
214
|
// Then I expect an error notification to be displayed that tells me this ROLE length is not allowed
|
|
215
215
|
AclManagementSteps.getFieldError().contains('Too short');
|
|
216
216
|
});
|
|
217
|
+
|
|
218
|
+
it('should show message if role prefix is CUSTOM_', () => {
|
|
219
|
+
// When I am on "ACL Management" page and create a new rule with a CUSTOM_ prefix
|
|
220
|
+
AclManagementSteps.addRuleInBeginning();
|
|
221
|
+
AclManagementSteps.selectPolicy(0, 'allow');
|
|
222
|
+
AclManagementSteps.fillRole(0, 'CUSTOM_ROLE_FOO');
|
|
223
|
+
|
|
224
|
+
// Then I expect the prefix warning to appear
|
|
225
|
+
AclManagementSteps.getPrefixWarning().should('be.visible');
|
|
226
|
+
AclManagementSteps.getPrefixWarning().should('contain.text', 'Custom roles should be entered without the "CUSTOM_" prefix in Workbench');
|
|
227
|
+
// When I save the rule
|
|
228
|
+
AclManagementSteps.saveRule(0);
|
|
229
|
+
// Then the text should be how the user typed it
|
|
230
|
+
AclManagementSteps.getSavedRoleField(0).should('contain', 'CUSTOM_ROLE_FOO');
|
|
231
|
+
// And I expect a warning icon to appear
|
|
232
|
+
AclManagementSteps.getWarningIcon().should('be.visible');
|
|
233
|
+
AclManagementSteps.mouseoverWarningIcon();
|
|
234
|
+
// And the icon should have the same tooltip text as the warning
|
|
235
|
+
AclManagementSteps.getWarningIconTooltipText().should('be.visible').and('contain.text', 'Custom roles should be entered without the "CUSTOM_" prefix in Workbench');
|
|
236
|
+
});
|
|
217
237
|
});
|
|
218
238
|
|
|
@@ -105,6 +105,15 @@ describe('User and Access', () => {
|
|
|
105
105
|
UserAndAccessSteps.getFieldError().should('not.be.visible');
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
+
it('Adding a role with a CUSTOM_ prefix shows a warning message', () => {
|
|
109
|
+
// When I create a user
|
|
110
|
+
UserAndAccessSteps.clickCreateNewUserButton();
|
|
111
|
+
// And I add a custom role tag with prefix CUSTOM_
|
|
112
|
+
UserAndAccessSteps.addTextToCustomRoleField('CUSTOM_USER');
|
|
113
|
+
// There should be a warning text
|
|
114
|
+
UserAndAccessSteps.getPrefixWarning().should('contain', 'Custom roles should be entered without the "CUSTOM_" prefix in Workbench');
|
|
115
|
+
});
|
|
116
|
+
|
|
108
117
|
it('Warn users when setting no password when creating new user admin', () => {
|
|
109
118
|
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
110
119
|
createUser("adminWithNoPassword", PASSWORD, ROLE_CUSTOM_ADMIN);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4-RC1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "2.7.
|
|
9
|
+
"version": "2.7.4-RC1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
|
@@ -205,7 +205,7 @@ class ImportSteps {
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
static checkImportedStatusIsEmpty(resourceName) {
|
|
208
|
-
this.getResourceStatus(resourceName).find('.import-resource-message').
|
|
208
|
+
this.getResourceStatus(resourceName).find('.import-resource-message .success-messages').should('have.length', 0);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
static checkUserDataUploadedResource(index, resourceName) {
|
|
@@ -458,6 +458,14 @@ class ImportSteps {
|
|
|
458
458
|
.and('not.have.class', 'ng-animate')
|
|
459
459
|
.and('have.class', 'in');
|
|
460
460
|
}
|
|
461
|
+
|
|
462
|
+
static getSizeCell() {
|
|
463
|
+
return cy.get('th.cell-size');
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
static orderBySize() {
|
|
467
|
+
ImportSteps.getSizeCell().click();
|
|
468
|
+
}
|
|
461
469
|
}
|
|
462
470
|
|
|
463
471
|
export default ImportSteps;
|
|
@@ -157,6 +157,10 @@ export class AclManagementSteps {
|
|
|
157
157
|
return this.getRule(index).find('.role-cell textarea');
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
static getSavedRoleField(index) {
|
|
161
|
+
return this.getRule(index).find('.role-cell');
|
|
162
|
+
}
|
|
163
|
+
|
|
160
164
|
static fillRole(index, value) {
|
|
161
165
|
this.getRoleField(index).clear().type(value);
|
|
162
166
|
}
|
|
@@ -165,6 +169,22 @@ export class AclManagementSteps {
|
|
|
165
169
|
return cy.get('div.small');
|
|
166
170
|
}
|
|
167
171
|
|
|
172
|
+
static getPrefixWarning() {
|
|
173
|
+
return cy.get('.prefix-warning-text');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
static getWarningIcon() {
|
|
177
|
+
return cy.get('.icon-warning');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
static getWarningIconTooltipText() {
|
|
181
|
+
return cy.get('.angular-tooltip');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
static mouseoverWarningIcon() {
|
|
185
|
+
cy.get('.icon-warning').first().trigger('mouseover');
|
|
186
|
+
}
|
|
187
|
+
|
|
168
188
|
static getPluginField(index) {
|
|
169
189
|
return this.getRule(index).find('.plugin-cell textarea');
|
|
170
190
|
}
|