describe('Solutions', () => { it.only('does not display the solution at first, then displays them after clicking', () => { cy.viewport('macbook-15'); cy.login('rahel.cueni', 'test'); cy.visit('/module/lohn-und-budget'); cy.get('[data-cy=solution]').first() .should('contain', 'anzeigen').then($solution => { cy.wrap($solution).within(() => { cy.get('[data-cy=show-solution]').click(); }); cy.wrap($solution) .should('contain', 'Lösungssatz') .should('contain', 'ausblenden'); }); }); });