Resolve Lint errors in NotificationConsoleComponent.ts (#527)
This commit is contained in:
parent
02e6d8442b
commit
05932e1d38
|
@ -298,8 +298,6 @@ src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.test.t
|
|||
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.tsx
|
||||
src/Explorer/Menus/CommandBar/CommandBarUtil.tsx
|
||||
src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.test.tsx
|
||||
src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx
|
||||
src/Explorer/Menus/NotificationConsole/NotificationConsoleComponentAdapter.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/NotebookComponent.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/NotebookComponentAdapter.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/NotebookComponentBootstrapper.tsx
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
import {
|
||||
NotificationConsoleComponentProps,
|
||||
NotificationConsoleComponent,
|
||||
ConsoleDataType,
|
||||
NotificationConsoleComponent,
|
||||
NotificationConsoleComponentProps,
|
||||
} from "./NotificationConsoleComponent";
|
||||
|
||||
describe("NotificationConsoleComponent", () => {
|
||||
|
@ -12,7 +12,7 @@ describe("NotificationConsoleComponent", () => {
|
|||
consoleData: undefined,
|
||||
isConsoleExpanded: false,
|
||||
inProgressConsoleDataIdToBeDeleted: "",
|
||||
setIsConsoleExpanded: (isExpanded: boolean): void => {},
|
||||
setIsConsoleExpanded: (): void => undefined,
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -98,7 +98,7 @@ describe("NotificationConsoleComponent", () => {
|
|||
wrapper.setProps(props);
|
||||
expect(wrapper.find(".notificationConsoleData .date").text()).toEqual(date);
|
||||
expect(wrapper.find(".notificationConsoleData .message").text()).toEqual(message);
|
||||
expect(wrapper.exists(`.notificationConsoleData .${iconClassName}`));
|
||||
expect(wrapper.exists(`.notificationConsoleData .${iconClassName}`)).toBe(true);
|
||||
};
|
||||
|
||||
it("renders progress notifications", () => {
|
||||
|
@ -139,7 +139,7 @@ describe("NotificationConsoleComponent", () => {
|
|||
wrapper.setProps(props);
|
||||
|
||||
wrapper.find(".clearNotificationsButton").simulate("click");
|
||||
expect(!wrapper.exists(".notificationConsoleData"));
|
||||
expect(wrapper.exists(".notificationConsoleData")).toBe(true);
|
||||
});
|
||||
|
||||
it("collapses and hide content", () => {
|
||||
|
@ -155,7 +155,7 @@ describe("NotificationConsoleComponent", () => {
|
|||
wrapper.setProps(props);
|
||||
|
||||
wrapper.find(".notificationConsoleHeader").simulate("click");
|
||||
expect(!wrapper.exists(".notificationConsoleContent"));
|
||||
expect(wrapper.exists(".notificationConsoleContent")).toBe(false);
|
||||
});
|
||||
|
||||
it("display latest data in header", () => {
|
||||
|
|
|
@ -77,7 +77,7 @@ export class NotificationConsoleComponent extends React.Component<
|
|||
public componentDidUpdate(
|
||||
prevProps: NotificationConsoleComponentProps,
|
||||
prevState: NotificationConsoleComponentState
|
||||
) {
|
||||
): void {
|
||||
const currentHeaderStatus = NotificationConsoleComponent.extractHeaderStatus(this.props.consoleData);
|
||||
|
||||
if (
|
||||
|
@ -98,7 +98,7 @@ export class NotificationConsoleComponent extends React.Component<
|
|||
}
|
||||
}
|
||||
|
||||
public setElememntRef = (element: HTMLElement) => {
|
||||
public setElememntRef = (element: HTMLElement): void => {
|
||||
this.consoleHeaderElement = element;
|
||||
};
|
||||
|
||||
|
@ -117,7 +117,7 @@ export class NotificationConsoleComponent extends React.Component<
|
|||
className="notificationConsoleHeader"
|
||||
id="notificationConsoleHeader"
|
||||
ref={this.setElememntRef}
|
||||
onClick={(event: React.MouseEvent<HTMLDivElement>) => this.expandCollapseConsole()}
|
||||
onClick={() => this.expandCollapseConsole()}
|
||||
onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>) => this.onExpandCollapseKeyPress(event)}
|
||||
tabIndex={0}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue