diff --git a/src/app/credExplorer/PagerankTable.js b/src/app/credExplorer/PagerankTable.js index 9974534..55a2786 100644 --- a/src/app/credExplorer/PagerankTable.js +++ b/src/app/credExplorer/PagerankTable.js @@ -77,8 +77,8 @@ type SharedProps = {| |}; type PagerankTableProps = {| - +pnd: ?PagerankNodeDecomposition, - +adapters: ?$ReadOnlyArray, + +pnd: PagerankNodeDecomposition, + +adapters: $ReadOnlyArray, +maxEntriesPerList: number, |}; type PagerankTableState = {|topLevelFilter: NodeAddressT|}; @@ -92,15 +92,6 @@ export class PagerankTable extends React.PureComponent< } render() { - if (this.props.adapters == null) { - return

You must load a graph before seeing PageRank analysis.

; - } - if (this.props.pnd == null) { - return

Please run PageRank to see analysis.

; - } - if (this.props.maxEntriesPerList == null) { - throw new Error("maxEntriesPerList not set"); - } return (
{this.renderFilterSelect()} diff --git a/src/app/credExplorer/PagerankTable.test.js b/src/app/credExplorer/PagerankTable.test.js index 1b8091f..a27cbf2 100644 --- a/src/app/credExplorer/PagerankTable.test.js +++ b/src/app/credExplorer/PagerankTable.test.js @@ -1,7 +1,6 @@ // @flow import React from "react"; import {shallow} from "enzyme"; -import enzymeToJSON from "enzyme-to-json"; import type {DynamicPluginAdapter} from "../pluginAdapter"; @@ -175,32 +174,6 @@ describe("app/credExplorer/PagerankTable", () => { }); describe("PagerankTable", () => { - it("renders expected message with null props", () => { - const element = shallow( - - ); - expect(enzymeToJSON(element)).toMatchSnapshot(); - }); - it("renders expected message with just adapters", async () => { - const {adapters} = await example(); - const element = shallow( - - ); - expect(enzymeToJSON(element)).toMatchSnapshot(); - }); - it("throws an error if maxEntriesPerList not set", async () => { - const {pnd, adapters} = await example(); - expect(() => - shallow( - - ) - ).toThrowError("maxEntriesPerList"); - }); it("renders thead column order properly", async () => { const {pnd, adapters} = await example(); const element = shallow( diff --git a/src/app/credExplorer/__snapshots__/PagerankTable.test.js.snap b/src/app/credExplorer/__snapshots__/PagerankTable.test.js.snap index 0963153..5f59191 100644 --- a/src/app/credExplorer/__snapshots__/PagerankTable.test.js.snap +++ b/src/app/credExplorer/__snapshots__/PagerankTable.test.js.snap @@ -66,15 +66,3 @@ Array [ }, ] `; - -exports[`app/credExplorer/PagerankTable PagerankTable renders expected message with just adapters 1`] = ` -

- Please run PageRank to see analysis. -

-`; - -exports[`app/credExplorer/PagerankTable PagerankTable renders expected message with null props 1`] = ` -

- You must load a graph before seeing PageRank analysis. -

-`;