mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Remove 'explorer' from a few Panes (#650)
While working on #549 I realized there were a few places where 'explorer' was only needed to expand the notifications console, so I stripped those out where it was easy.
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import { mount } from "enzyme";
|
||||
import React from "react";
|
||||
import Explorer from "../../Explorer";
|
||||
import StoredProcedure from "../../Tree/StoredProcedure";
|
||||
import { ExecuteSprocParamsPane } from "./ExecuteSprocParamsPane";
|
||||
|
||||
describe("Excute Sproc Param Pane", () => {
|
||||
const fakeExplorer = {} as Explorer;
|
||||
const fakeSproc = {} as StoredProcedure;
|
||||
const props = {
|
||||
explorer: fakeExplorer,
|
||||
storedProcedure: fakeSproc,
|
||||
expandConsole: (): void => undefined,
|
||||
closePanel: (): void => undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { IDropdownOption, IImageProps, Image, Stack, Text } from "office-ui-fabric-react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import AddPropertyIcon from "../../../../images/Add-property.svg";
|
||||
import Explorer from "../../Explorer";
|
||||
import StoredProcedure from "../../Tree/StoredProcedure";
|
||||
import {
|
||||
GenericRightPaneComponent,
|
||||
@@ -11,7 +10,7 @@ import {
|
||||
import { InputParameter } from "./InputParameter";
|
||||
|
||||
interface ExecuteSprocParamsPaneProps {
|
||||
explorer: Explorer;
|
||||
expandConsole: () => void;
|
||||
storedProcedure: StoredProcedure;
|
||||
closePanel: () => void;
|
||||
}
|
||||
@@ -27,7 +26,7 @@ interface UnwrappedExecuteSprocParam {
|
||||
}
|
||||
|
||||
export const ExecuteSprocParamsPane: FunctionComponent<ExecuteSprocParamsPaneProps> = ({
|
||||
explorer,
|
||||
expandConsole,
|
||||
storedProcedure,
|
||||
closePanel,
|
||||
}: ExecuteSprocParamsPaneProps): JSX.Element => {
|
||||
@@ -43,7 +42,7 @@ export const ExecuteSprocParamsPane: FunctionComponent<ExecuteSprocParamsPanePro
|
||||
};
|
||||
|
||||
const genericPaneProps: GenericRightPaneProps = {
|
||||
container: explorer,
|
||||
expandConsole,
|
||||
formError: formError,
|
||||
formErrorDetail: formErrorsDetails,
|
||||
id: "executesprocparamspane",
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
||||
<ExecuteSprocParamsPane
|
||||
closePanel={[Function]}
|
||||
explorer={Object {}}
|
||||
expandConsole={[Function]}
|
||||
storedProcedure={Object {}}
|
||||
>
|
||||
<GenericRightPaneComponent
|
||||
container={Object {}}
|
||||
expandConsole={[Function]}
|
||||
formError=""
|
||||
formErrorDetail=""
|
||||
id="executesprocparamspane"
|
||||
|
||||
Reference in New Issue
Block a user