import React from "react"; import { Facet } from "../../../../search/facets/components/Facet"; import { shallow } from "enzyme"; import { mockDocumentAttributeValueCountPairs } from "../../../mock/mock"; import _ from "lodash"; const mockFacetValues = mockDocumentAttributeValueCountPairs.map(value => ({ ...value, ValueLabel: value.DocumentAttributeValue.StringValue, })); const facetConfiguration = { facetsToShowWhenUncollapsed: 5, showCount: true, }; describe("A ", () => { it("renders correctly", () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); it("renders _source_uri correctly", () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); it("renders collapsed correctly", () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); it("renders expanded correctly", () => { const component = shallow( ); component.instance().showMore(); expect(component).toMatchSnapshot(); }); it("renders count hidden correctly", () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); it("renders correctly if disableAdd", () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); });