2020-10-16 13:16:01 +00:00
|
|
|
import React from "react";
|
|
|
|
import { mount } from "enzyme";
|
2023-01-27 14:08:30 +00:00
|
|
|
import AZSortingReactSvg from "PUBLIC_DIR/images/a-z.sorting.react.svg";
|
2020-10-16 13:16:01 +00:00
|
|
|
describe("<Icons />", () => {
|
|
|
|
it("renders without error", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg />);
|
2019-09-08 13:55:02 +00:00
|
|
|
|
|
|
|
expect(wrapper).toExist();
|
|
|
|
});
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("size small", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg size="small" />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("size")).toBe("small");
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("size medium", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg size="medium" />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("size")).toBe("medium");
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("size big", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg size="big" />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("size")).toBe("big");
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("size scale", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg size="scale" />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("size")).toBe("scale");
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("isfill prop", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg isfill />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("isfill")).toBe(true);
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
it("isStroke prop", () => {
|
2023-01-16 11:01:35 +00:00
|
|
|
const wrapper = mount(<AZSortingReactSvg isStroke />);
|
2019-11-28 11:11:50 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
expect(wrapper.prop("isStroke")).toBe(true);
|
2019-11-28 11:11:50 +00:00
|
|
|
});
|
2019-09-08 13:55:02 +00:00
|
|
|
});
|