Add test for instrument highlights

This commit is contained in:
Ramon Wenger 2024-02-14 08:43:02 +01:00
parent 69987e369c
commit afc415dc8a
1 changed files with 23 additions and 0 deletions

View File

@ -228,4 +228,27 @@ describe('Highlights', () => {
cy.getByDataCy('highlight-note-text').should('contain.text', textPart); cy.getByDataCy('highlight-note-text').should('contain.text', textPart);
cy.get(`[href="${urlPart}"]`).should('exist'); 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: '<p>Hello my beautiful World!</p>',
},
},
],
},
},
},
});
cy.visit('/instrument/my-instrument');
markText();
});
}); });