Merged in feature/MS-747-TestforInstrumentFilters (pull request #139)
Feature/MS-747 TestforInstrumentFilters Approved-by: Ramon Wenger
This commit is contained in:
commit
13e9c2d9ae
|
|
@ -7,7 +7,7 @@ export default defineConfig({
|
||||||
chromeWebSecurity: false,
|
chromeWebSecurity: false,
|
||||||
|
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: 'http://127.0.0.1:8080',
|
baseUrl: 'http://localhost:8080',
|
||||||
specPattern: 'cypress/e2e/frontend/**/*.{cy,spec}.{js,ts}',
|
specPattern: 'cypress/e2e/frontend/**/*.{cy,spec}.{js,ts}',
|
||||||
supportFile: 'cypress/support/e2e.ts',
|
supportFile: 'cypress/support/e2e.ts',
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents(on, config) {
|
||||||
|
|
|
||||||
|
|
@ -55,16 +55,25 @@ describe('Instruments Page', () => {
|
||||||
type: analyse,
|
type: analyse,
|
||||||
title: 'Instrument: Analyse',
|
title: 'Instrument: Analyse',
|
||||||
slug: 'analyse',
|
slug: 'analyse',
|
||||||
|
language: 'de',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: argumentation,
|
type: argumentation,
|
||||||
title: 'Instrument: Argumentation',
|
title: 'Instrument: Argumentation',
|
||||||
slug: 'argumentation',
|
slug: 'argumentation',
|
||||||
|
language: 'de',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: ethik,
|
type: ethik,
|
||||||
title: 'Instrument: Ethik',
|
title: 'Instrument: Ethik',
|
||||||
slug: 'ethik',
|
slug: 'ethik',
|
||||||
|
language: 'de',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: ethik,
|
||||||
|
title: 'Instrument: La éthique, bourgois',
|
||||||
|
slug: 'ethik-burgois',
|
||||||
|
language: 'fr',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -138,4 +147,36 @@ describe('Instruments Page', () => {
|
||||||
cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente – Sprache & Kommunikation');
|
cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente – Sprache & Kommunikation');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('filter by title', () => {
|
||||||
|
cy.visit('instruments/');
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 3);
|
||||||
|
|
||||||
|
cy.getByDataCy('filter-input').type('Analyse');
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 1);
|
||||||
|
|
||||||
|
cy.getByDataCy('filter-input').clear();
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 3);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.skip('filter by language', () => {
|
||||||
|
// todo: move this to a myKV test env
|
||||||
|
|
||||||
|
cy.visit('instruments/');
|
||||||
|
|
||||||
|
// todo: replace this invoke with something that works like a user as soon as the myKV test env is running
|
||||||
|
// cy.get('.filter-bar__language-selection').invoke('show');
|
||||||
|
cy.getByDataCy('radio-button-de').click();
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 3);
|
||||||
|
|
||||||
|
cy.getByDataCy('radio-button-en').click();
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 0);
|
||||||
|
cy.getByDataCy('info-message-no-entry').should(
|
||||||
|
'contain',
|
||||||
|
'Für die ausgewählten Filtereinstellungen sind keine Einträge vorhanden'
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.getByDataCy('radio-button-fr').click();
|
||||||
|
cy.getByDataCy('instrument').should('have.length', 1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="language-switcher">
|
<div class="language-switcher">
|
||||||
<pill-radio-buttons
|
<pill-radio-buttons
|
||||||
|
data-cy="language-switcher-buttons"
|
||||||
:items="languages"
|
:items="languages"
|
||||||
:selected-item="language"
|
:selected-item="language"
|
||||||
@update:selected-item="changeLanguage"
|
@update:selected-item="changeLanguage"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
class="filter-bar__search-input skillbox-input"
|
class="filter-bar__search-input skillbox-input"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Suchbegriff eingeben..."
|
placeholder="Suchbegriff eingeben..."
|
||||||
|
data-cy="filter-input"
|
||||||
ref="searchInputRef"
|
ref="searchInputRef"
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
@input="updateSearchQuery"
|
@input="updateSearchQuery"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<div class="pill-radio">
|
<div class="pill-radio">
|
||||||
<button
|
<button
|
||||||
:class="['pill-radio__button', { 'pill-radio__button--active': item === selectedItem }]"
|
:class="['pill-radio__button', { 'pill-radio__button--active': item === selectedItem }]"
|
||||||
|
:data-cy="'radio-button-' + item"
|
||||||
v-for="item in props.items"
|
v-for="item in props.items"
|
||||||
:key="item"
|
:key="item"
|
||||||
@click="updateSelectedItem(item)"
|
@click="updateSelectedItem(item)"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
<info-message
|
<info-message
|
||||||
class="instrument-overview__no-instruments"
|
class="instrument-overview__no-instruments"
|
||||||
|
data-cy="info-message-no-entry"
|
||||||
v-if="instruments.length > 1 && filteredInstruments.length === 0 && !loading"
|
v-if="instruments.length > 1 && filteredInstruments.length === 0 && !loading"
|
||||||
>
|
>
|
||||||
Für die ausgewählten Filtereinstellungen sind keine Einträge vorhanden
|
Für die ausgewählten Filtereinstellungen sind keine Einträge vorhanden
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue