diff --git a/src/view/scripts.inc.twig b/src/view/scripts.inc.twig index 670c6a716..5a4e82424 100644 --- a/src/view/scripts.inc.twig +++ b/src/view/scripts.inc.twig @@ -35,7 +35,6 @@ window.SKOSMOS = { "uri": "{{ concept.uri }}", {% endif %} {%- if request.vocab ~%} - "languages": [{% for lang in request.vocab.config.languages %}"{{ lang }}"{% if not loop.last %}, {% endif %}{% endfor %}], "languageOrder": [{% for lang in request.vocab.config.languageOrder(request.contentLang) %}"{{ lang }}"{% if not loop.last %}, {% endif %}{% endfor %}], "showNotation": {{ request.vocab.config.showNotation ? "true" : "false" }}, "sortByNotation": {% if request.vocab.config.sortByNotation %}"{{ request.vocab.config.sortByNotation }}"{% else %}null{% endif ~%}, diff --git a/tests/cypress/template/vocab-search-bar.cy.js b/tests/cypress/template/vocab-search-bar.cy.js index 736022d1b..f7a5c8d8d 100644 --- a/tests/cypress/template/vocab-search-bar.cy.js +++ b/tests/cypress/template/vocab-search-bar.cy.js @@ -61,8 +61,7 @@ describe('Vocab search bar', () => { cy.get('#language-list .dropdown-item').then($elements => { const actualLanguages = $elements.map((index, el) => Cypress.$(el).attr('value')).get(); - // The expected languages should be those found in vocabulary configuration with an additional 'all' language - const expectedLanguages = [...win.SKOSMOS.languages, 'all']; + const expectedLanguages = ['fi', 'sv', 'se', 'en', 'all']; // The two language lists should be of equal length and all of the expected languages can be found expect(expectedLanguages).to.have.lengthOf(actualLanguages.length);