File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/components/media/video Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,20 @@ describe('Video', () => {
9999 } )
100100 } )
101101 } )
102+ it ( `should display an error message if entering fullscreen fails on ${ viewport } screen` , ( ) => {
103+ cy . viewport ( viewport )
104+ cy . window ( ) . then ( ( window ) => {
105+ cy . stub ( window . HTMLElement . prototype , 'requestFullscreen' ) . rejects (
106+ new Error ( )
107+ )
108+ } )
109+
110+ if ( viewport === 'macbook-13' ) {
111+ cy . get ( controls ) . realHover ( )
112+ }
113+ cy . get ( fullScreenEnterButton ) . realClick ( )
114+ cy . get ( '[data-cy=control-error-message]' ) . should ( 'be.visible' )
115+ } )
102116 } )
103117
104118 context ( 'Mobile' , ( ) => {
Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ export default function Video(props: VideoFormat) {
313313 < Alert
314314 severity = "error"
315315 className = "rustic-video-control-error-message"
316+ data-cy = "control-error-message"
316317 >
317318 { controlErrorMessage }
318319 </ Alert >
You can’t perform that action at this time.
0 commit comments