Replace symbol with correct HTML code

This commit is contained in:
Ramon Wenger 2023-04-13 14:26:13 +02:00
parent 9ce7ebcffb
commit 6a506278ad
6 changed files with 23 additions and 9 deletions

View File

@ -0,0 +1,14 @@
import ContentBlock from '@/components/ContentBlock.vue';
describe('<ContentBlock />', () => {
it('renders', () => {
// see: https://on.cypress.io/mounting-vue
cy.mount(ContentBlock, {
props: {
contentBlock: {},
parent: null,
editMode: false,
},
});
});
});

View File

@ -135,7 +135,7 @@ describe('Instruments Page', () => {
cy.getByDataCy('instrument') cy.getByDataCy('instrument')
.first() .first()
.within(() => { .within(() => {
cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente Sprache & Kommunikation'); cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente Sprache & Kommunikation');
}); });
}); });
}); });

View File

@ -68,7 +68,7 @@ describe('Instruments on Module page', () => {
cy.getByDataCy('content-block') cy.getByDataCy('content-block')
.first() .first()
.within(() => { .within(() => {
cy.getByDataCy('instrument-label').should('contain', 'Instrumente Sprache & Kommunikation'); cy.getByDataCy('instrument-label').should('contain', 'Instrumente Sprache & Kommunikation');
}); });
cy.getByDataCy('content-block') cy.getByDataCy('content-block')
.eq(1) .eq(1)

View File

@ -59,14 +59,14 @@
/> />
</div> </div>
<!-- eslint-disable vue/no-v-html -->
<h3 <h3
class="content-block__instrument-label" class="content-block__instrument-label"
data-cy="instrument-label" data-cy="instrument-label"
:style="instrumentLabelStyle" :style="instrumentLabelStyle"
v-if="instrumentLabel !== ''" v-if="instrumentLabel !== ''"
> v-html="instrumentLabel"
{{ instrumentLabel }} />
</h3>
<h4 <h4
class="content-block__title" class="content-block__title"
v-if="!contentBlock.indent" v-if="!contentBlock.indent"

View File

@ -6,13 +6,13 @@
}" }"
class="instrument-entry" class="instrument-entry"
> >
<!-- eslint-disable vue/no-v-html -->
<h4 <h4
class="instrument-entry__category" class="instrument-entry__category"
:style="{ color: instrument.type.category.foreground }" :style="{ color: instrument.type.category.foreground }"
data-cy="instrument-subheader" data-cy="instrument-subheader"
> v-html="categoryName"
{{ categoryName }} />
</h4>
<h3 class="instrument-entry__title"> <h3 class="instrument-entry__title">
{{ instrument.title }} {{ instrument.title }}
</h3> </h3>

View File

@ -12,7 +12,7 @@ const instrumentType = (instrument) => {
}; };
const instrumentCategory = (instrument) => { const instrumentCategory = (instrument) => {
return `${flavor.textInstruments} ${instrumentType(instrument)}`; return `${flavor.textInstruments} &ndash; ${instrumentType(instrument)}`;
}; };
export default instrumentType; export default instrumentType;