Skip to content

Commit

Permalink
Fix: Call stripHtml function on the inline transcript content check (f…
Browse files Browse the repository at this point in the history
…ixes #303)

* Fix: Call stripHtml function on the inline transcript content check

* Fix: Exists check instead of visibility check depending on transcript options
  • Loading branch information
cahirodoherty-learningpool authored Sep 23, 2024
1 parent 3a5437c commit 1b67f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/media.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ describe('Media', function () {
cy.get('.media__transcript-body-inline').should('not.be.visible');
cy.get('button.media__transcript-btn-inline').should('be.visible');
cy.get('button.media__transcript-btn-inline').should('contain', mediaComponent._transcript.inlineTranscriptButton).click();
cy.get('.media__transcript-body-inline-inner').should('be.visible').should('contain', mediaComponent._transcript.inlineTranscriptBody);
cy.get('.media__transcript-body-inline-inner').should('be.visible').should('contain', stripHtml(mediaComponent._transcript.inlineTranscriptBody));
cy.get('button.media__transcript-btn-inline').should('contain', mediaComponent._transcript.inlineTranscriptCloseButton).click();
cy.get('.media__transcript-body-inline').should('not.be.visible');
} else {
cy.get('button.media__transcript-btn-inline').should('not.be.visible');
cy.get('button.media__transcript-btn-inline').should('not.exist');
}

if (mediaComponent._transcript._externalTranscript) {
cy.get('button.media__transcript-btn-external').should('be.visible')
cy.get('button.media__transcript-btn-external').should('contain', mediaComponent._transcript.transcriptLinkButton);
} else {
cy.get('button.media__transcript-btn-external').should('not.be.visible')
cy.get('button.media__transcript-btn-external').should('not.exist')
}
};

Expand Down

0 comments on commit 1b67f14

Please sign in to comment.