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
{{ message }}
Repository navigation
Media player component in story book is broken #231
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');});
Activity
pietrop commentedon Apr 23, 2020
integrating this change in pietrop#13