From b632bd61887d1db4709d92f715d8c20944697bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Thu, 6 Sep 2018 17:29:15 -0700 Subject: [PATCH] Move `WeightConfig` into the `weights` directory (#797) Test plan: `yarn test` sufficies for this simple move. --- src/app/credExplorer/App.js | 2 +- src/app/credExplorer/App.test.js | 2 +- .../credExplorer/{ => weights}/WeightConfig.js | 12 ++++++------ .../{ => weights}/WeightConfig.test.js | 15 ++++++--------- 4 files changed, 14 insertions(+), 17 deletions(-) rename src/app/credExplorer/{ => weights}/WeightConfig.js (88%) rename src/app/credExplorer/{ => weights}/WeightConfig.test.js (89%) diff --git a/src/app/credExplorer/App.js b/src/app/credExplorer/App.js index de698bd..d19c17e 100644 --- a/src/app/credExplorer/App.js +++ b/src/app/credExplorer/App.js @@ -9,7 +9,7 @@ import BrowserLocalStore from "../browserLocalStore"; import {defaultStaticAdapters} from "../adapters/defaultPlugins"; import {PagerankTable} from "./pagerankTable/Table"; -import {WeightConfig} from "./WeightConfig"; +import {WeightConfig} from "./weights/WeightConfig"; import { type WeightedTypes, defaultWeightsForAdapterSet, diff --git a/src/app/credExplorer/App.test.js b/src/app/credExplorer/App.test.js index 21c8323..75d705e 100644 --- a/src/app/credExplorer/App.test.js +++ b/src/app/credExplorer/App.test.js @@ -13,7 +13,7 @@ import {defaultWeightsForAdapter} from "./weights/weights"; import RepositorySelect from "./RepositorySelect"; import {PagerankTable} from "./pagerankTable/Table"; -import {WeightConfig} from "./WeightConfig"; +import {WeightConfig} from "./weights/WeightConfig"; import {createApp, LoadingIndicator} from "./App"; import {uninitializedState} from "./state"; import {_Prefix as GithubPrefix} from "../../plugins/github/nodes"; diff --git a/src/app/credExplorer/WeightConfig.js b/src/app/credExplorer/weights/WeightConfig.js similarity index 88% rename from src/app/credExplorer/WeightConfig.js rename to src/app/credExplorer/weights/WeightConfig.js index 9a81d16..0da6af0 100644 --- a/src/app/credExplorer/WeightConfig.js +++ b/src/app/credExplorer/weights/WeightConfig.js @@ -1,13 +1,13 @@ // @flow import React from "react"; -import * as NullUtil from "../../util/null"; -import * as MapUtil from "../../util/map"; +import * as NullUtil from "../../../util/null"; +import * as MapUtil from "../../../util/map"; -import type {StaticAdapterSet} from "../adapters/adapterSet"; -import type {WeightedTypes} from "./weights/weights"; -import {PluginWeightConfig} from "./weights/PluginWeightConfig"; -import {FALLBACK_NAME} from "../adapters/fallbackAdapter"; +import type {StaticAdapterSet} from "../../adapters/adapterSet"; +import type {WeightedTypes} from "./weights"; +import {PluginWeightConfig} from "./PluginWeightConfig"; +import {FALLBACK_NAME} from "../../adapters/fallbackAdapter"; type Props = {| +adapters: StaticAdapterSet, diff --git a/src/app/credExplorer/WeightConfig.test.js b/src/app/credExplorer/weights/WeightConfig.test.js similarity index 89% rename from src/app/credExplorer/WeightConfig.test.js rename to src/app/credExplorer/weights/WeightConfig.test.js index 332a5d6..1402c95 100644 --- a/src/app/credExplorer/WeightConfig.test.js +++ b/src/app/credExplorer/weights/WeightConfig.test.js @@ -2,22 +2,19 @@ import React from "react"; import {shallow} from "enzyme"; -import {PluginWeightConfig} from "./weights/PluginWeightConfig"; +import {PluginWeightConfig} from "./PluginWeightConfig"; import { staticAdapterSet, inserterNodeType, FactorioStaticAdapter, -} from "../adapters/demoAdapters"; -import {FALLBACK_NAME} from "../adapters/fallbackAdapter"; -import { - defaultWeightsForAdapterSet, - defaultWeightsForAdapter, -} from "./weights/weights"; +} from "../../adapters/demoAdapters"; +import {FALLBACK_NAME} from "../../adapters/fallbackAdapter"; +import {defaultWeightsForAdapterSet, defaultWeightsForAdapter} from "./weights"; import {WeightConfig} from "./WeightConfig"; -require("../testUtil").configureEnzyme(); +require("../../testUtil").configureEnzyme(); -describe("app/credExplorer/WeightConfig", () => { +describe("app/credExplorer/weights/WeightConfig", () => { describe("WeightConfig", () => { function example() { const onChange = jest.fn();