mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-26 20:31:33 +00:00
P1 bugs for copilot (#1689)
* P1 bugs for copilot * P1 bugs for copilot * P1 bugs for copilot * Update branding and AFEC * Update branding and AFEC * add timeout for ARM calls * increase test timeout * fix formatting * fix formatting * fix formatting * fix formatting * don't call ARM when connectionstring login
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Checkbox, ChoiceGroup, DefaultButton, IconButton, PrimaryButton, TextField } from "@fluentui/react";
|
||||
import { Checkbox, DefaultButton, IconButton, PrimaryButton, TextField } from "@fluentui/react";
|
||||
import Explorer from "Explorer/Explorer";
|
||||
import { QueryCopilotFeedbackModal } from "Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal";
|
||||
import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext";
|
||||
@@ -83,42 +83,6 @@ describe("Query Copilot Feedback Modal snapshot test", () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should record user contact choice no", () => {
|
||||
const wrapper = shallow(
|
||||
<QueryCopilotFeedbackModal
|
||||
explorer={new Explorer()}
|
||||
databaseId="CopilotUserDb"
|
||||
containerId="CopilotUserContainer"
|
||||
mode="User"
|
||||
/>,
|
||||
);
|
||||
const contactAllowed = wrapper.find(ChoiceGroup);
|
||||
|
||||
contactAllowed.simulate("change", {}, { key: "no" });
|
||||
|
||||
expect(getUserEmail).toHaveBeenCalledTimes(3);
|
||||
expect(wrapper.find(ChoiceGroup).props().selectedKey).toEqual("no");
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should record user contact choice yes", () => {
|
||||
const wrapper = shallow(
|
||||
<QueryCopilotFeedbackModal
|
||||
explorer={new Explorer()}
|
||||
databaseId="CopilotUserDb"
|
||||
containerId="CopilotUserContainer"
|
||||
mode="User"
|
||||
/>,
|
||||
);
|
||||
const contactAllowed = wrapper.find(ChoiceGroup);
|
||||
|
||||
contactAllowed.simulate("change", {}, { key: "yes" });
|
||||
|
||||
expect(getUserEmail).toHaveBeenCalledTimes(4);
|
||||
expect(wrapper.find(ChoiceGroup).props().selectedKey).toEqual("yes");
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should not render dont show again button", () => {
|
||||
const wrapper = shallow(
|
||||
<QueryCopilotFeedbackModal
|
||||
@@ -219,7 +183,6 @@ describe("Query Copilot Feedback Modal snapshot test", () => {
|
||||
generatedQuery: "test query",
|
||||
userPrompt: "test prompt",
|
||||
description: "",
|
||||
contact: getUserEmail(),
|
||||
},
|
||||
explorer: explorer,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user