graphdb-workbench-tests 4.0.0-TR16 → 4.0.0-TR17

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.
@@ -115,7 +115,7 @@ describe('Graphs overview screen validation', () => {
115
115
  it('Should give the controls on the page accessible names', () => {
116
116
  // Then the search field should have a screen reader label and a placeholder
117
117
  GraphsOverviewSteps.getGraphsSearchLabel()
118
- .should('have.class', 'sr-only')
118
+ .should('have.class', 'screen-reader-only')
119
119
  .and('contain.text', 'Search Graphs');
120
120
  GraphsOverviewSteps.getGraphsSearchInput()
121
121
  .should('have.attr', 'id', 'search-graphs')
@@ -156,26 +156,38 @@ describe('Graph Navigator', () => {
156
156
  });
157
157
 
158
158
  describe('Settings', () => {
159
- it('should open the settings popover', () => {
159
+ it('should open the settings sidebar', () => {
160
160
  // Given I open the Graph Navigator view.
161
161
  GraphNavigatorSteps.visit();
162
162
 
163
163
  // When I click the Settings button.
164
164
  GraphNavigatorSteps.openSettings();
165
165
 
166
- // Then I expect the settings popover to be open.
167
- GraphNavigatorSteps.getSettingsPopover().should('be.visible');
166
+ // Then I expect the settings sidebar to be open.
167
+ GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
168
168
  GraphNavigatorSteps.getBrowseButton().should('contain', 'Browse');
169
169
  });
170
170
 
171
- it('should not offer reset when the default settings are in use', () => {
171
+ it('should keep the settings sidebar open when clicking on the page', () => {
172
+ // Given I have opened the settings.
173
+ GraphNavigatorSteps.visit();
174
+ GraphNavigatorSteps.openSettings();
175
+
176
+ // When I click on the canvas.
177
+ GraphNavigatorSteps.clickOnCanvas();
178
+
179
+ // Then I expect the sidebar to stay open.
180
+ GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
181
+ });
182
+
183
+ it('should disable reset when the default settings are in use', () => {
172
184
  // Given I open the settings of a repository without uploaded settings.
173
185
  GraphNavigatorSteps.visit();
174
186
  GraphNavigatorSteps.openSettings();
175
187
 
176
- // Then I expect no reset action, because there is nothing to reset to.
177
- GraphNavigatorSteps.getSettingsPopover().should('be.visible');
178
- GraphNavigatorSteps.getResetButton().should('not.exist');
188
+ // Then I expect the reset action to be disabled, because there is nothing to reset to.
189
+ GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
190
+ GraphNavigatorSteps.getResetButton().should('be.disabled');
179
191
  });
180
192
 
181
193
  it('should cancel a selected file', () => {
@@ -189,7 +201,7 @@ describe('Graph Navigator', () => {
189
201
  GraphNavigatorSteps.clickCancelFile();
190
202
 
191
203
  // Then I expect the file to be removed.
192
- GraphNavigatorSteps.getSettingsPopover().should('not.contain', SETTINGS_FILE_NAME);
204
+ GraphNavigatorSteps.getSettingsSidebar().should('not.contain', SETTINGS_FILE_NAME);
193
205
  GraphNavigatorSteps.getUploadButton().should('be.disabled');
194
206
  });
195
207
 
@@ -209,8 +221,8 @@ describe('Graph Navigator', () => {
209
221
  // When I cancel.
210
222
  GraphNavigatorSteps.cancelDialog();
211
223
 
212
- // Then I expect the popover to stay open with the file still selected.
213
- GraphNavigatorSteps.getSettingsPopover().should('be.visible');
224
+ // Then I expect the sidebar to stay open with the file still selected.
225
+ GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
214
226
  GraphNavigatorSteps.getSelectedSettingsFile(SETTINGS_FILE_NAME).should('exist');
215
227
 
216
228
  // When I upload and confirm.
@@ -222,7 +234,7 @@ describe('Graph Navigator', () => {
222
234
  GraphNavigatorSteps.getWorkspace().should('exist');
223
235
  });
224
236
 
225
- it('should show the validation errors of a rejected file on its row', () => {
237
+ it('should show the validation errors of a rejected file', () => {
226
238
  // Given I have selected a settings file with invalid values and an unknown property.
227
239
  GraphNavigatorSteps.visit();
228
240
  GraphNavigatorSteps.openSettings();
@@ -232,12 +244,12 @@ describe('Graph Navigator', () => {
232
244
  GraphNavigatorSteps.clickUpload();
233
245
  GraphNavigatorSteps.confirmDialog();
234
246
 
235
- // Then I expect the errors in a table on the file row.
247
+ // Then I expect the errors under the file.
236
248
  ToasterSteps.verifyNewToasterError('Could not upload the settings');
237
249
  GraphNavigatorSteps.getSelectedSettingsFile(INVALID_SETTINGS_FILE_NAME).should('exist');
238
250
  GraphNavigatorSteps.getUploadErrors().should('be.visible')
239
251
  .and('contain', '3 validation errors')
240
- .and('contain', 'Fix these properties in the file and upload it again.');
252
+ .and('contain', 'Fix the errors and upload again.');
241
253
  GraphNavigatorSteps.getUploadError('gn:acceptBlankNodes').should('contain', 'Must be of type boolean');
242
254
  GraphNavigatorSteps.getUploadError('gn:openWorldProperties').should('contain', 'Must be of type boolean');
243
255
  GraphNavigatorSteps.getUploadError('gn:unknownSetting')
@@ -267,16 +279,18 @@ describe('Graph Navigator', () => {
267
279
  GraphNavigatorSteps.clickUpload();
268
280
  GraphNavigatorSteps.confirmDialog();
269
281
  ToasterSteps.verifySuccess('The settings were uploaded');
282
+ // Wait for the toast to go, so it does not detach while the reset toast is verified.
283
+ ToasterSteps.getToast().should('not.exist');
270
284
 
271
- // When I click outside the settings.
285
+ // When I close the settings.
272
286
  GraphNavigatorSteps.closeSettings();
273
287
 
274
- // Then I expect the popover to close.
275
- GraphNavigatorSteps.getSettingsPopover().should('not.exist');
288
+ // Then I expect the sidebar to close.
289
+ GraphNavigatorSteps.getSettingsSidebar().should('not.exist');
276
290
 
277
291
  // When I reset them.
278
292
  GraphNavigatorSteps.openSettings();
279
- GraphNavigatorSteps.getResetButton().should('be.visible');
293
+ GraphNavigatorSteps.getResetButton().should('be.enabled');
280
294
  GraphNavigatorSteps.clickReset();
281
295
 
282
296
  // Then I expect a confirmation that warns the diagram may behave unexpectedly.
@@ -88,7 +88,7 @@ describe('Resource view', () => {
88
88
  YasrSteps.getResults().should('have.length', 6);
89
89
 
90
90
  // When I turn off showing of blank nodes.
91
- ResourceSteps.clickOnShowBlankNodesButton();
91
+ ResourceSteps.clickOnShowBlankNodesCheckbox();
92
92
 
93
93
  // Then I expect to see all triples including this with blank node.
94
94
  YasrSteps.getResults().should('have.length', 5);
@@ -105,11 +105,11 @@ describe('Resource view', () => {
105
105
  VisualGraphSteps.verifyUrl();
106
106
  });
107
107
 
108
- it('should open the Graph Navigator view when click on the "Visualize Graph Navigator" button', () => {
108
+ it('should open the Graph Navigator view when click on the "Graph Navigator" button', () => {
109
109
  // When I am on resource view and page loaded a resource.
110
110
  ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}`);
111
111
 
112
- // When I click on "Visualize Graph Navigator" button.
112
+ // When I click on "Graph Navigator" button.
113
113
  ResourceSteps.clickOnVisualizeGraphNavigatorButton();
114
114
 
115
115
  // Then I expect to be redirected to the Graph Navigator view with the resource as the start uri.
@@ -8,6 +8,7 @@ import {LoginSteps} from '../../../steps/login-steps';
8
8
  import {MainMenuSteps} from '../../../steps/main-menu-steps';
9
9
  import {SecurityStubs} from '../../../stubs/security-stubs.js';
10
10
  import {RepositorySteps} from '../../../steps/repository-steps.js';
11
+ import {LayoutSteps} from '../../../steps/layout-steps';
11
12
 
12
13
  describe('User and Access', () => {
13
14
 
@@ -918,6 +919,9 @@ describe('User and Access', () => {
918
919
  }
919
920
 
920
921
  function navigateMenuPath(pathArray, expectedUrl, expectedTitle) {
922
+ // The layout rebuilds the navbar model when the previous navigation finishes loading, which closes any opened
923
+ // submenu, so wait for it before opening a menu group.
924
+ LayoutSteps.getLayout().should('not.have.class', 'loading');
921
925
  pathArray.forEach((label, index) => {
922
926
  if (index === 0) {
923
927
  MainMenuSteps.clickOnMenu(label);
@@ -5,7 +5,7 @@ import {GraphConfigStubs} from '../../../../stubs/graph-config-stubs.js';
5
5
  import {BrowserStubs} from '../../../../stubs/browser-stubs.js';
6
6
  import {VisualGraphSplitButtonSteps} from '../../../../steps/visual-graph-split-button-steps.js';
7
7
 
8
- describe('"Visualize" split button', () => {
8
+ describe('"VizGraph" split button', () => {
9
9
  let repositoryId;
10
10
 
11
11
  beforeEach(() => {
@@ -21,27 +21,27 @@ describe('"Visualize" split button', () => {
21
21
  cy.deleteRepository(repositoryId);
22
22
  });
23
23
 
24
- it('should display "Visualize" split button when user execute a CONSTRUCT query', () => {
24
+ it('should display "VizGraph" split button when user execute a CONSTRUCT query', () => {
25
25
  // WHEN: I visit a page with 'ontotext-yasgui-web-component' on it, and execute select query.
26
26
  executeSelectQuery();
27
- // THEN: I expect the 'Visualize' button to not be visible.
27
+ // THEN: I expect the 'VizGraph' button to not be visible.
28
28
  VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
29
29
 
30
30
  // WHEN: I execute a CONSTRUCT query.
31
31
  executeConstructQuery();
32
- // THEN: I expect the 'Visualize' button to be visible.
32
+ // THEN: I expect the 'VizGraph' button to be visible.
33
33
  VisualGraphSplitButtonSteps.getVisualizeMainButton().should('be.visible');
34
34
 
35
35
  // WHEN: I execute SELECT query again.
36
36
  executeSelectQuery();
37
- // THEN: I expect the 'Visualize' button to not be visible.
37
+ // THEN: I expect the 'VizGraph' button to not be visible.
38
38
  VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
39
39
  });
40
40
 
41
41
  it('should inform user that there no created graph configurations', () => {
42
42
  // GIVEN: There are no graph configurations.
43
43
  GraphConfigStubs.stubGetEmptyGraphConfigs();
44
- // AND: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
44
+ // AND: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
45
45
  executeConstructQuery();
46
46
 
47
47
  // WHEN: I open the dropdown.
@@ -57,7 +57,7 @@ describe('"Visualize" split button', () => {
57
57
  });
58
58
 
59
59
  it('should open graphs-visualizations view when click on main button', () => {
60
- // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
60
+ // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
61
61
  executeConstructQuery();
62
62
 
63
63
  // WHEN: I click on main button
@@ -69,7 +69,7 @@ describe('"Visualize" split button', () => {
69
69
  });
70
70
 
71
71
  it('should open graphs-visualizations view when select a graph configuration', () => {
72
- // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
72
+ // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
73
73
  executeConstructQuery();
74
74
  GraphConfigStubs.stubGetGraphConfigs();
75
75
 
@@ -0,0 +1,52 @@
1
+ import {LoginSteps} from "../../../steps/login-steps";
2
+ import {HeaderSteps} from "../../../steps/header-steps";
3
+ import {MainMenuSteps} from "../../../steps/main-menu-steps";
4
+ import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
5
+ import {ActiveRepositoryWidgetSteps} from "../../../steps/widgets/active-repository-widget-steps";
6
+
7
+ describe('Graph config owner actions', () => {
8
+ const password = 'Admin123!';
9
+ let repositoryId;
10
+ let username;
11
+ let graphConfigName;
12
+
13
+ beforeEach(() => {
14
+ repositoryId = 'graph-config-owner-' + Date.now();
15
+ username = 'graph-config-user-' + Date.now();
16
+ graphConfigName = 'graph-config-owner-' + Date.now();
17
+ cy.createRepository({id: repositoryId});
18
+ cy.presetRepository(repositoryId);
19
+ cy.createUser({username, password}, true);
20
+ cy.switchOnSecurity();
21
+ cy.loginAsAdmin();
22
+ cy.createGraphConfig(graphConfigName, repositoryId, true);
23
+ });
24
+
25
+ afterEach(() => {
26
+ cy.loginAsAdmin();
27
+ cy.switchOffSecurity(true);
28
+ cy.deleteGraphConfig(graphConfigName);
29
+ cy.deleteUser(username);
30
+ cy.deleteRepository(repositoryId);
31
+ });
32
+
33
+ it('should show edit and delete for own graph configs after switching users', () => {
34
+ // Given I am logged in as a basic user
35
+ LoginSteps.visitLoginPage();
36
+ LoginSteps.loginWithUser(username, password);
37
+ // Wait for the home page to load for the basic user. Cypress is fast and would log out before the page has
38
+ // loaded, so the page would never have the basic user and the test would not reproduce the problem.
39
+ ActiveRepositoryWidgetSteps.getActiveRepository().should('contain.text', repositoryId);
40
+ // And I log out
41
+ HeaderSteps.logout();
42
+
43
+ // When I log in as admin, without reloading the page
44
+ LoginSteps.loginWithUser('admin', 'root');
45
+ // And I open the Visual Graph page from the main menu
46
+ MainMenuSteps.clickOnVisualGraph();
47
+
48
+ // Then I expect to see the edit and delete buttons of the graph config I own
49
+ VisualGraphSteps.getEditConfigButton(graphConfigName).should('be.visible');
50
+ VisualGraphSteps.getDeleteConfigButton(graphConfigName).should('be.visible');
51
+ });
52
+ });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR16",
3
+ "version": "4.0.0-TR17",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "4.0.0-TR16",
9
+ "version": "4.0.0-TR17",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "@bahmutov/cypress-code-coverage": "^2.7.2",
@@ -5341,9 +5341,9 @@
5341
5341
  "license": "MIT"
5342
5342
  },
5343
5343
  "node_modules/fast-uri": {
5344
- "version": "3.1.8",
5345
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz",
5346
- "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==",
5344
+ "version": "3.1.9",
5345
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
5346
+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
5347
5347
  "dev": true,
5348
5348
  "funding": [
5349
5349
  {
@@ -8433,9 +8433,9 @@
8433
8433
  "license": "MIT"
8434
8434
  },
8435
8435
  "node_modules/qs": {
8436
- "version": "6.16.0",
8437
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz",
8438
- "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==",
8436
+ "version": "6.17.1",
8437
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.17.1.tgz",
8438
+ "integrity": "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==",
8439
8439
  "dev": true,
8440
8440
  "license": "BSD-3-Clause",
8441
8441
  "dependencies": {
@@ -9019,9 +9019,9 @@
9019
9019
  }
9020
9020
  },
9021
9021
  "node_modules/serialize-javascript": {
9022
- "version": "7.1.2",
9023
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.2.tgz",
9024
- "integrity": "sha512-GL2BWwVa6JydKO6l/ljVgjAZF4QJ3S7dWDWi53s5GZT8PJzD2fNxi67HANQGKAqPrwEpL5ba7gUBGi0Ls/sEoQ==",
9022
+ "version": "7.1.4",
9023
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.4.tgz",
9024
+ "integrity": "sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==",
9025
9025
  "dev": true,
9026
9026
  "license": "BSD-3-Clause",
9027
9027
  "peer": true,
@@ -9633,9 +9633,9 @@
9633
9633
  }
9634
9634
  },
9635
9635
  "node_modules/systeminformation": {
9636
- "version": "5.33.15",
9637
- "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.15.tgz",
9638
- "integrity": "sha512-s5RloL0F7xhN0ZjfHtLGnbf7EW74EI0N8NFL+1xR7Oxz9QA33obNZsl7lyfnJOhN04E/kGFPoJPlvY7TZ5fzmw==",
9636
+ "version": "5.33.19",
9637
+ "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.19.tgz",
9638
+ "integrity": "sha512-Zm7wGeCG7PqfvzegMJIzrxICopWqYCeLATVmvxOOci1isLcNVKgY4Fr0hhYQzvc7cgtK3377jQVChTFAnznOiA==",
9639
9639
  "dev": true,
9640
9640
  "license": "MIT",
9641
9641
  "os": [
@@ -9975,9 +9975,9 @@
9975
9975
  }
9976
9976
  },
9977
9977
  "node_modules/undici": {
9978
- "version": "6.29.0",
9979
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz",
9980
- "integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==",
9978
+ "version": "6.29.1",
9979
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
9980
+ "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
9981
9981
  "dev": true,
9982
9982
  "license": "MIT",
9983
9983
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR16",
3
+ "version": "4.0.0-TR17",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -67,11 +67,15 @@ export class GraphNavigatorSteps extends BaseSteps {
67
67
  }
68
68
 
69
69
  static closeSettings() {
70
+ cy.get('.graph-navigator-settings-drawer .p-drawer-close-button').click();
71
+ }
72
+
73
+ static clickOnCanvas() {
70
74
  GraphNavigatorSteps.getCanvas().click('bottomLeft');
71
75
  }
72
76
 
73
- static getSettingsPopover() {
74
- return cy.get('[data-test="graph-navigator-settings-popover"]');
77
+ static getSettingsSidebar() {
78
+ return cy.get('[data-test="graph-navigator-settings-sidebar"]');
75
79
  }
76
80
 
77
81
  static getSettingsFileInput() {
@@ -84,7 +88,7 @@ export class GraphNavigatorSteps extends BaseSteps {
84
88
  }
85
89
 
86
90
  static getSelectedSettingsFile(fileName) {
87
- return GraphNavigatorSteps.getSettingsPopover().contains(fileName);
91
+ return GraphNavigatorSteps.getSettingsSidebar().contains(fileName);
88
92
  }
89
93
 
90
94
  static getUploadErrors() {
@@ -96,7 +100,7 @@ export class GraphNavigatorSteps extends BaseSteps {
96
100
  }
97
101
 
98
102
  static getUploadButton() {
99
- return GraphNavigatorSteps.getSettingsPopover().find('.p-fileupload-upload-button');
103
+ return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-upload-button');
100
104
  }
101
105
 
102
106
  static clickUpload() {
@@ -104,11 +108,11 @@ export class GraphNavigatorSteps extends BaseSteps {
104
108
  }
105
109
 
106
110
  static clickCancelFile() {
107
- GraphNavigatorSteps.getSettingsPopover().find('.p-fileupload-cancel-button').click();
111
+ GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-cancel-button').click();
108
112
  }
109
113
 
110
114
  static getBrowseButton() {
111
- return GraphNavigatorSteps.getSettingsPopover().find('.p-fileupload-choose-button');
115
+ return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-choose-button');
112
116
  }
113
117
 
114
118
  static clickExport() {
@@ -5,6 +5,7 @@ import {SavedSparqlQueriesWidgetSteps} from './widgets/saved-sparql-queries-widg
5
5
  import {RepositorySteps} from './repository-steps';
6
6
  import {BaseSteps} from './base-steps';
7
7
  import {EnvironmentStubs} from '../stubs/environment-stubs';
8
+ import {LayoutSteps} from './layout-steps';
8
9
 
9
10
  class HomeSteps extends BaseSteps {
10
11
 
@@ -38,10 +39,6 @@ class HomeSteps extends BaseSteps {
38
39
  cy.visit(`/?repositoryId=${repositoryId}`);
39
40
  }
40
41
 
41
- static getLayout() {
42
- return cy.get('.wb-layout');
43
- }
44
-
45
42
  static getView() {
46
43
  return cy.get('#wb-home');
47
44
  }
@@ -59,11 +56,11 @@ class HomeSteps extends BaseSteps {
59
56
  }
60
57
 
61
58
  static getNavigationMenu() {
62
- return this.getLayout().find('.wb-navbar');
59
+ return LayoutSteps.getLayout().find('.wb-navbar');
63
60
  }
64
61
 
65
62
  static getPageHeader() {
66
- return this.getLayout().find('.wb-header');
63
+ return LayoutSteps.getLayout().find('.wb-header');
67
64
  }
68
65
 
69
66
  // ===========================
@@ -0,0 +1,6 @@
1
+ export class LayoutSteps {
2
+
3
+ static getLayout() {
4
+ return cy.get('.wb-layout');
5
+ }
6
+ }
@@ -50,12 +50,12 @@ export class ResourceSteps {
50
50
  ResourceSteps.getSameAsButton().find('.icon-same-as-off').should('have.length', 1);
51
51
  }
52
52
 
53
- static getShowBlankNodesButton() {
54
- return cy.get('.show-blank-nodes-btn');
53
+ static getShowBlankNodesCheckbox() {
54
+ return cy.getByTestId('show-blank-nodes-checkbox');
55
55
  }
56
56
 
57
- static clickOnShowBlankNodesButton() {
58
- ResourceSteps.getShowBlankNodesButton().click();
57
+ static clickOnShowBlankNodesCheckbox() {
58
+ ResourceSteps.getShowBlankNodesCheckbox().click();
59
59
  }
60
60
 
61
61
  static getDownloadAsDropdown() {
@@ -369,6 +369,14 @@ export class VisualGraphSteps extends BaseSteps {
369
369
  this.getGraphConfig(name).closest('tr').find('.delete-config').click();
370
370
  }
371
371
 
372
+ static getEditConfigButton(name) {
373
+ return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-edit-btn');
374
+ }
375
+
376
+ static getDeleteConfigButton(name) {
377
+ return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-delete-btn');
378
+ }
379
+
372
380
  static getGraphConfigSearchPanel() {
373
381
  return cy.get('.search-bar');
374
382
  }
@@ -19,6 +19,25 @@ Cypress.Commands.add('searchEasyVisualGraph', (searchGraph) => {
19
19
  });
20
20
  });
21
21
 
22
+ Cypress.Commands.add('createGraphConfig', (name, repositoryId, secured = false) => {
23
+ let headers = {'Content-Type': 'application/json', 'X-GraphDB-Repository': repositoryId};
24
+ if (secured) {
25
+ headers = {...headers, 'Authorization': Cypress.env('adminToken')};
26
+ }
27
+ return cy.request({
28
+ method: 'POST',
29
+ url: GRAPH_CONFIG_URL,
30
+ headers,
31
+ body: {
32
+ name,
33
+ startMode: 'search',
34
+ startQueryIncludeInferred: true,
35
+ startQuerySameAs: true,
36
+ shared: false
37
+ }
38
+ });
39
+ });
40
+
22
41
  Cypress.Commands.add('deleteGraphConfig', (name) => {
23
42
  cy.request({
24
43
  method: 'GET',