add style for actor tiles
render actors got from backend backend test code to get actors
This commit is contained in:
@ -78,9 +78,11 @@ describe('<Player/>', function () {
|
||||
});
|
||||
|
||||
it('test delete button', done => {
|
||||
const wrapper = shallow(<Player viewbinding={{
|
||||
returnToLastElement: jest.fn()
|
||||
}}/>);
|
||||
const wrapper = shallow(<Player/>);
|
||||
|
||||
const func = jest.fn();
|
||||
prepareViewBinding(func)
|
||||
|
||||
global.fetch = prepareFetchApi({result: 'success'});
|
||||
|
||||
wrapper.find('.videoactions').find('button').at(2).simulate('click');
|
||||
@ -88,7 +90,7 @@ describe('<Player/>', function () {
|
||||
process.nextTick(() => {
|
||||
// refetch is called so fetch called 3 times
|
||||
expect(global.fetch).toHaveBeenCalledTimes(1);
|
||||
expect(wrapper.instance().props.viewbinding.returnToLastElement).toHaveBeenCalledTimes(1);
|
||||
expect(func).toHaveBeenCalledTimes(1);
|
||||
|
||||
global.fetch.mockClear();
|
||||
done();
|
||||
@ -97,15 +99,9 @@ describe('<Player/>', function () {
|
||||
|
||||
it('hide click ', function () {
|
||||
const wrapper = shallow(<Player/>);
|
||||
const func = jest.fn();
|
||||
|
||||
wrapper.setProps({
|
||||
viewbinding: {
|
||||
returnToLastElement: () => {
|
||||
func();
|
||||
}
|
||||
}
|
||||
});
|
||||
const func = jest.fn();
|
||||
prepareViewBinding(func);
|
||||
|
||||
expect(func).toHaveBeenCalledTimes(0);
|
||||
wrapper.find('.closebutton').simulate('click');
|
||||
|
Reference in New Issue
Block a user