)}
-
+
);
}
diff --git a/src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.test.tsx b/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx
similarity index 80%
rename from src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.test.tsx
rename to src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx
index de7ca9f1f..6e0bfe27e 100644
--- a/src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.test.tsx
+++ b/src/Explorer/Panes/RightPaneForm/RightPaneForm.test.tsx
@@ -2,7 +2,7 @@ import { fireEvent, render, screen } from "@testing-library/react";
import { mount, ReactWrapper } from "enzyme";
import React from "react";
import Explorer from "../../Explorer";
-import { RightPaneWrapper } from "./RightPaneWrapper";
+import { RightPaneForm } from "./RightPaneForm";
const onClose = jest.fn();
const onSubmit = jest.fn();
@@ -24,26 +24,26 @@ describe("Load Query Pane", () => {
let wrapper: ReactWrapper;
it("should render Default properly", () => {
- wrapper = mount(
);
+ wrapper = mount(
);
expect(wrapper).toMatchSnapshot();
});
it("should call close method click cancel icon", () => {
- render(
);
+ render(
);
fireEvent.click(screen.getByTestId("closePaneBtn"));
expect(onClose).toHaveBeenCalled();
});
it("should call submit method enter in form", () => {
- render(
);
+ render(
);
fireEvent.click(screen.getByTestId("submit"));
expect(onSubmit).toHaveBeenCalled();
});
it("should call submit method click on submit button", () => {
- render(
);
+ render(
);
fireEvent.click(screen.getByTestId("submit"));
expect(onSubmit).toHaveBeenCalled();
});
it("should render error in header", () => {
- render(
);
+ render(
);
expect(screen.getByTestId("errorIcon")).toBeDefined();
expect(screen.getByTestId("panelmessage").innerHTML).toEqual("file already Exist");
});
diff --git a/src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.tsx b/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx
similarity index 95%
rename from src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.tsx
rename to src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx
index ee79e91bc..23af7787a 100644
--- a/src/Explorer/Panes/RightPaneWrapper/RightPaneWrapper.tsx
+++ b/src/Explorer/Panes/RightPaneForm/RightPaneForm.tsx
@@ -6,7 +6,7 @@ import { PanelFooterComponent } from "../PanelFooterComponent";
import { PanelInfoErrorComponent, PanelInfoErrorProps } from "../PanelInfoErrorComponent";
import { PanelLoadingScreen } from "../PanelLoadingScreen";
-export interface RightPaneWrapperProps {
+export interface RightPaneFormProps {
container: Explorer;
formError: string;
formErrorDetail: string;
@@ -24,7 +24,7 @@ export interface GenericRightPaneState {
panelHeight: number;
}
-export const RightPaneWrapper: FunctionComponent
= ({
+export const RightPaneForm: FunctionComponent = ({
container,
formError,
formErrorDetail,
@@ -36,7 +36,7 @@ export const RightPaneWrapper: FunctionComponent = ({
title,
isSubmitButtonHidden = false,
children,
-}: RightPaneWrapperProps) => {
+}: RightPaneFormProps) => {
const getPanelHeight = (): number => {
const notificationConsoleElement: HTMLElement = document.getElementById("explorerNotificationConsole");
return window.innerHeight - $(notificationConsoleElement).height();
diff --git a/src/Explorer/Panes/RightPaneWrapper/__snapshots__/RightPaneWrapper.test.tsx.snap b/src/Explorer/Panes/RightPaneForm/__snapshots__/RightPaneWrapper.test.tsx.snap
similarity index 100%
rename from src/Explorer/Panes/RightPaneWrapper/__snapshots__/RightPaneWrapper.test.tsx.snap
rename to src/Explorer/Panes/RightPaneForm/__snapshots__/RightPaneWrapper.test.tsx.snap
diff --git a/src/Explorer/Panes/SaveQueryPanel/index.tsx b/src/Explorer/Panes/SaveQueryPanel/index.tsx
index 9fd209675..a4e5bc559 100644
--- a/src/Explorer/Panes/SaveQueryPanel/index.tsx
+++ b/src/Explorer/Panes/SaveQueryPanel/index.tsx
@@ -9,7 +9,7 @@ import { traceFailure, traceStart, traceSuccess } from "../../../Shared/Telemetr
import { logConsoleError } from "../../../Utils/NotificationConsoleUtils";
import Explorer from "../../Explorer";
import QueryTab from "../../Tabs/QueryTab";
-import { RightPaneWrapper, RightPaneWrapperProps } from "../RightPaneWrapper/RightPaneWrapper";
+import { GenericRightPaneComponent, GenericRightPaneProps } from "../GenericRightPaneComponent";
interface SaveQueryPanelProps {
explorer: Explorer;
@@ -28,7 +28,7 @@ export const SaveQueryPanel: FunctionComponent = ({
const setupSaveQueriesText = `For compliance reasons, we save queries in a container in your Azure Cosmos account, in a separate database called “${SavedQueries.DatabaseName}”. To proceed, we need to create a container in your account, estimated additional cost is $0.77 daily.`;
const title = "Save Query";
const { canSaveQueries } = explorer;
- const genericPaneProps: RightPaneWrapperProps = {
+ const genericPaneProps: GenericRightPaneProps = {
container: explorer,
formError: formError,
formErrorDetail: formErrorsDetails,
@@ -146,7 +146,7 @@ export const SaveQueryPanel: FunctionComponent = ({
};
return (
-
+
{!canSaveQueries() ? (
@@ -163,6 +163,6 @@ export const SaveQueryPanel: FunctionComponent = ({
)}
-
+
);
};
diff --git a/src/Explorer/Panes/SettingsPane/index.tsx b/src/Explorer/Panes/SettingsPane/index.tsx
index 816a0577b..4894f5fb4 100644
--- a/src/Explorer/Panes/SettingsPane/index.tsx
+++ b/src/Explorer/Panes/SettingsPane/index.tsx
@@ -8,7 +8,7 @@ import * as StringUtility from "../../../Shared/StringUtility";
import { userContext } from "../../../UserContext";
import { logConsoleInfo } from "../../../Utils/NotificationConsoleUtils";
import Explorer from "../../Explorer";
-import { RightPaneWrapper, RightPaneWrapperProps } from "../RightPaneWrapper/RightPaneWrapper";
+import { RightPaneForm, RightPaneFormProps } from "../RightPaneForm/RightPaneForm";
export interface SettingsPaneProps {
explorer: Explorer;
@@ -103,7 +103,7 @@ export const SettingsPane: FunctionComponent = ({
setGraphAutoVizDisabled(option.key);
};
- const genericPaneProps: RightPaneWrapperProps = {
+ const genericPaneProps: RightPaneFormProps = {
container,
formError: formErrors,
formErrorDetail: "",
@@ -128,7 +128,7 @@ export const SettingsPane: FunctionComponent = ({
setPageOption(option.key);
};
return (
-
+
{shouldShowQueryPageOptions && (
@@ -248,6 +248,6 @@ export const SettingsPane: FunctionComponent = ({
-