graphdb-workbench-tests 4.0.0-TR5 → 4.0.0-TR6

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.
@@ -42,7 +42,9 @@ describe('Cluster configuration', () => {
42
42
  });
43
43
 
44
44
  ClusterStubs.stubClusterGroupStatusWithTag();
45
+ ClusterStubs.stubClusterConfigWithTag();
45
46
  cy.wait('@3-nodes-cluster-group-status-tag');
47
+ cy.wait('@cluster-config-with-tag');
46
48
  // Assert the tags table contains the expected tag
47
49
  ClusterConfigurationSteps.getTagsTable().should('be.visible');
48
50
  ClusterConfigurationSteps.getTagsTableRows().should('contain.text', tagName);
@@ -62,6 +64,11 @@ describe('Cluster configuration', () => {
62
64
  cy.wait('@delete-tag').then((interception) => {
63
65
  expect(interception.request.body).to.deep.equal({tag: tagName});
64
66
  });
67
+ ClusterStubs.stubClusterGroupStatus();
68
+ ClusterStubs.stubClusterConfig();
69
+ cy.wait('@3-nodes-cluster-group-status');
70
+ cy.wait('@cluster-config');
71
+ ClusterConfigurationSteps.getTagsTable().should('not.exist');
65
72
  });
66
73
 
67
74
  it('should show an alert when there is no elected leader in the cluster', () => {
@@ -460,7 +460,7 @@ describe('Cluster management', () => {
460
460
  "verificationTimeout": 1500,
461
461
  "transactionLogMaximumSizeGB": 50.0,
462
462
  "batchUpdateInterval": 5000,
463
- "nodes": ['http://pc-desktop:7200', 'http://pc-desktop:7203']
463
+ "nodes": ['http://pc-desktop:7200', 'http://pc-desktop:7203'],
464
464
  });
465
465
  });
466
466
  // And expect success message to be displayed.
@@ -8,6 +8,19 @@ import HomeSteps from '../../../steps/home-steps.js';
8
8
  const FILE_TO_IMPORT = 'wine.rdf';
9
9
  const VALID_RESOURCE = 'USRegion';
10
10
 
11
+ /**
12
+ * Updates the links limit and waits for the graph reload it triggers to complete.
13
+ *
14
+ * @param {string} value the new links limit
15
+ */
16
+ function updateLinksLimit(value) {
17
+ VisualGraphSteps.updateLinksLimitField(value);
18
+ VisualGraphSteps.getLinksNumberField().should('have.value', value);
19
+ VisualGraphSteps.getUrl().should('match', new RegExp(`[?&]linksLimit=${value}(&|$)`));
20
+ VisualGraphSteps.getGraphVisualizationPane().should('be.visible');
21
+ VisualGraphSteps.getNodes();
22
+ }
23
+
11
24
  describe('Visual graph screen validation', () => {
12
25
 
13
26
  let repositoryId;
@@ -311,6 +324,20 @@ describe('Visual graph screen validation', () => {
311
324
  VisualGraphSteps.getPredicates().should('have.length', 36);
312
325
  });
313
326
 
327
+ it('Should close the settings panel when navigating away from the graph', () => {
328
+ // Given I have opened a graph
329
+ VisualGraphSteps.openUSRegionUri();
330
+ // And I have opened the visual graph settings
331
+ VisualGraphSteps.openVisualGraphSettings();
332
+ VisualGraphSteps.getSettingsPanel().should('be.visible');
333
+
334
+ // When I click the visual graph submenu
335
+ MainMenuSteps.clickOnSubmenuVisualGraph();
336
+
337
+ // Then I expect the settings panel to be closed
338
+ VisualGraphSteps.getSettingsPanel().should('not.exist');
339
+ });
340
+
314
341
  it('Test include inferred Statements', () => {
315
342
  VisualGraphSteps.openUSRegionUri();
316
343
  // Check include inferred
@@ -361,9 +388,11 @@ describe('Visual graph screen validation', () => {
361
388
  // Pick a type that is displayed in the diagram for example "vin:Zinfandel"
362
389
  VisualGraphSteps.getNodes().and('contain', 'Zinfandel');
363
390
 
391
+ // Set the connections limit to 10 and wait for the graph reload it triggers,
392
+ // so that the settings are opened after the navigation has completed
393
+ updateLinksLimit('10');
394
+
364
395
  VisualGraphSteps.openVisualGraphSettings();
365
- // Set the connections limit to 10
366
- VisualGraphSteps.updateLinksLimitField('10');
367
396
  // Go to Settings and set "vin:Zinfandel" as an ignored type
368
397
  VisualGraphSteps.getIgnoredTypesField().clear().type('vin:Zinfandel').type('{enter}');
369
398
 
@@ -395,12 +424,14 @@ describe('Visual graph screen validation', () => {
395
424
  // Pick a type that is displayed in the diagram for example "vin:Zinfandel"
396
425
  VisualGraphSteps.getPredicates().should('contain', 'hasSugar');
397
426
 
427
+ // Set the connections limit to 10 and wait for the graph reload it triggers,
428
+ // so that the settings are opened after the navigation has completed
429
+ updateLinksLimit('10');
430
+
398
431
  VisualGraphSteps.openVisualGraphSettings();
399
432
  // Go to predicates tab
400
433
  VisualGraphSteps.openPredicatesTab();
401
434
 
402
- // Set the connections limit to 10
403
- VisualGraphSteps.updateLinksLimitField('10');
404
435
  // Set "vin:hasSugar" as an ignored predicate
405
436
  VisualGraphSteps.getIgnoredPredicatesField().clear().type('vin:hasSugar').type('{enter}');
406
437
 
@@ -280,7 +280,7 @@ describe('User and Access', () => {
280
280
  LoginSteps.loginWithUser('admin', DEFAULT_ADMIN_PASSWORD);
281
281
  UserAndAccessSteps.getUsersTable().should('be.visible');
282
282
 
283
- cy.visit('/login?r=%252Fsparql');
283
+ cy.visit('/login?r=%2Fsparql');
284
284
  cy.reload();
285
285
  UserAndAccessSteps.getUrl().should('include', '/sparql');
286
286
  });
@@ -19,7 +19,6 @@ describe('User and Access', () => {
19
19
  repositoryId2 = 'user-access-repo2-' + Date.now();
20
20
  cy.createRepository({id: repositoryId1});
21
21
  cy.createRepository({id: repositoryId2});
22
- cy.presetRepository(repositoryId1);
23
22
  UserAndAccessSteps.visit();
24
23
  // Users table should be visible
25
24
  UserAndAccessSteps.getUsersTable().should('be.visible');
@@ -0,0 +1,17 @@
1
+ {
2
+ "electionMinTimeout": 8000,
3
+ "electionRangeTimeout": 6000,
4
+ "heartbeatInterval": 2000,
5
+ "messageSizeKB": 64,
6
+ "verificationTimeout": 1500,
7
+ "transactionLogMaximumSizeGB": 50.0,
8
+ "batchUpdateInterval": 5000,
9
+ "nodes": [
10
+ "pc-desktop:7302",
11
+ "pc-desktop:7300",
12
+ "pc-desktop:7301"
13
+ ],
14
+ "primaryTags": [
15
+ "test"
16
+ ]
17
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR5",
3
+ "version": "4.0.0-TR6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "4.0.0-TR5",
9
+ "version": "4.0.0-TR6",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "@bahmutov/cypress-code-coverage": "^2.7.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR5",
3
+ "version": "4.0.0-TR6",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ export class ErrorSteps {
9
9
  }
10
10
 
11
11
  static getNoConnectedRepoMessage() {
12
- return this.getRepositoryErrors().find('.alert.lead.alert-info');
12
+ return this.getRepositoryErrors().find('.alert.alert-info');
13
13
  }
14
14
 
15
15
  static verifyNoConnectedRepoMessage() {
@@ -77,6 +77,13 @@ export class ClusterStubs extends Stubs {
77
77
  }).as('cluster-config');
78
78
  }
79
79
 
80
+ static stubClusterConfigWithTag() {
81
+ cy.intercept('/rest/cluster/config', {
82
+ fixture: '/cluster/cluster-config-with-tag.json',
83
+ statusCode: 200
84
+ }).as('cluster-config-with-tag');
85
+ }
86
+
80
87
  static stubDeleteCluster() {
81
88
  cy.intercept('/rest/cluster/config?force=false', {
82
89
  fixture: '/cluster/delete-cluster.json',