diff --git a/cypress/tests/monolingual/monolingual.search.cy.js b/cypress/tests/monolingual/monolingual.search.cy.js index c67742fe..0d551032 100644 --- a/cypress/tests/monolingual/monolingual.search.cy.js +++ b/cypress/tests/monolingual/monolingual.search.cy.js @@ -82,12 +82,6 @@ describe('Searchkit block tests – search - monolingual', () => { }); it('I can search with inflection', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.supportedLanguages = ['de']; - settings.isMultilingual = false; - }); - cy.wait(2000); cy.get('.searchbar-wrapper input').type('Männer{enter}'); cy.get('.block.searchkitsearch').contains('Testseite Mann'); @@ -117,12 +111,6 @@ describe('Searchkit block tests – search - monolingual', () => { }); it('I can search for a compounded word', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.supportedLanguages = ['de']; - settings.isMultilingual = false; - }); - cy.wait(2000); cy.get('.searchbar-wrapper input').type('stelle{enter}'); cy.get('.block.searchkitsearch').contains('Testseite Lehrstellenbörsen'); diff --git a/cypress/tests/multilingual/multilingual.language.cy.js b/cypress/tests/multilingual/multilingual.language.cy.js index 72ae057b..4c95ef6f 100644 --- a/cypress/tests/multilingual/multilingual.language.cy.js +++ b/cypress/tests/multilingual/multilingual.language.cy.js @@ -49,19 +49,14 @@ describe('Searchkit block tests – search - multilingual - language', () => { cy.wait(5000); }); - it('I can search within language', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'en'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - + it('I can search within language', function () { cy.get('.searchbar-wrapper input') .type('februax{enter}') - .wait('@kitsearch') - .get('.block.searchkitsearch') - .should('not.contain', 'Der Garten im Februar') - .get('.block.searchkitsearch') + .wait('@kitsearch'); + cy.screenshot(); + cy.get('.block.searchkitsearch') + .should('not.contain', 'Der Garten im Februar'); + cy.get('.block.searchkitsearch') .contains('The garden in february'); }); }); diff --git a/cypress/tests/multilingual/multilingual.search.anonymous.cy.js b/cypress/tests/multilingual/multilingual.search.anonymous.cy.js index 45a81000..2f9d60ad 100644 --- a/cypress/tests/multilingual/multilingual.search.anonymous.cy.js +++ b/cypress/tests/multilingual/multilingual.search.anonymous.cy.js @@ -60,11 +60,6 @@ describe('Searchkit block tests – search - multilingual - anonymous', () => { }); it('I can search', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'en'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); cy.get('.searchbar-wrapper input').type('february{enter}'); cy.get('.block.searchkitsearch').contains('The garden in february'); cy.get('.searchbar-wrapper input').clear().type('march{enter}'); @@ -72,11 +67,6 @@ describe('Searchkit block tests – search - multilingual - anonymous', () => { }); it('As anonymous I see only published content', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'en'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); cy.intercept('POST', '/**/@kitsearch').as('kitsearch'); cy.intercept('/**/@logout').as('logout'); diff --git a/cypress/tests/multilingual/multilingual.search.cy.js b/cypress/tests/multilingual/multilingual.search.cy.js index cc332069..435e2be2 100644 --- a/cypress/tests/multilingual/multilingual.search.cy.js +++ b/cypress/tests/multilingual/multilingual.search.cy.js @@ -4,7 +4,7 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { cy.intercept('GET', `/**/*?expand*`).as('content'); cy.intercept('GET', '/**/Document').as('schema'); // Wait a bit to previous teardown to complete correctly because Heisenbug in this point - cy.wait(3000); + cy.wait(2000); // given a logged in editor and a page in edit mode cy.autologin(); @@ -57,7 +57,7 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { path: '/de', }); // Wait after creating content for ingest and OpenSearch to index - cy.wait(3000); + cy.wait(2000); // Add search block cy.visit('/de/suche/edit'); @@ -79,38 +79,21 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { cy.removeContent({ path: 'de/testseite-lsb' }); cy.removeContent({ path: 'de/testseite-s' }); cy.removeContent({ path: 'de/suche' }); - cy.wait(5000); + cy.wait(2000); }); it('I see all if no filter selected', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.block.searchkitsearch').contains('Der Garten im Februar'); + cy.screenshot(); }); it('I can search fuzzy', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').type('februax{enter}'); cy.get('.block.searchkitsearch').contains('Der Garten im Februar'); cy.get('.block.searchkitsearch').should('not.contain', 'März'); }); it('I can search with inflection', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').clear().type('Männer{enter}'); cy.get('.block.searchkitsearch').contains('Testseite Mann'); @@ -119,12 +102,6 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { }); it('I can search with decompounding', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').type('Garten{enter}'); cy.get('.block.searchkitsearch').contains('Garten-Blog'); @@ -133,23 +110,11 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { }); it('I can search with wildcard', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').type('Feb*{enter}'); cy.get('.block.searchkitsearch').contains('Der Garten im Februar'); }); it('I can search for an exact match', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').type('"Mann"{enter}'); cy.get('.block.searchkitsearch').contains('Testseite Mann'); cy.get('.searchbar-wrapper input').clear().type('"Mann"{enter}'); @@ -157,12 +122,6 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { }); it('I can search for a compounded word', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.get('.searchbar-wrapper input').type('stelle{enter}'); cy.get('.block.searchkitsearch').contains('Testseite Lehrstellenbörsen'); cy.get('.searchbar-wrapper input').clear().type('Lehre{enter}'); @@ -175,12 +134,6 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { // Blocks text it('I can search in blocks', function () { - cy.settings().then((settings) => { - settings.defaultLanguage = 'de'; - settings.isMultilingual = true; - settings.supportedLanguages = ['de', 'en']; - }); - cy.wait(4000); cy.intercept('POST', '/**/@kitsearch').as('kitsearch'); cy.visit('/de/garten-blog/februar'); cy.get('a.edit').click(); @@ -193,10 +146,10 @@ describe('Searchkit block tests – search -multilingual - fuzzy etc', () => { // cy.toolbarSave(); cy.get('#toolbar-save').click(); cy.wait('@content'); - + cy.log('I added a text block'); // Wait after creating content for ingest and OpenSearch to index - cy.wait(3000); + cy.wait(1000); // Searching cy.visit('de/suche');