Files
cosmos-explorer/src/Explorer/Panes/SettingsPane/SettingsPane.test.tsx
Steve Faulkner 481ff9e7fe Migrate SidePanel state to Zustand (#799)
Co-authored-by: hardiknai-techm <HN00734461@TechMahindra.com>
2021-05-27 16:07:07 -05:00

25 lines
720 B
TypeScript

import { shallow } from "enzyme";
import React from "react";
import { DatabaseAccount } from "../../../Contracts/DataModels";
import { updateUserContext } from "../../../UserContext";
import { SettingsPane } from "./SettingsPane";
describe("Settings Pane", () => {
it("should render Default properly", () => {
const wrapper = shallow(<SettingsPane />);
expect(wrapper).toMatchSnapshot();
});
it("should render Gremlin properly", () => {
updateUserContext({
databaseAccount: {
properties: {
capabilities: [{ name: "EnableGremlin" }],
},
} as DatabaseAccount,
});
const wrapper = shallow(<SettingsPane />);
expect(wrapper).toMatchSnapshot();
});
});