graphdb-workbench-tests 2.0.0-TR8 → 2.0.1

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,7 +43,7 @@ describe('Similarity screen validation', () => {
43
43
 
44
44
  context('Creating similarity index', () => {
45
45
  beforeEach(() => {
46
- initRepositoryAndVisitSimilarityView()
46
+ initRepositoryAndVisitSimilarityView();
47
47
  });
48
48
 
49
49
  it('Create default text similarity index and view SPARQL query', () => {
@@ -93,7 +93,7 @@ describe('Similarity screen validation', () => {
93
93
 
94
94
  context('Index operations', () => {
95
95
  beforeEach(() => {
96
- initRepositoryAndVisitSimilarityView()
96
+ initRepositoryAndVisitSimilarityView();
97
97
  });
98
98
 
99
99
  it('Change Data query in Create index', () => {
@@ -156,7 +156,7 @@ describe('Similarity screen validation', () => {
156
156
 
157
157
  context('Searching in index', () => {
158
158
  beforeEach(() => {
159
- initRepositoryAndVisitSimilarityView()
159
+ initRepositoryAndVisitSimilarityView();
160
160
  });
161
161
 
162
162
  it('Search for entity in index', () => {
@@ -56,8 +56,8 @@ describe('Visual graph screen validation', () => {
56
56
  getSearchField().should('be.visible').type('.invalid_resource');
57
57
  // There are two buttons rendered in the DOM where one of them is hidden. We need the visible one.
58
58
  cy.get('.autocomplete-visual-btn:visible').click();
59
- // Verify that an "Invalid URI" message is displayed
60
- cy.get('#toast-container').should('contain', 'Invalid URI');
59
+ // Verify that an "Invalid IRI" message is displayed
60
+ cy.get('#toast-container').should('contain', 'Invalid IRI');
61
61
  });
62
62
 
63
63
  it('Test search for a valid resource', () => {
@@ -108,6 +108,36 @@ describe('Visual graph screen validation', () => {
108
108
  });
109
109
  });
110
110
 
111
+ it('Test invalid links limit should show error to user ', () => {
112
+ searchForResource(VALID_RESOURCE);
113
+ openVisualGraphSettings();
114
+
115
+ cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
116
+ // Verify that the default settings are as follows:
117
+ // Maximum links to show: 20
118
+ getLinksNumberField().and('have.value', '20');
119
+ // Update default 20
120
+ updateLinksLimitField('1001')
121
+ .then(() => {
122
+ // Try to put invalid value such as 1001
123
+ cy.get('.idError')
124
+ .should('be.visible')
125
+ .and('contain.text', 'Invalid links limit');
126
+ });
127
+ // Try to save the invalid value
128
+ getSaveSettingsButton().and('not.be.disabled')
129
+ .click();
130
+ // Then reset to default settings
131
+ getResetSettingsButton().and('not.be.disabled')
132
+ .click()
133
+ .then(() => {
134
+ getLinksNumberField().and('have.value', '20');
135
+ cy.get('.idError')
136
+ .should('not.exist');
137
+ });
138
+ });
139
+ });
140
+
111
141
  it('Test search for a valid resource with links', () => {
112
142
  searchForResource(VALID_RESOURCE);
113
143
  // Check include inferred
@@ -269,14 +299,14 @@ describe('Visual graph screen validation', () => {
269
299
 
270
300
  openVisualGraphSettings();
271
301
  // Set maximum links to 2
272
- getLinksNumberField().clear().type('2');
302
+ updateLinksLimitField('2');
273
303
  saveSettings();
274
304
  // Verify that the diagram is updated
275
305
  getPredicates().should('have.length', 2);
276
306
 
277
307
  openVisualGraphSettings();
278
308
  // Set maximum links to 100
279
- getLinksNumberField().clear().type('100');
309
+ updateLinksLimitField('100');
280
310
  saveSettings();
281
311
  // Verify that the diagram is updated
282
312
  getPredicates().should('have.length', 36);
@@ -333,11 +363,10 @@ describe('Visual graph screen validation', () => {
333
363
  getNodes().and('contain', 'Zinfandel');
334
364
 
335
365
  openVisualGraphSettings();
336
- // Go to Settings and set "vin:Zinfandel" as an ignored type
337
- getIgnoredTypesField().clear().type('vin:Zinfandel');
338
-
339
366
  // Set the connections limit to 10
340
- getLinksNumberField().clear().type('10');
367
+ updateLinksLimitField('10');
368
+ // Go to Settings and set "vin:Zinfandel" as an ignored type
369
+ getIgnoredTypesField().clear().type('vin:Zinfandel').type('{enter}');
341
370
 
342
371
  saveSettings();
343
372
  // Verify that "vin:Zinfandel" has been removed from the diagram
@@ -370,11 +399,12 @@ describe('Visual graph screen validation', () => {
370
399
  openVisualGraphSettings();
371
400
  // Go to predicates tab
372
401
  openPredicatesTab();
373
- // Set "vin:hasSugar" as an ignored predicate
374
- getIgnoredPredicatesField().clear().type('vin:hasSugar');
375
402
 
376
403
  // Set the connections limit to 10
377
- getLinksNumberField().clear().type('10');
404
+ updateLinksLimitField('10');
405
+ // Set "vin:hasSugar" as an ignored predicate
406
+ getIgnoredPredicatesField().clear().type('vin:hasSugar').type('{enter}');
407
+
378
408
  saveSettings();
379
409
 
380
410
  // Verify that "vin:hasSugar" has been removed from the diagram
@@ -388,7 +418,7 @@ describe('Visual graph screen validation', () => {
388
418
  openVisualGraphSettings();
389
419
  // Verify that the default settings are as follows:
390
420
  // Maximum links to show: 20
391
- getLinksNumberField().clear().type('10')
421
+ updateLinksLimitField('10')
392
422
  .should('have.value', '10');
393
423
  // Preferred lang: en
394
424
  cy.get('.preferred-languages .tag-item').should('have.length', 1)
@@ -677,4 +707,8 @@ describe('Visual graph screen validation', () => {
677
707
  cy.get('.modal-footer .confirm-btn').click();
678
708
  cy.get('.modal').should('not.exist');
679
709
  }
710
+
711
+ function updateLinksLimitField(value) {
712
+ return getLinksNumberField().invoke('val', value).trigger('change', {force: true});
713
+ }
680
714
  });
@@ -35,7 +35,7 @@ describe('Help / REST API', () => {
35
35
  verifyControllerListIsCollapsed(getRDF4JAPI());
36
36
 
37
37
  // Examine the import controller
38
- verifyControllerOptions('repositories', 'Repository management');
38
+ verifyControllerOptions('repository-management-controller', 'Repository management');
39
39
  });
40
40
 
41
41
  function getSwaggerFrame() {
@@ -0,0 +1,45 @@
1
+ import HomeSteps from '../../steps/home-steps';
2
+ import SparqlSteps from '../../steps/sparql-steps';
3
+
4
+ describe('Home screen language validation', () => {
5
+ let repositoryId;
6
+
7
+ beforeEach(() => {
8
+ HomeSteps.visitAndWaitLoader();
9
+ repositoryId = '23repo' + Date.now();
10
+ });
11
+
12
+ afterEach(() => {
13
+ cy.deleteRepository(repositoryId);
14
+
15
+ // Change the language back to English
16
+ SparqlSteps.changeLanguage('en');
17
+ });
18
+
19
+ context('Language change label checks', () => {
20
+ it('Default language should be active and language change should affect labels', () => {
21
+ cy.createRepository({id: repositoryId});
22
+ cy.initializeRepository(repositoryId);
23
+ cy.enableAutocomplete(repositoryId);
24
+ cy.presetRepository(repositoryId);
25
+
26
+ HomeSteps.declineTutorial();
27
+
28
+ // When I visit home page with selected repository
29
+ HomeSteps.visitAndWaitLoader();
30
+ // Check some labels are in default language
31
+ HomeSteps.getViewResourceAsLabel().should('have.text', 'View resource');
32
+ HomeSteps.getActiveRepoAsLabel().should('have.text', 'Active repository');
33
+ HomeSteps.getSavedSparqlQueriesAsLabel().should('have.text', 'Saved SPARQL queries');
34
+ HomeSteps.getLicenseAsLabel().should('have.text', 'License');
35
+
36
+ SparqlSteps.changeLanguage('fr');
37
+
38
+ // The text in the labels should change
39
+ HomeSteps.getViewResourceAsLabel().should('have.text', 'Voir la ressource');
40
+ HomeSteps.getActiveRepoAsLabel().should('have.text', 'Répertoire actif');
41
+ HomeSteps.getSavedSparqlQueriesAsLabel().should('have.text', 'Requêtes SPARQL sauvegardées');
42
+ HomeSteps.getLicenseAsLabel().should('have.text', 'Licence');
43
+ });
44
+ });
45
+ })
@@ -11,7 +11,9 @@ describe('Home screen validation', () => {
11
11
  'foaf:name "Green Goblin" .\n';
12
12
  const GOBLIN_URI = 'http://example.org/#green-goblin';
13
13
 
14
- beforeEach(() => cy.viewport(1280, 1000));
14
+ beforeEach(() => {
15
+ cy.viewport(1280, 1000);
16
+ });
15
17
 
16
18
  context('RDF resource search', () => {
17
19
  it('Search button should not be present when no repo is selected', () => {
@@ -281,6 +283,19 @@ describe('Home screen validation', () => {
281
283
  });
282
284
  });
283
285
 
286
+ context('Set preferred language', () => {
287
+ beforeEach(() => HomeSteps.visitAndWaitLoader());
288
+ it('language button should be visible and actionable', () => {
289
+ cy.get('#languageGroupDrop')
290
+ .should('be.visible')
291
+ .click()
292
+ .then(() => {
293
+ cy.get('.dropdown-menu .dropdown-item')
294
+ .should('have.length.at.least', 1);
295
+ });
296
+ });
297
+ });
298
+
284
299
  function getRDFResourceSearchBox() {
285
300
  return cy.get('rdf-resource-search').should('be.visible');
286
301
  }
@@ -41,8 +41,11 @@ describe('Repositories', () => {
41
41
 
42
42
  beforeEach(() => {
43
43
  repositoryId = 'repo-' + Date.now();
44
+ cy.intercept('/rest/locations').as('getLocations');
44
45
 
45
46
  cy.visit('/repository');
47
+ waitLoader();
48
+ cy.wait('@getLocations');
46
49
  cy.window();
47
50
 
48
51
  waitUntilRepositoriesPageIsLoaded();
@@ -66,7 +69,7 @@ describe('Repositories', () => {
66
69
  cy.url().should('include', '/repository/create');
67
70
 
68
71
  cy.get('.create-buttons')
69
- .find('.h3.repo-type')
72
+ .find('.repo-type')
70
73
  .should('have.length', 3)
71
74
  .then((repoTypes) => {
72
75
  repoTypes.each(($index, $repoType) => {
@@ -77,9 +80,7 @@ describe('Repositories', () => {
77
80
 
78
81
  it('should allow creation of repositories with default settings', () => {
79
82
  // There should be a default repository location
80
- getLocationsList()
81
- .should('have.length', 1)
82
- .and('contain', 'Local');
83
+ getLocationsList();
83
84
 
84
85
  createRepository();
85
86
  cy.url().should('include', '/repository/create');
@@ -224,6 +225,7 @@ describe('Repositories', () => {
224
225
 
225
226
  typeRepositoryId(repositoryId);
226
227
  saveRepository();
228
+ cy.wait('@getLocations');
227
229
 
228
230
  createRepository();
229
231
  chooseRepositoryType(GDB_REPOSITORY_TYPE);
@@ -277,6 +279,7 @@ describe('Repositories', () => {
277
279
  // The currently selected repository is kept in local storage
278
280
  cy.visit('/repository');
279
281
  cy.window();
282
+
280
283
  // Should automatically select the default repository
281
284
  getRepositoriesDropdown()
282
285
  .find('.active-repository')
@@ -298,7 +301,7 @@ describe('Repositories', () => {
298
301
  typeRepositoryId(repositoryId);
299
302
  typeRepositoryTitle('Title');
300
303
  saveRepository();
301
-
304
+ cy.wait('@getLocations');
302
305
  editRepository(repositoryId);
303
306
 
304
307
  // Some fields should be disabled
@@ -314,7 +317,7 @@ describe('Repositories', () => {
314
317
  confirmModal();
315
318
  waitLoader();
316
319
  });
317
-
320
+ cy.wait('@getLocations');
318
321
  // See the title is rendered in the repositories list
319
322
  getRepositoryFromList(repositoryId).should('contain', newTitle);
320
323
 
@@ -332,7 +335,7 @@ describe('Repositories', () => {
332
335
 
333
336
  typeRepositoryId(repositoryId);
334
337
  saveRepository();
335
-
338
+ cy.wait('@getLocations');
336
339
  selectRepoFromDropdown(repositoryId);
337
340
 
338
341
  getRepositoryFromList(repositoryId)
@@ -344,7 +347,7 @@ describe('Repositories', () => {
344
347
 
345
348
  confirmModal();
346
349
 
347
- getRepositoriesList().should('not.contain', repositoryId);
350
+ getRepositoriesList().should('not.exist');
348
351
 
349
352
  // Check the repo has been deselected and is not present in the repo dropdown menu
350
353
  getRepositoriesDropdown().click().within(() => {
@@ -375,7 +378,7 @@ describe('Repositories', () => {
375
378
  let obdaFileUpload = '';
376
379
  let ontologyFileUpload = '';
377
380
  let propertiesFileUpload = '';
378
- const url = 'http://localhost:9000/rest/repositories/uploadFile';
381
+ const url = 'http://localhost:9000/rest/repositories/file/upload';
379
382
  const fileType = '';
380
383
  const virtualRepoName = 'virtual-repo-' + Date.now();
381
384
 
@@ -383,7 +386,7 @@ describe('Repositories', () => {
383
386
  cy.fixture('ontop/university-complete.obda', 'binary').then((file) => {
384
387
  Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
385
388
  const formData = new FormData();
386
- formData.set('uploadFile', blob, 'university-complete.obda');
389
+ formData.set('file', blob, 'university-complete.obda');
387
390
 
388
391
  cy.form_request(url, formData).then(response => {
389
392
  return obdaFileUpload = response.response.body.fileLocation;
@@ -394,7 +397,7 @@ describe('Repositories', () => {
394
397
  cy.fixture('ontop/university-complete.ttl', 'binary').then((file) => {
395
398
  Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
396
399
  const formData = new FormData();
397
- formData.set('uploadFile', blob, 'university-complete.ttl');
400
+ formData.set('file', blob, 'university-complete.ttl');
398
401
 
399
402
  cy.form_request(url, formData).then(response => {
400
403
  return ontologyFileUpload = response.response.body.fileLocation;
@@ -405,7 +408,7 @@ describe('Repositories', () => {
405
408
  cy.fixture('ontop/university-complete.properties', 'binary').then((file) => {
406
409
  Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
407
410
  const formData = new FormData();
408
- formData.set('uploadFile', blob, 'university-complete.properties');
411
+ formData.set('file', blob, 'university-complete.properties');
409
412
 
410
413
  cy.form_request(url, formData).then(response => {
411
414
  return propertiesFileUpload = response.response.body.fileLocation;
@@ -498,9 +501,7 @@ describe('Repositories', () => {
498
501
 
499
502
  it('should verify different virtual repository RDBMS provider elements', () => {
500
503
  // There should be a default repository location
501
- getLocationsList()
502
- .should('have.length', 1)
503
- .and('contain', 'Local');
504
+ getLocationsList();
504
505
 
505
506
  createRepository();
506
507
  cy.url().should('include', '/repository/create');
@@ -728,10 +729,15 @@ describe('Repositories', () => {
728
729
  }
729
730
 
730
731
  function getLocationsList() {
731
- return cy.get('.locations-table tr');
732
+ return cy.get('#wb-locations-locationInGetLocations')
733
+ .find('tr.location')
734
+ .should('have.length', 1)
735
+ .and('contain', 'Repositories from: ')
736
+ .and('contain', 'Local');
732
737
  }
733
738
 
734
739
  function getRepositoryFromList(repository) {
740
+ waitLoader();
735
741
  return getRepositoriesList()
736
742
  .find('.repository')
737
743
  .contains(repository)
@@ -65,8 +65,10 @@ describe('Setup / Connectors - Lucene', () => {
65
65
  .click();
66
66
  getConfirmConnectorDeletebutton()
67
67
  .should('be.visible')
68
- .click();
69
- verifyStatusToastMessage(connectorDeleteToastMessage + '-copy');
68
+ .click()
69
+ .then(() => {
70
+ verifyStatusToastMessage(connectorDeleteToastMessage + '-copy');
71
+ });
70
72
  });
71
73
  });
72
74
 
@@ -136,6 +138,6 @@ describe('Setup / Connectors - Lucene', () => {
136
138
  */
137
139
  function hideToastContainer() {
138
140
  cy.get('.toast-success')
139
- .then(toastContainer => toastContainer.hide());
141
+ .then(toastContainer => toastContainer && toastContainer.remove());
140
142
  }
141
143
  });
@@ -222,7 +222,8 @@ describe('My Settings', () => {
222
222
  });
223
223
  });
224
224
 
225
- it('Saving user credentials with checked unset password should show modal window to warn user about unsetting the' +
225
+ it('Saving administrator credentials with checked unset password should show modal window to warn user about' +
226
+ ' unsetting the' +
226
227
  ' password', () => {
227
228
  // User role is administrator
228
229
  cy.get('#noPassword:checkbox').check()
@@ -233,7 +234,7 @@ describe('My Settings', () => {
233
234
  getSaveButton().click()
234
235
  .then(() => {
235
236
  cy.get('.modal-dialog').find('.lead').contains('If you unset the password and then enable security,' +
236
- ' that user will not be able to log into GraphDB through the workbench.');
237
+ ' this administrator will not be able to log into GraphDB through the workbench.');
237
238
  }
238
239
  )
239
240
  });
@@ -0,0 +1,69 @@
1
+ describe('Plugins', () => {
2
+
3
+ let repositoryId;
4
+
5
+ function createRepository() {
6
+ repositoryId = 'plugin-' + Date.now();
7
+ cy.createRepository({id: repositoryId});
8
+ cy.presetRepository(repositoryId);
9
+ cy.initializeRepository(repositoryId);
10
+ }
11
+
12
+ function waitUntilPluginsPageIsLoaded() {
13
+ // Workbench loading screen should not be visible
14
+ cy.get('.ot-splash').should('not.be.visible');
15
+
16
+ // No active loader
17
+ cy.get('.ot-loader').should('not.exist');
18
+ }
19
+
20
+ beforeEach(() => {
21
+ createRepository();
22
+ cy.visit('/plugins');
23
+ cy.window();
24
+ waitUntilPluginsPageIsLoaded();
25
+ });
26
+
27
+ afterEach(() => {
28
+ cy.visit('/plugins');
29
+ cy.window();
30
+ // re-enable historyplugin
31
+ getPluginsHeader()
32
+ .should('be.visible').parent().within(() => {
33
+ cy.get('.switch').then((elem) => {
34
+ var value = elem.val();
35
+ if (!value.checked) {
36
+ getPluginsSwitch().click();
37
+ }
38
+ });
39
+ });
40
+ cy.deleteRepository(repositoryId);
41
+ });
42
+
43
+ it('should allow to enable and disable the plugins', () => {
44
+ // Verify initial status is ON
45
+ getPluginsHeader()
46
+ .should('be.visible').parent().within(() => {
47
+ cy.get('.tag-primary')
48
+ .contains('ON');
49
+
50
+ cy.get('.switch').should('be.checked');
51
+ getPluginsSwitch().click();
52
+ });
53
+ cy.visit('/plugins');
54
+ cy.window();
55
+
56
+ getPluginsHeader()
57
+ .should('be.visible').parent().within(() => {
58
+ cy.get('.switch').should('not.be.checked');
59
+ });
60
+ });
61
+
62
+ function getPluginsHeader() {
63
+ return cy.get('.plugins-header').contains("history");
64
+ }
65
+
66
+ function getPluginsSwitch() {
67
+ return cy.get('.plugins-switch');
68
+ }
69
+ });
@@ -22,6 +22,17 @@ describe('User and Access', () => {
22
22
  });
23
23
 
24
24
  after(() => {
25
+ cy.visit('/users');
26
+ getUsersTable().should('be.visible');
27
+ cy.get('#wb-users-userInUsers tr').then((table) => {
28
+ cy.get('table > tbody > tr').each(($el, index, $list) => {
29
+ getUsersTable().should('be.visible');
30
+ const username = $el.find('.username').text();
31
+ if (username !=='admin') {
32
+ deleteUser(username);
33
+ }
34
+ });
35
+ });
25
36
  cy.deleteRepository(repositoryId);
26
37
  });
27
38
 
@@ -44,7 +55,7 @@ describe('User and Access', () => {
44
55
  cy.get('@user').find('.edit-user-btn').should('be.visible')
45
56
  .and('not.be.disabled');
46
57
  // And cannot be deleted
47
- cy.get('@user').find('.delete-user-btn').should('not.be.visible');
58
+ cy.get('@user').find('.delete-user-btn').should('not.exist');
48
59
  // Date created should be visible
49
60
  cy.get('@user').find('.date-created').should('be.visible');
50
61
  });
@@ -80,22 +91,33 @@ describe('User and Access', () => {
80
91
  cy.get('.ot-splash').should('not.be.visible');
81
92
  getUsersTable().should('be.visible');
82
93
  //delete repository manager
83
- deleteUser("repo-manager");
84
- //create a custom admin
85
- createUser("second-admin", PASSWORD, ROLE_CUSTOM_ADMIN);
86
- logout();
87
- //login with custom admin
88
- loginWithUser("second-admin", PASSWORD);
89
- cy.url().should('include', '/users');
90
- logout();
91
- //login with admin
92
- loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
93
- cy.get('.ot-splash').should('not.be.visible');
94
+ deleteUser("repo-manager")
95
+ .then(() => {
96
+ //create a custom admin
97
+ createUser("second-admin", PASSWORD, ROLE_CUSTOM_ADMIN);
98
+ logout();
99
+ //login with custom admin
100
+ loginWithUser("second-admin", PASSWORD);
101
+ cy.url().should('include', '/users');
102
+ logout();
103
+ //login with admin
104
+ loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
105
+ cy.get('.ot-splash').should('not.be.visible');
106
+ getUsersTable().should('be.visible');
107
+ //delete custom admin
108
+ deleteUser("second-admin")
109
+ .then(() => {
110
+ //disable security
111
+ getToggleSecuritySwitch().click();
112
+ });
113
+ });
114
+ });
115
+ it('Warn users when setting no password when creating new user admin', () => {
94
116
  getUsersTable().should('be.visible');
95
- //delete custom admin
96
- deleteUser("second-admin");
97
- //disable security
98
- getToggleSecuritySwitch().click();
117
+ createUser("adminWithNoPassword", PASSWORD, ROLE_CUSTOM_ADMIN);
118
+ getUsersTable().should('be.visible');
119
+ cy.get('.ot-splash').should('not.be.visible');
120
+ deleteUser("adminWithNoPassword");
99
121
  });
100
122
 
101
123
  function getCreateNewUserButton() {
@@ -145,25 +167,48 @@ describe('User and Access', () => {
145
167
  getPasswordField().type(password);
146
168
  getConfirmPasswordField().type(password);
147
169
  getRoleRadioButton(role).click();
148
- if(role === "#roleUser") {
170
+ if (role === "#roleUser") {
149
171
  getRepoitoryRightsList().contains('Any data repository').nextUntil('.write').within(() => {
150
172
  cy.get('.write').click();
151
173
  });
174
+ getConfirmUserCreateButton().click();
175
+ } else if (role === "#roleAdmin" && username === "adminWithNoPassword") {
176
+ cy.get('#noPassword:checkbox').check()
177
+ .then(() => {
178
+ cy.get('#noPassword:checkbox')
179
+ .should('be.checked');
180
+ });
181
+ getConfirmUserCreateButton().click()
182
+ .then(() => {
183
+ cy.get('.modal-dialog').find('.lead').contains('If the password is unset and security is enabled, this administrator will not be ' +
184
+ 'able to log into GraphDB through the workbench. Are you sure that you want to continue?');
185
+ cy.get('.modal-dialog').find('.confirm-btn').click();
186
+ });
187
+ } else {
188
+ getConfirmUserCreateButton().click();
152
189
  }
153
- getConfirmUserCreateButton().click();
154
190
  cy.get('.ot-splash').should('not.be.visible');
155
- getUsersTable().should('contain',username);
191
+ getUsersTable().should('contain', username);
156
192
  }
157
193
 
158
194
  function deleteUser(username) {
159
- cy.get('#wb-users-userInUsers tr').contains(username).parent().parent().within(() => {
160
- cy.get('.icon-trash').click();
161
- })
162
- cy.get('.confirm-btn').click();
195
+ findUserInTable(username);
196
+ cy.get('@user')
197
+ .should('have.length', 1)
198
+ .within(() => {
199
+ cy.get('.delete-user-btn')
200
+ .as('deleteBtn');
201
+ });
202
+ return cy.waitUntil(() =>
203
+ cy.get('@deleteBtn')
204
+ .then(deleteBtn => deleteBtn && Cypress.dom.isAttached(deleteBtn) && deleteBtn.trigger('click')))
205
+ .then(() => {
206
+ cy.get('.confirm-btn').click();
207
+ });
163
208
  }
164
209
 
165
210
  function loginWithUser(username, password) {
166
- cy.get('#wb-login-username').type(username)
211
+ cy.get('#wb-login-username').type(username);
167
212
  cy.get('#wb-login-password').type(password);
168
213
  cy.get('#wb-login-submitLogin').click();
169
214
  }
@@ -16,18 +16,7 @@ describe('Main menu tests', function () {
16
16
  {
17
17
  name: 'Import',
18
18
  visible: true,
19
- submenu: [
20
- {
21
- name: 'RDF',
22
- visible: false,
23
- redirect: '/import'
24
- },
25
- {
26
- name: 'Tabular (OntoRefine)',
27
- visible: false,
28
- redirect: '/ontorefine'
29
- }
30
- ]
19
+ redirect: '/import'
31
20
  },
32
21
  {
33
22
  name: 'Explore',
@@ -110,6 +99,11 @@ describe('Main menu tests', function () {
110
99
  visible: false,
111
100
  redirect: '/cluster'
112
101
  },
102
+ {
103
+ name: 'Plugins',
104
+ visible: false,
105
+ redirect: '/plugins'
106
+ },
113
107
  {
114
108
  name: 'Namespaces',
115
109
  visible: false,
@@ -164,7 +158,8 @@ describe('Main menu tests', function () {
164
158
  let menuVisibilityCheck = menu.visible ? 'be.visible' : 'not.be.visible';
165
159
  // Verify that main menu items are present and their visibility
166
160
  cy.get('.main-menu .menu-element-root').eq(menuIndex + 1).as('menu')
167
- .should(menuVisibilityCheck).and('contain', menu.name);
161
+ .should(menuVisibilityCheck).within(() =>
162
+ cy.get('.menu-item').contains(menu.name));
168
163
 
169
164
  // Verify submenu items and their visibility when the main menu is not opened
170
165
  (menu.submenu || []).forEach((submenu, submenuIndex) => {