From c9956e8bbda7a243d5a52230a2ec57914a9cf11e Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Thu, 28 Mar 2024 09:42:02 -0400 Subject: [PATCH] update e2e test to make sure playback rate and captions buttons get disabled when there's no video --- tests/e2e/integration/playback.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/e2e/integration/playback.spec.ts b/tests/e2e/integration/playback.spec.ts index ffa6c72e0..03dafeb2b 100644 --- a/tests/e2e/integration/playback.spec.ts +++ b/tests/e2e/integration/playback.spec.ts @@ -209,8 +209,17 @@ describe("Video playback", () => { expect(element[0].paused).to.be.true; }); + // should have both captions and playback rate controls enabled cy.get('[aria-label="Playback Speed"]').should("exist").should("be.enabled"); cy.get('[aria-label="Closed Captions"]').should("exist").should("be.enabled"); + + // skip the video + cy.get(".video-controls button").eq(3).click(); + cy.get("video").should("not.exist"); + + // should have both captions and playback rate controls disabled when the video goes away + cy.get('[aria-label="Playback Speed"]').should("exist").should("be.disabled"); + cy.get('[aria-label="Closed Captions"]').should("exist").should("be.disabled"); }); })