Merge branch 'SettingsPage' into 'master'

Settings page

See merge request lukas/openmediacenter!6
This commit is contained in:
2020-07-17 21:14:56 +00:00
18 changed files with 740 additions and 104 deletions

View File

@ -1,7 +1,6 @@
import {shallow, mount} from "enzyme";
import {mount, shallow} from "enzyme";
import React from "react";
import CategoryPage from "./CategoryPage";
import VideoContainer from "../../elements/VideoContainer/VideoContainer";
function prepareFetchApi(response) {
const mockJsonPromise = Promise.resolve(response);
@ -111,4 +110,21 @@ describe('<CategoryPage/>', function () {
expect(func).toBeCalledTimes(1);
});
it('test sidebar tag clicks', function () {
const func = jest.fn();
const wrapper = mount(<CategoryPage category="fullhd"/>);
wrapper.instance().loadTag = func;
console.log(wrapper.debug());
expect(func).toBeCalledTimes(0);
wrapper.find("SideBar").find("Tag").forEach(e => {
e.simulate("click");
})
expect(func).toBeCalledTimes(4);
});
});