File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
frontend/packages/component-library/src/video/stories Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -107,3 +107,28 @@ export const VideoWithCaptionAndFallback: Story = {
107
107
expect ( download ) . toBeVisible ( ) ;
108
108
} ,
109
109
} ;
110
+ export const VideoWithCaptionAndFallbackT : Story = {
111
+ args : {
112
+ videoTitle : "What Most Schools Don't Teach" ,
113
+ videoFallback :
114
+ 'https://videos.code.org/social/what-most-schools-dont-teach.mp4' ,
115
+ youTubeId : 'nKIu9yen5nc' ,
116
+ showCaption : true ,
117
+ } ,
118
+ play : async ( { canvasElement} ) => {
119
+ const canvas = within ( canvasElement ) ;
120
+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
121
+ const video = await canvas . findByTitle ( "What Most Schools Don't Teach" ) ;
122
+ const caption = canvas . getByText ( "What Most Schools Don't Teach" ) ;
123
+ const download = canvas . getByRole ( 'link' ) ;
124
+
125
+ // check if video is visible
126
+ expect ( video ) . toBeVisible ( ) ;
127
+
128
+ // check if caption is visible
129
+ expect ( caption ) . toBeVisible ( ) ;
130
+
131
+ // check if download button is visible
132
+ expect ( download ) . toBeVisible ( ) ;
133
+ } ,
134
+ } ;
You can’t perform that action at this time.
0 commit comments