mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-13 19:55:15 +00:00
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { shallow } from "enzyme";
|
|
import React from "react";
|
|
import { PanelContainerComponent, PanelContainerProps } from "./PanelContainerComponent";
|
|
|
|
describe("PaneContainerComponent test", () => {
|
|
it("should render with panel content and header", () => {
|
|
const panelContainerProps: PanelContainerProps = {
|
|
headerText: "test",
|
|
panelContent: <div></div>,
|
|
isOpen: true,
|
|
isConsoleExpanded: false,
|
|
};
|
|
const wrapper = shallow(<PanelContainerComponent {...panelContainerProps} />);
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it("should render nothing if content is undefined", () => {
|
|
const panelContainerProps: PanelContainerProps = {
|
|
headerText: "test",
|
|
panelContent: undefined,
|
|
isOpen: true,
|
|
isConsoleExpanded: false,
|
|
};
|
|
const wrapper = shallow(<PanelContainerComponent {...panelContainerProps} />);
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it("should be resize if notification console is expanded", () => {
|
|
const panelContainerProps: PanelContainerProps = {
|
|
headerText: "test",
|
|
panelContent: <div></div>,
|
|
isOpen: true,
|
|
isConsoleExpanded: true,
|
|
};
|
|
const wrapper = shallow(<PanelContainerComponent {...panelContainerProps} />);
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|