Skip to content

Commit 459d56e

Browse files
committed
branch
1 parent 8e8f361 commit 459d56e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

frontend/packages/component-library/src/video/stories/Video.story.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,28 @@ export const VideoWithCaptionAndFallback: Story = {
107107
expect(download).toBeVisible();
108108
},
109109
};
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+
};

0 commit comments

Comments
 (0)