Skip to content

Commit c9956e8

Browse files
committed
update e2e test to make sure playback rate and captions buttons get disabled when there's no video
1 parent 3d4f0ed commit c9956e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/e2e/integration/playback.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,17 @@ describe("Video playback", () => {
209209
expect(element[0].paused).to.be.true;
210210
});
211211

212+
// should have both captions and playback rate controls enabled
212213
cy.get('[aria-label="Playback Speed"]').should("exist").should("be.enabled");
213214
cy.get('[aria-label="Closed Captions"]').should("exist").should("be.enabled");
215+
216+
// skip the video
217+
cy.get(".video-controls button").eq(3).click();
218+
cy.get("video").should("not.exist");
219+
220+
// should have both captions and playback rate controls disabled when the video goes away
221+
cy.get('[aria-label="Playback Speed"]').should("exist").should("be.disabled");
222+
cy.get('[aria-label="Closed Captions"]').should("exist").should("be.disabled");
214223
});
215224
})
216225

0 commit comments

Comments
 (0)