From afc415dc8a624c5f7d1eef6617b3cf32a75a6991 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 14 Feb 2024 08:43:02 +0100 Subject: [PATCH] Add test for instrument highlights --- .../e2e/frontend/modules/highlights.cy.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/client/cypress/e2e/frontend/modules/highlights.cy.ts b/client/cypress/e2e/frontend/modules/highlights.cy.ts index 1b832e3e..2a648773 100644 --- a/client/cypress/e2e/frontend/modules/highlights.cy.ts +++ b/client/cypress/e2e/frontend/modules/highlights.cy.ts @@ -228,4 +228,27 @@ describe('Highlights', () => { cy.getByDataCy('highlight-note-text').should('contain.text', textPart); cy.get(`[href="${urlPart}"]`).should('exist'); }); + + it.only('visits an instrument and highlights some text', () => { + cy.mockGraphqlOps({ + operations: { + ...operations, + InstrumentQuery: { + instrument: { + title: 'My Instrument', + contents: [ + { + type: 'text_block', + value: { + text: '

Hello my beautiful World!

', + }, + }, + ], + }, + }, + }, + }); + cy.visit('/instrument/my-instrument'); + markText(); + }); });