From 6a506278ad67cc4f30623490cd89b644367fb7f8 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 13 Apr 2023 14:26:13 +0200 Subject: [PATCH] Replace symbol with correct HTML code --- client/cypress/components/ContentBlock.cy.ts | 14 ++++++++++++++ .../frontend/instruments/instruments-page.spec.js | 2 +- .../e2e/frontend/instruments/module-page.spec.js | 2 +- client/src/components/ContentBlock.vue | 6 +++--- .../src/components/instruments/InstrumentEntry.vue | 6 +++--- client/src/helpers/instrumentType.js | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 client/cypress/components/ContentBlock.cy.ts diff --git a/client/cypress/components/ContentBlock.cy.ts b/client/cypress/components/ContentBlock.cy.ts new file mode 100644 index 00000000..5b791265 --- /dev/null +++ b/client/cypress/components/ContentBlock.cy.ts @@ -0,0 +1,14 @@ +import ContentBlock from '@/components/ContentBlock.vue'; + +describe('', () => { + it('renders', () => { + // see: https://on.cypress.io/mounting-vue + cy.mount(ContentBlock, { + props: { + contentBlock: {}, + parent: null, + editMode: false, + }, + }); + }); +}); diff --git a/client/cypress/e2e/frontend/instruments/instruments-page.spec.js b/client/cypress/e2e/frontend/instruments/instruments-page.spec.js index d49fd6e1..4b35f5ff 100644 --- a/client/cypress/e2e/frontend/instruments/instruments-page.spec.js +++ b/client/cypress/e2e/frontend/instruments/instruments-page.spec.js @@ -135,7 +135,7 @@ describe('Instruments Page', () => { cy.getByDataCy('instrument') .first() .within(() => { - cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente — Sprache & Kommunikation'); + cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente – Sprache & Kommunikation'); }); }); }); diff --git a/client/cypress/e2e/frontend/instruments/module-page.spec.js b/client/cypress/e2e/frontend/instruments/module-page.spec.js index a1186ea9..e45d96f2 100644 --- a/client/cypress/e2e/frontend/instruments/module-page.spec.js +++ b/client/cypress/e2e/frontend/instruments/module-page.spec.js @@ -68,7 +68,7 @@ describe('Instruments on Module page', () => { cy.getByDataCy('content-block') .first() .within(() => { - cy.getByDataCy('instrument-label').should('contain', 'Instrumente — Sprache & Kommunikation'); + cy.getByDataCy('instrument-label').should('contain', 'Instrumente – Sprache & Kommunikation'); }); cy.getByDataCy('content-block') .eq(1) diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index a70ec0da..587f4ae3 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -59,14 +59,14 @@ /> +

- {{ instrumentLabel }} -

+ v-html="instrumentLabel" + />

+

+ v-html="categoryName" + />

{{ instrument.title }}

diff --git a/client/src/helpers/instrumentType.js b/client/src/helpers/instrumentType.js index 8a875576..47f52995 100644 --- a/client/src/helpers/instrumentType.js +++ b/client/src/helpers/instrumentType.js @@ -12,7 +12,7 @@ const instrumentType = (instrument) => { }; const instrumentCategory = (instrument) => { - return `${flavor.textInstruments} — ${instrumentType(instrument)}`; + return `${flavor.textInstruments} – ${instrumentType(instrument)}`; }; export default instrumentType;