-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(View Album): Change HTML5 video to preload, autoplay and use JPE…
…G poster [#104]
- Loading branch information
Showing
9 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import test from 'tape'; | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
|
||
import '../../../test/react-enzyme-setup'; | ||
import Video from '../views/video'; | ||
|
||
test('React Component - Video', { skip: false }, (describe) => { | ||
const item = { | ||
w: 800, | ||
h: 600, | ||
gallery: 'test', | ||
sources: '2017-video.mp4', | ||
}; | ||
|
||
describe.test('* Parent element', (assert) => { | ||
const wrapper = mount(<Video video={item} />); | ||
const liProps = wrapper.find('video').props(); | ||
assert.equal(liProps.width, 800, 'Width'); | ||
assert.equal(liProps.height, 600, 'Height'); | ||
assert.equal(liProps.poster, '/static/gallery-test/media/photos/2017/2017-video.jpg', 'Poster'); | ||
assert.equal(liProps.controls, true, 'Controls'); | ||
assert.equal(liProps.preload, 'auto', 'Preload'); | ||
assert.equal(liProps.autoPlay, 'true', 'Autoplay'); | ||
assert.end(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.