refactor categorical controls state (#1549)

* refactor categorical controls state

* lint

* fix race condition in tests

* fix typo

* add missing update on subset

* remove obsolete code

* update jest and puppeteer major version; update all minors

* update when label changes

* remove lint from tests; increase timeouts in e2e tests

* changes in response to PR review

* lint

* more PR comment changes

* more PR comment fixes

* lint

* more PR comment resolutions
This commit is contained in:
Bruce Martin
2020-06-10 12:56:38 -07:00
committed by GitHub
parent f063708b33
commit bc7a712048
25 changed files with 5097 additions and 3510 deletions
+5 -12
View File
@@ -35,19 +35,15 @@ describe("centroid", () => {
// Create categorical selection from world
categoricalSelection = CH.createCategoricalSelection(
world,
CH.selectableCategoryNames(world.schema, CH.maxCategoryItems(REST.config))
CH.selectableCategoryNames(world.schema)
);
});
test("field4 (categorical obsAnnotation)", () => {
const centroidResult = calcCentroid(
world.obsAnnotations,
world.obsLayout,
world,
"field4",
["umap_0", "umap_1"],
categoricalSelection,
world.schema.annotations.obsByName
["umap_0", "umap_1"]
);
// Check to see that a centroid has been calculated for every categorical value
@@ -69,12 +65,9 @@ describe("centroid", () => {
test("field3 (boolean obsAnnotation)", () => {
const centroidResult = calcCentroid(
world.obsAnnotations,
world.obsLayout,
world,
"field3",
["umap_0", "umap_1"],
categoricalSelection,
world.schema.annotations.obsByName
["umap_0", "umap_1"]
);
// Check to see that a centroid has been calculated for every categorical value