graphdb-workbench-tests 2.0.0-TR9 → 2.0.0
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.
- package/fixtures/locale-en.json +1608 -0
- package/integration/explore/similarity.spec.js +3 -3
- package/integration/explore/visual.graph.spec.js +2 -2
- package/integration/help/rest-api.spec.js +1 -1
- package/integration/home/language-change.spec.js +45 -0
- package/integration/home/workbench.home.spec.js +16 -1
- package/integration/repository/repositories.spec.js +22 -16
- package/integration/setup/connectors-lucene.spec.js +5 -3
- package/integration/setup/plugins.spec.js +69 -0
- package/integration/setup/user-and-access.spec.js +34 -21
- package/integration/sparql/main.menu.spec.js +8 -13
- package/integration/sparql/sparql-language-change.spec.js +62 -0
- package/integration/sparql/sparql.menu.spec.js +101 -198
- package/package.json +4 -2
- package/plugins/index.js +9 -0
- package/steps/home-steps.js +16 -0
- package/steps/sparql-steps.js +154 -0
- package/support/import-commands.js +8 -6
- package/support/index.js +2 -0
- package/support/settings-commands.js +1 -1
- package/support/sparql-commands.js +3 -5
- package/integration/import/onto-refine.spec.js +0 -135
|
@@ -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
|
|
60
|
-
cy.get('#toast-container').should('contain', 'Invalid
|
|
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', () => {
|
|
@@ -35,7 +35,7 @@ describe('Help / REST API', () => {
|
|
|
35
35
|
verifyControllerListIsCollapsed(getRDF4JAPI());
|
|
36
36
|
|
|
37
37
|
// Examine the import controller
|
|
38
|
-
verifyControllerOptions('
|
|
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(() =>
|
|
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('.
|
|
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.
|
|
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/
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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
|
-
|
|
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.
|
|
141
|
+
.then(toastContainer => toastContainer && toastContainer.remove());
|
|
140
142
|
}
|
|
141
143
|
});
|
|
@@ -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
|
+
});
|
|
@@ -55,7 +55,7 @@ describe('User and Access', () => {
|
|
|
55
55
|
cy.get('@user').find('.edit-user-btn').should('be.visible')
|
|
56
56
|
.and('not.be.disabled');
|
|
57
57
|
// And cannot be deleted
|
|
58
|
-
cy.get('@user').find('.delete-user-btn').should('not.
|
|
58
|
+
cy.get('@user').find('.delete-user-btn').should('not.exist');
|
|
59
59
|
// Date created should be visible
|
|
60
60
|
cy.get('@user').find('.date-created').should('be.visible');
|
|
61
61
|
});
|
|
@@ -91,22 +91,26 @@ describe('User and Access', () => {
|
|
|
91
91
|
cy.get('.ot-splash').should('not.be.visible');
|
|
92
92
|
getUsersTable().should('be.visible');
|
|
93
93
|
//delete repository manager
|
|
94
|
-
deleteUser("repo-manager")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
});
|
|
110
114
|
});
|
|
111
115
|
it('Warn users when setting no password when creating new user admin', () => {
|
|
112
116
|
getUsersTable().should('be.visible');
|
|
@@ -188,10 +192,19 @@ describe('User and Access', () => {
|
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
function deleteUser(username) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
});
|
|
195
208
|
}
|
|
196
209
|
|
|
197
210
|
function loginWithUser(username, password) {
|
|
@@ -16,18 +16,7 @@ describe('Main menu tests', function () {
|
|
|
16
16
|
{
|
|
17
17
|
name: 'Import',
|
|
18
18
|
visible: true,
|
|
19
|
-
|
|
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).
|
|
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) => {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import SparqlSteps from '../../steps/sparql-steps';
|
|
2
|
+
|
|
3
|
+
describe('YASQE and YASR language change validation', () => {
|
|
4
|
+
let repositoryId;
|
|
5
|
+
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
repositoryId = 'sparql-' + Date.now();
|
|
8
|
+
SparqlSteps.createRepoAndVisit(repositoryId);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
// Change the language back to English
|
|
13
|
+
SparqlSteps.changeLanguage('en');
|
|
14
|
+
|
|
15
|
+
cy.deleteRepository(repositoryId);
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
context('Default language should be active and language change should affect labels', () => {
|
|
19
|
+
it('should change labels in SPARQL view', () => {
|
|
20
|
+
|
|
21
|
+
// Check some labels are in default language
|
|
22
|
+
SparqlSteps.getSparqlQueryUpdateLabel().should('contain', 'SPARQL Query & Update');
|
|
23
|
+
SparqlSteps.getDownloadBtn().should('contain', 'Download as');
|
|
24
|
+
SparqlSteps.getEditorAndResultsBtn().should('contain', 'Editor and results');
|
|
25
|
+
SparqlSteps.getResultsOnlyBtn().should('contain', 'Results only');
|
|
26
|
+
|
|
27
|
+
SparqlSteps.changeLanguage('fr');
|
|
28
|
+
|
|
29
|
+
// The text in the labels should change
|
|
30
|
+
SparqlSteps.getSparqlQueryUpdateLabel().should('contain', 'Requête et mise à jour SPARQL');
|
|
31
|
+
SparqlSteps.getDownloadBtn().should('contain', 'Téléchargement');
|
|
32
|
+
SparqlSteps.getEditorAndResultsBtn().should('contain', 'Éditeur et résultats');
|
|
33
|
+
SparqlSteps.getResultsOnlyBtn().should('contain', 'Résultats seulement');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should change labels in SPARQL results view', function () {
|
|
37
|
+
SparqlSteps.selectSavedQuery('Add statements');
|
|
38
|
+
SparqlSteps.executeQuery();
|
|
39
|
+
SparqlSteps.selectSavedQuery('SPARQL Select template');
|
|
40
|
+
SparqlSteps.executeQuery();
|
|
41
|
+
|
|
42
|
+
// Go to Results only view
|
|
43
|
+
SparqlSteps.getResultsOnlyBtn().click();
|
|
44
|
+
|
|
45
|
+
// Check some labels are in default language
|
|
46
|
+
SparqlSteps.getTabWithTableText().should('contain', 'Table');
|
|
47
|
+
SparqlSteps.getTabWithRawResponseText().should('contain', 'Raw Response');
|
|
48
|
+
SparqlSteps.getTabWithPivotTableText().should('contain', 'Pivot Table');
|
|
49
|
+
SparqlSteps.getTabWithGoogleChartText().should('contain', 'Google Chart');
|
|
50
|
+
SparqlSteps.getResultsDescription().should('contain', 'Showing results from');
|
|
51
|
+
|
|
52
|
+
SparqlSteps.changeLanguage('fr');
|
|
53
|
+
|
|
54
|
+
// The text in the labels should change
|
|
55
|
+
SparqlSteps.getTabWithTableText().should('contain', 'Tableau');
|
|
56
|
+
SparqlSteps.getTabWithRawResponseText().should('contain', 'Réponse brute');
|
|
57
|
+
SparqlSteps.getTabWithPivotTableText().should('contain', 'Table de pivotement');
|
|
58
|
+
SparqlSteps.getTabWithGoogleChartText().should('contain', 'Graphique Google');
|
|
59
|
+
SparqlSteps.getResultsDescription().should('contain', 'Liste de résultats de');
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
})
|