diff --git a/src/picker-base/__tests__/BasePicker.tests.tsx b/src/picker-base/__tests__/BasePicker.tests.tsx new file mode 100644 index 000000000..0a1772cac --- /dev/null +++ b/src/picker-base/__tests__/BasePicker.tests.tsx @@ -0,0 +1,109 @@ +import * as React from "react"; +import { axe, render, press, fireEvent } from "reakit-test-utils"; + +import { + PickerBase, + PickerBaseContent, + PickerBaseTrigger, + usePickerBaseState, + PickerBaseInitialState, +} from ".."; + +const PickerBaseComp: React.FC = props => { + const state = usePickerBaseState({ + ...props, + pickerId: "picker-1", + dialogId: "dialog-1", + baseId: "picker-test", + }); + + return ( + <> + + open + + + Content + + + ); +}; + +describe("PickerBase", () => { + test("should render correctly", () => { + const { getByText: text, baseElement } = render( + , + ); + + expect(baseElement).toMatchInlineSnapshot(` + +
+
+
+ open +
+
+
+