You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReactfrom'react';import{render,cleanup}from'react-testing-library';import{shallow}from'enzyme';importMediaPlayerfrom'./index.js';afterEach(cleanup);videoRef=React.createRef();constfakeUrl="https://storage.googleapis.com/coverr-main/mp4/Pigeon-Impossible.mp4";constfakeVideoUrl=<videoref={videoRef}src={url}></video>;xtest('GIVEN a chapter title I expect that WHEN the Video component is rendered THEN the correct title is displayed',()=>{const{ container }=render(<MediaPlayervideoRef={videoRef}mediaUrl={fakeUrl}/>);expect(container.innerHTML).toContain('videoSection');});xtest("GIVEN a video as a chapter with src video url THEN the video is rendered fakeUrl it's source url",()=>{const{ getByTestId }=render(<MediaPlayervideoRef={videoRef}mediaUrl={fakeVideoUrl}/>);expect(getByTestId('media-player-id').attributes.src.value).toBe(fakeUrl);});xtest('WHEN the Video component is rendered THEN a video element is displayed',()=>{constwrapper=shallow(<MediaPlayervideoRef={videoRef}mediaUrl={fakeUrl}/>);expect(wrapper.find('video').type()).toBe('video');});
after the fix
The text was updated successfully, but these errors were encountered:
Media player in story book is broken
https://bbc.github.io/react-transcript-editor/?path=/story/mediaplayer--default
This is the fix in
/packages/components/media-player/index.js
also storybook needs to be changed to
/packages/components/media-player/index.test.js
after the fix
The text was updated successfully, but these errors were encountered: