mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Rename index.tsx to {class name}.tsx (#689)
* Rename index.tsx to {class name}.tsx
* Update tests
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
28
src/Explorer/Panes/SettingsPane/SettingsPane.test.tsx
Normal file
28
src/Explorer/Panes/SettingsPane/SettingsPane.test.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
import { DatabaseAccount } from "../../../Contracts/DataModels";
|
||||
import { updateUserContext } from "../../../UserContext";
|
||||
import Explorer from "../../Explorer";
|
||||
import { SettingsPane } from "./SettingsPane";
|
||||
const props = {
|
||||
explorer: new Explorer(),
|
||||
closePanel: (): void => undefined,
|
||||
};
|
||||
describe("Settings Pane", () => {
|
||||
it("should render Default properly", () => {
|
||||
const wrapper = shallow(<SettingsPane {...props} />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should render Gremlin properly", () => {
|
||||
updateUserContext({
|
||||
databaseAccount: {
|
||||
properties: {
|
||||
capabilities: [{ name: "EnableGremlin" }],
|
||||
},
|
||||
} as DatabaseAccount,
|
||||
});
|
||||
const wrapper = shallow(<SettingsPane {...props} />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user