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.
@@ -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
+ })