graphdb-workbench-tests 2.8.1 → 2.8.2-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.
@@ -269,7 +269,7 @@
269
269
  "loading_rules": "Error during ACL rules",
270
270
  "updating_rules": "Error during ACL rules update",
271
271
  "duplicated_rules": "Every ACL rule should be unique.",
272
- "role_length_too_short": "Too short"
272
+ "role_length_too_short": "Too short or not \"*\""
273
273
  },
274
274
  "defaults": {
275
275
  "asterisk": "* - Any RDF value",
@@ -211,6 +211,10 @@ describe('ACL Management: create rule', () => {
211
211
  AclManagementSteps.addRuleInBeginning();
212
212
  AclManagementSteps.selectPolicy(0, 'allow');
213
213
  AclManagementSteps.fillRole(0, 'A');
214
+ // And I expect the prefix warning to NOT appear
215
+ AclManagementSteps.getPrefixWarning(0).should('not.exist');
216
+ // And I expect the prefix warning icon to NOT appear
217
+ AclManagementSteps.getWarningIcon(0).should('not.exist');
214
218
  AclManagementSteps.selectOperation(0, 'write');
215
219
  AclManagementSteps.fillSubject(0, '<urn:Mary>');
216
220
  AclManagementSteps.fillPredicate(0, '*');
@@ -218,14 +222,39 @@ describe('ACL Management: create rule', () => {
218
222
  AclManagementSteps.fillContext(0, '*');
219
223
 
220
224
  // Then I expect an error notification to be displayed that tells me this ROLE length is not allowed
221
- AclManagementSteps.getFieldError().contains('Too short');
225
+ AclManagementSteps.getFieldError().contains('Too short or not "*"');
226
+ });
227
+
228
+ it('should allow creating a new rule if CUSTOM ROLE is a wildcard (*)', () => {
229
+ // Given I have a defined number of rules at the beginning
230
+ AclManagementSteps.getAclRules().should('have.length', 5);
231
+ // When I am on "ACL Management" page and create a new rule with a CUSTOM ROLE of 1 symbol (a wildcard)
232
+ AclManagementSteps.addRuleInBeginning();
233
+ AclManagementSteps.selectPolicy(0, 'allow');
234
+ AclManagementSteps.fillRole(0, '*');
235
+ AclManagementSteps.selectOperation(0, 'write');
236
+ AclManagementSteps.fillSubject(0, '<urn:Mary>');
237
+ AclManagementSteps.fillPredicate(0, '*');
238
+ AclManagementSteps.fillObject(0, '*');
239
+ AclManagementSteps.fillContext(0, '*');
240
+
241
+ // Then I expect to not see an error
242
+ AclManagementSteps.getFieldError().should('not.exist');
243
+ // When I save the rule
244
+ AclManagementSteps.saveRule(0);
245
+ // When I save the rules
246
+ AclManagementSteps.saveAcl();
247
+ // Then the table should contain the new rule
248
+ AclManagementSteps.getSavedRoleField(0).should('contain', '*');
249
+ AclManagementSteps.getAclRules().should('have.length', 6);
222
250
  });
223
251
 
224
252
  it('should show message if role prefix is CUSTOM_', () => {
225
253
  // When I am on "ACL Management" page and create a new rule with a CUSTOM_ prefix
226
254
  AclManagementSteps.addRuleInBeginning();
227
255
  AclManagementSteps.selectPolicy(0, 'allow');
228
- AclManagementSteps.fillRole(0, 'CUSTOM_ROLE_FOO');
256
+ // When I enter the prefix in lowercase, the logic should still detect it
257
+ AclManagementSteps.fillRole(0, 'custom_ROLE_FOO');
229
258
 
230
259
  // Then I expect the prefix warning to appear
231
260
  AclManagementSteps.getPrefixWarning(0).should('be.visible');
@@ -12,6 +12,8 @@ describe('Plugins view', () => {
12
12
  cy.presetRepository(repositoryId);
13
13
  cy.initializeRepository(repositoryId);
14
14
  LicenseStubs.spyGetLicense();
15
+ PluginsStubs.spyPluginsGet(repositoryId);
16
+ PluginsSteps.visit();
15
17
  });
16
18
 
17
19
  afterEach(() => {
@@ -19,8 +21,6 @@ describe('Plugins view', () => {
19
21
  });
20
22
 
21
23
  it('Should allow to enable and disable the plugins', () => {
22
- PluginsStubs.spyPluginsGet(repositoryId);
23
- PluginsSteps.visit();
24
24
  cy.wait('@get-license');
25
25
  cy.wait('@get-plugins');
26
26
  PluginsSteps.waitUntilPluginsPageIsLoaded();
@@ -31,9 +31,10 @@ describe('Plugins view', () => {
31
31
  PluginsSteps.getPluginSwitchField('history').should('be.checked');
32
32
  PluginsSteps.togglePlugin('history');
33
33
 
34
- PluginsSteps.visit();
34
+ cy.reload();
35
35
  cy.wait('@get-plugins');
36
-
36
+ PluginsSteps.waitUntilPluginsPageIsLoaded();
37
+ PluginsSteps.getPluginsView().should('be.visible');
37
38
  PluginsSteps.getPluginByName('history').should('be.visible');
38
39
  PluginsSteps.getPluginSwitchField('history').should('not.be.checked');
39
40
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.8.1",
3
+ "version": "2.8.2-RC1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "2.8.1",
9
+ "version": "2.8.2-RC1",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "cypress": "^13.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.8.1",
3
+ "version": "2.8.2-RC1",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",