graphdb-workbench-tests 3.4.0-TR7 → 3.4.0-TR8

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.
@@ -43,12 +43,14 @@ describe('Visual graph linksLimit URL parameter', () => {
43
43
 
44
44
  // Then, I expect to see the visual graph with the default linksLimit
45
45
  BaseSteps.getUrl().should('include', `linksLimit=${DEFAULT_LINKS_LIMIT}`);
46
-
46
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have less than that
47
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
47
48
 
48
49
  // When, I update the link limit from the input field
49
50
  VisualGraphSteps.updateLinksLimitField(5);
50
-
51
- // Then I expect the URL to include the updated linksLimit in the URL
51
+ // Then I limit shown warning to exist,since we have more than 5 links
52
+ VisualGraphSteps.getShownLimitMessage().should('exist');
53
+ // And I expect the URL to include the updated linksLimit in the URL
52
54
  BaseSteps.getUrl().should('include', 'linksLimit=5');
53
55
  // And, I expect to see the visual graph with the updated linksLimit
54
56
  VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
@@ -98,12 +100,18 @@ describe('Visual graph linksLimit URL parameter', () => {
98
100
  VisualGraphSteps.openGraphConfig(configName);
99
101
 
100
102
  // Then, I expect to see 10 nodes before changing the limit
101
- BaseSteps.getUrl().should('include', 'linksLimit=10');
103
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
102
104
  VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
103
105
 
106
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
107
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
108
+
104
109
  // When, I update the link limit from the input field
105
110
  VisualGraphSteps.updateLinksLimitField(5);
106
111
 
112
+ // Then I limit shown warning to exist, since we have more than 5 links available
113
+ VisualGraphSteps.getShownLimitMessage().should('exist');
114
+
107
115
  // Then I expect the URL to include the updated linksLimit in the URL
108
116
  BaseSteps.getUrl().should('include', 'linksLimit=5');
109
117
  // And, I expect to see the visual graph with the updated linksLimit
@@ -125,9 +133,12 @@ describe('Visual graph linksLimit URL parameter', () => {
125
133
  VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
126
134
 
127
135
  // Then, I expect to see 10 nodes before changing the limit
128
- BaseSteps.getUrl().should('include', 'linksLimit=10');
136
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
129
137
  VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
130
138
 
139
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
140
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
141
+
131
142
  // When, I update the link limit from the input field
132
143
  VisualGraphSteps.updateLinksLimitField(5);
133
144
 
@@ -135,6 +146,20 @@ describe('Visual graph linksLimit URL parameter', () => {
135
146
  BaseSteps.getUrl().should('include', 'linksLimit=5');
136
147
  // And, I expect to see the visual graph with the updated linksLimit
137
148
  VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
149
+
150
+ // And, the limit shown warning should appear as we are showing the limit
151
+ VisualGraphSteps.getShownLimitMessage().should('exist');
152
+
153
+ // When, I set the limit to the number of nodes from the query
154
+ VisualGraphSteps.updateLinksLimitField(10);
155
+
156
+ // Then I expect limit shown warning to exist
157
+ VisualGraphSteps.getShownLimitMessage().should('exist');
158
+
159
+ // When I set it to 1 more than the number of nodes from the query
160
+ VisualGraphSteps.updateLinksLimitField(11);
161
+ // Then I expect the limit shown warning to not exist
162
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
138
163
  });
139
164
  });
140
165
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "3.4.0-TR7",
3
+ "version": "3.4.0-TR8",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "3.4.0-TR7",
9
+ "version": "3.4.0-TR8",
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": "3.4.0-TR7",
3
+ "version": "3.4.0-TR8",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -411,6 +411,10 @@ export class VisualGraphSteps extends BaseSteps {
411
411
  return this.getByTestId('invalid-links-limit');
412
412
  }
413
413
 
414
+ static getShownLimitMessage() {
415
+ return this.getByTestId('shown-links-limit');
416
+ }
417
+
414
418
  static openVisualGraphHome() {
415
419
  cy.get('.toolbar-holder').should('be.visible')
416
420
  .find('.return-home-btn').should('be.visible').click();