Add new tests for instrument label
This commit is contained in:
parent
428e51f254
commit
e05edc0867
|
|
@ -1,9 +1,6 @@
|
|||
describe('Instruments Page', () => {
|
||||
beforeEach(() => {
|
||||
cy.setup();
|
||||
});
|
||||
|
||||
it('opens the instruments page', () => {
|
||||
const analyse = {
|
||||
name: 'Analyse',
|
||||
category: 'LANGUAGE_COMMUNICATION',
|
||||
|
|
@ -63,6 +60,9 @@ describe('Instruments Page', () => {
|
|||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('opens the instruments page', () => {
|
||||
cy.visit('instruments/');
|
||||
|
||||
cy.getByDataCy('instrument').should('have.length', 3);
|
||||
|
|
@ -85,4 +85,11 @@ describe('Instruments Page', () => {
|
|||
cy.getByDataCy('filter-all-instruments').click();
|
||||
cy.getByDataCy('instrument').should('have.length', 3);
|
||||
});
|
||||
|
||||
it('shows the correct instrument label', () => {
|
||||
cy.visit('instruments/');
|
||||
cy.getByDataCy('instrument').first().within(() => {
|
||||
cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente - Sprache & Kommunikation');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
describe('Instruments on Module page', () => {
|
||||
it('shows the correct instrument label', () => {
|
||||
cy.visit('modules/module-with-instrument');
|
||||
cy.getByDataCy('instrument').first().within(() => {
|
||||
cy.getByDataCy('instrument-subheader').should('contain', 'Instrumente - Sprache & Kommunikation');
|
||||
});
|
||||
// also check that other content blocks don't have the label
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Reference in New Issue