correct load of categorypage on tag click

improved failing tests
This commit is contained in:
2020-06-24 21:47:22 +02:00
parent e640b36ce4
commit 753ea99693
8 changed files with 64 additions and 116 deletions

View File

@ -1,4 +1,4 @@
import {shallow, mount} from "enzyme";
import {shallow} from "enzyme";
import React from "react";
import HomePage from "./HomePage";
import VideoContainer from "../../elements/VideoContainer/VideoContainer";
@ -22,19 +22,6 @@ describe('<HomePage/>', function () {
wrapper.unmount();
});
it('ckeck default tag click events', function () {
// todo mount bad here maybe delete this test
const wrapper = mount(<HomePage/>);
global.fetch = prepareFetchApi({});
expect(global.fetch).toBeCalledTimes(0);
// click every tag button
wrapper.find("Tag").map((i) => {
i.simulate("click");
});
expect(global.fetch).toBeCalledTimes(4);
});
it('test data insertion', function () {
const wrapper = shallow(<HomePage/>);