mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-30 22:31:56 +00:00
resolve compile time error
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ITooltipHostStyles, TooltipHost } from "@fluentui/react";
|
||||
import { useId } from "@fluentui/react-hooks";
|
||||
import { ReactComponent as InfoBubble } from "images/info-bubble.svg";
|
||||
import * as React from "react";
|
||||
import React, { FunctionComponent } from "react";
|
||||
|
||||
const calloutProps = { gapSpace: 0 };
|
||||
const hostStyles: Partial<ITooltipHostStyles> = { root: { display: "inline-block" } };
|
||||
@@ -9,7 +9,7 @@ const hostStyles: Partial<ITooltipHostStyles> = { root: { display: "inline-block
|
||||
export interface TooltipProps {
|
||||
children: string;
|
||||
}
|
||||
export const Tooltip: React.FunctionComponent = ({ children }: TooltipProps) => {
|
||||
export const Tooltip: FunctionComponent = ({ children }: TooltipProps) => {
|
||||
const tooltipId = useId("tooltip");
|
||||
|
||||
return children ? (
|
||||
|
||||
@@ -1959,7 +1959,7 @@ exports[`test render renders with filters 1`] = `
|
||||
</div>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -252,7 +252,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
>
|
||||
capacity calculator
|
||||
|
||||
<Component
|
||||
<FontIcon
|
||||
iconName="NavigateExternalInline"
|
||||
/>
|
||||
</StyledLinkBase>
|
||||
@@ -526,7 +526,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
>
|
||||
capacity calculator
|
||||
|
||||
<Component
|
||||
<FontIcon
|
||||
iconName="NavigateExternalInline"
|
||||
/>
|
||||
</StyledLinkBase>
|
||||
|
||||
@@ -123,8 +123,9 @@ export const cellTarget = {
|
||||
if (monitor) {
|
||||
const hoverUpperHalf = isDragUpper(props, monitor, component.el);
|
||||
// DropTargetSpec monitor definition could be undefined. we'll need a check for monitor in order to pass validation.
|
||||
const item: Props = monitor.getItem();
|
||||
props.moveCell({
|
||||
id: monitor.getItem().id,
|
||||
id: item.id,
|
||||
destinationId: props.id,
|
||||
above: hoverUpperHalf,
|
||||
contentRef: props.contentRef,
|
||||
|
||||
@@ -1115,7 +1115,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
className="ms-Button-flexContainer flexContainer-203"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-205"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -1131,10 +1131,10 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
@@ -3650,7 +3650,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -1106,7 +1106,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
||||
className="ms-Button-flexContainer flexContainer-54"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-56"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -1122,10 +1122,10 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
@@ -8213,7 +8213,7 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -1760,7 +1760,7 @@ exports[`Setup Notebooks Panel should render Default properly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -2379,7 +2379,7 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
className="ms-Button-flexContainer flexContainer-154"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-156"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -2395,10 +2395,10 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
@@ -4837,7 +4837,7 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -1110,7 +1110,7 @@ exports[`Table query select Panel should render Default properly 1`] = `
|
||||
className="ms-Button-flexContainer flexContainer-54"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-56"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -1126,10 +1126,10 @@ exports[`Table query select Panel should render Default properly 1`] = `
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
@@ -4180,7 +4180,7 @@ exports[`Table query select Panel should render Default properly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
@@ -2663,7 +2663,7 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
|
||||
className="ms-Button-flexContainer flexContainer-73"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-75"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -2679,10 +2679,10 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
|
||||
@@ -2664,7 +2664,7 @@ exports[`Excute Edit Table Entity Pane should render Default properly 1`] = `
|
||||
className="ms-Button-flexContainer flexContainer-73"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
<FontIcon
|
||||
className="ms-Button-icon icon-75"
|
||||
iconName="Cancel"
|
||||
>
|
||||
@@ -2680,10 +2680,10 @@ exports[`Excute Edit Table Entity Pane should render Default properly 1`] = `
|
||||
>
|
||||
|
||||
</i>
|
||||
</Component>
|
||||
</FontIcon>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</IconButton>
|
||||
</CustomizedIconButton>
|
||||
|
||||
@@ -20,7 +20,9 @@ exports[`Upload Items Pane should render Default properly 1`] = `
|
||||
multiple={true}
|
||||
onUpload={[Function]}
|
||||
tabIndex={0}
|
||||
tooltip="Select one or more JSON files to upload. Each file can contain a single JSON document or an array of JSON documents. The combined size of all files in an individual upload operation must be less than 2 MB. You can perform multiple upload operations for larger data sets."
|
||||
tooltip="Select one or more JSON files to upload. Each file can contain a single JSON document or an array of JSON
|
||||
documents. The combined size of all files in an individual upload operation must be less than 2 MB. You
|
||||
can perform multiple upload operations for larger data sets."
|
||||
/>
|
||||
</div>
|
||||
</GenericRightPaneComponent>
|
||||
|
||||
@@ -4021,7 +4021,7 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<Component />
|
||||
<FocusRects />
|
||||
</BaseButton>
|
||||
</DefaultButton>
|
||||
</CustomizedDefaultButton>
|
||||
|
||||
8
src/global.d.ts
vendored
8
src/global.d.ts
vendored
@@ -1,6 +1,14 @@
|
||||
import { PageWaitForSelectorOptions } from "expect-playwright";
|
||||
import Explorer from "./Explorer/Explorer";
|
||||
|
||||
declare global {
|
||||
namespace jest {
|
||||
interface Matchers<R> {
|
||||
toHaveFocus(selector: string, options?: PageWaitForSelectorOptions): Promise<R>;
|
||||
toHaveTextContent(htmlElement: string): object;
|
||||
toHaveValue(value: string | string[] | number): object;
|
||||
}
|
||||
}
|
||||
interface Window {
|
||||
/**
|
||||
* @deprecated
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { initializeIcons } from "@fluentui/react";
|
||||
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
|
||||
import { configure } from "enzyme";
|
||||
import "jest-canvas-mock";
|
||||
import { initializeIcons } from "@fluentui/react";
|
||||
import { TextDecoder, TextEncoder } from "util";
|
||||
configure({ adapter: new Adapter() });
|
||||
initializeIcons();
|
||||
|
||||
if (typeof window.URL.createObjectURL === "undefined") {
|
||||
Object.defineProperty(window.URL, "createObjectURL", { value: () => {} });
|
||||
Object.defineProperty(window.URL, "createObjectURL", { value: () => { } });
|
||||
}
|
||||
|
||||
// TODO Remove when jquery and documentdbclient SDK are removed
|
||||
|
||||
Reference in New Issue
Block a user