1510-smoke-test (#1548)

* 1510-smoke-test

* config default

* update tests

* update test config

* fix linter errors

* more comments

* address comments

* use npm install in push_tests.yml

* use environment.default.json

* adding docs

* Take care of @mweiden's nits

* Save screenshots in the __tests__/screenshots/ directory

* typo

* docs

* Add chart tests (#1580)

* merge tests

* check if bin creation returned null before rendering charts (#1576)

* check if bin creation returned null before rendering charts

* refactor chart rendering into functions (#1577)

* little fixes from PR

* reintroduce fix to check for null values

* change getAllByClass to return element

* slice instead

* new stackedbar test

* feedback-1573-test (#1579)

* feedback-1573-test

* enable whole test set

* revert tests

Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>

* tweak test to actually render chart

* include snapshot

* remove async

* fix getAllHistograms

* properly grab id

Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>

Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
Co-authored-by: Severiano Badajoz <sbadajoz@chanzuckerberg.com>
This commit is contained in:
Timmy Huang
2020-06-24 11:45:39 -07:00
committed by GitHub
co-authored by Matt Weiden Severiano Badajoz
parent e22e671f10
commit 83376627e8
42 changed files with 1388 additions and 887 deletions
+7 -2
View File
@@ -1,5 +1,6 @@
import { Colors } from "@blueprintjs/core";
import { dispatchNetworkErrorMessageToUser } from "./util/actionHelpers";
import * as ENV_DEFAULT from "../../environment.default.json";
/* if a categorical metadata field has more options than this, truncate */
export const maxCategoricalOptionsToDisplay = 200;
@@ -82,21 +83,25 @@ export const maxGenes = 100;
export const tooltipHoverOpenDelay = 1000; /* ms delay before a tooltip displays */
export const tooltipHoverOpenDelayQuick = 500;
const CXG_SERVER_PORT =
process.env.CXG_SERVER_PORT || ENV_DEFAULT.CXG_SERVER_PORT;
let _API;
if (window.CELLXGENE && window.CELLXGENE.API) {
_API = window.CELLXGENE.API;
} else {
if (process.env.CXG_SERVER_PORT === undefined) {
if (CXG_SERVER_PORT === undefined) {
const errorMessage = "Please set the CXG_SERVER_PORT environment variable.";
dispatchNetworkErrorMessageToUser(errorMessage);
throw new Error(errorMessage);
}
_API = {
// prefix: "http://api.clustering.czi.technology/api/",
// prefix: "http://tabulamuris.cxg.czi.technology/api/",
// prefix: "http://api-staging.clustering.czi.technology/api/",
prefix: `http://localhost:${process.env.CXG_SERVER_PORT}/api/`,
prefix: `http://localhost:${CXG_SERVER_PORT}/api/`,
version: "v0.2/",
};
}