mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-28 21:32:05 +00:00
* Sample Prompts and ComboBox implementation * Adding DeletePopup and SamplePrompts * Implementation of Delete/Copy code buttons * Adjusted changes based on the comments for Modal * Reverded implementation of inline prompt * Updated function * Replacing const to function * Unused icons deleted * Comments removed * Additional styling based on designs * Test snapshots * Implementation of popup for copying code * Tests updated/added * Background color changed * Resolving lint issue * CopyPopup snapshot updated * Merged with master * Implementations fixed based on comments * Test Snapshots updated * Query copilot updated * Resolving minor bug with Delete popup --------- Co-authored-by: Predrag Klepic <v-prklepic@microsoft.com>
27 lines
902 B
TypeScript
27 lines
902 B
TypeScript
import { shallow } from "enzyme";
|
|
import React from "react";
|
|
import { SamplePrompts, SamplePromptsProps } from "./SamplePrompts";
|
|
|
|
describe("Sample Prompts snapshot test", () => {
|
|
it("should render properly if isSamplePromptsOpen is true", () => {
|
|
const sampleProps: SamplePromptsProps = {
|
|
isSamplePromptsOpen: true,
|
|
setIsSamplePromptsOpen: () => undefined,
|
|
setTextBox: () => undefined,
|
|
};
|
|
|
|
const wrapper = shallow(<SamplePrompts sampleProps={sampleProps} />);
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it("should render properly if isSamplePromptsOpen is false", () => {
|
|
const sampleProps: SamplePromptsProps = {
|
|
isSamplePromptsOpen: false,
|
|
setIsSamplePromptsOpen: () => undefined,
|
|
setTextBox: () => undefined,
|
|
};
|
|
const wrapper = shallow(<SamplePrompts sampleProps={sampleProps} />);
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|