import React from "react";
import { mount, shallow } from "enzyme";
import RowContainer from ".";
const baseProps = {
manualHeight: "500px",
};
describe("", () => {
it("renders without error", () => {
const wrapper = mount(
Demo
);
expect(wrapper).toExist();
});
it("stop event on context click", () => {
const wrapper = shallow(
Demo
);
const event = { preventDefault: () => {} };
jest.spyOn(event, "preventDefault");
wrapper.simulate("contextmenu", event);
expect(event.preventDefault).not.toBeCalled();
});
it("renders like list", () => {
const wrapper = mount(
Demo
);
expect(wrapper).toExist();
expect(wrapper.getDOMNode().style).toHaveProperty("height", "");
});
it("renders without manualHeight", () => {
const wrapper = mount(
Demo
);
expect(wrapper).toExist();
});
it("render with normal rows", () => {
const wrapper = mount(
test
);
expect(wrapper).toExist();
});
it("accepts id", () => {
const wrapper = mount(
Demo
);
expect(wrapper.prop("id")).toEqual("testId");
});
it("accepts className", () => {
const wrapper = mount(
Demo
);
expect(wrapper.prop("className")).toEqual("test");
});
it("accepts style", () => {
const wrapper = mount(
Demo
);
expect(wrapper.getDOMNode().style).toHaveProperty("color", "red");
});
});