From 08a52e56f9e52581841f35d2c27961eac4616e3a Mon Sep 17 00:00:00 2001 From: cahirodoherty-learningpool Date: Mon, 9 Sep 2024 15:09:32 +0100 Subject: [PATCH 1/2] Fix: Call stripHtml function on the inline transcript content check --- test/e2e/media.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/media.cy.js b/test/e2e/media.cy.js index e561391..8ce4965 100644 --- a/test/e2e/media.cy.js +++ b/test/e2e/media.cy.js @@ -25,7 +25,7 @@ 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 { From 9b6915de14c7e0fd9ac32eff59a65106a2fc801e Mon Sep 17 00:00:00 2001 From: cahirodoherty-learningpool Date: Mon, 9 Sep 2024 15:12:30 +0100 Subject: [PATCH 2/2] Fix: Exists check instead of visibility check depending on transcript options --- test/e2e/media.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/media.cy.js b/test/e2e/media.cy.js index 8ce4965..a5a883a 100644 --- a/test/e2e/media.cy.js +++ b/test/e2e/media.cy.js @@ -29,14 +29,14 @@ describe('Media', function () { 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') } };