mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 21:58:12 +08:00
diffexp snapshot
This commit is contained in:
@@ -143,19 +143,34 @@ describe.each([
|
|||||||
await clickOn(`categorical-value-select-louvain-NK cells`);
|
await clickOn(`categorical-value-select-louvain-NK cells`);
|
||||||
await clickOn(`cellset-button-2`);
|
await clickOn(`cellset-button-2`);
|
||||||
|
|
||||||
// check our assumption that we begin with 11
|
|
||||||
const _sets = await getAllByClass("geneset-expand");
|
|
||||||
expect(_sets).toHaveLength(11);
|
|
||||||
|
|
||||||
// run diffexp
|
// run diffexp
|
||||||
await clickOn(`diffexp-button`);
|
await clickOn(`diffexp-button`);
|
||||||
|
await waitByClass("pop-1-geneset-expand");
|
||||||
|
await expect(page).toClick(getTestClass("pop-1-geneset-expand"));
|
||||||
|
const popOne = await waitByClass("histogram-gene-set-summary");
|
||||||
|
const popOneParent = popOne.getProperty("parentNode");
|
||||||
|
|
||||||
// save
|
await popOneParent.waitForFunction(
|
||||||
await waitByClass("autosave-complete");
|
(selector) => !document.querySelector(selector),
|
||||||
|
{},
|
||||||
|
getTestClass("gene-loading-spinner")
|
||||||
|
);
|
||||||
|
|
||||||
// grab all the gene sets, check if the two new ones are there
|
expect(popOneParent).toMatchSnapshot();
|
||||||
const sets = await getAllByClass("geneset-expand");
|
|
||||||
expect(sets).toHaveLength(13);
|
await expect(page).toClick(getTestClass("pop-1-geneset-expand"));
|
||||||
|
await expect(page).toClick(getTestClass("pop-2-geneset-expand"));
|
||||||
|
|
||||||
|
const popTwo = await waitByClass("histogram-gene-set-summary");
|
||||||
|
const popTwoParent = popTwo.getProperty("parentNode");
|
||||||
|
|
||||||
|
await popTwoParent.waitForFunction(
|
||||||
|
(selector) => !document.querySelector(selector),
|
||||||
|
{},
|
||||||
|
getTestClass("gene-loading-spinner")
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(popTwoParent).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
test("create a new geneset", async () => {
|
test("create a new geneset", async () => {
|
||||||
if (config.withSubset) return;
|
if (config.withSubset) return;
|
||||||
|
|||||||
@@ -366,6 +366,10 @@ class HistogramBrush extends React.PureComponent {
|
|||||||
const fieldForId = field.replace(/\s/g, "_");
|
const fieldForId = field.replace(/\s/g, "_");
|
||||||
const showScatterPlot = isUserDefined;
|
const showScatterPlot = isUserDefined;
|
||||||
|
|
||||||
|
let testClass = "histogram-continuous-metadata";
|
||||||
|
if (isUserDefined) testClass = "histogram-user-gene";
|
||||||
|
else if (isGeneSetSummary) testClass = "histogram-gene-set-summary";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Async
|
<Async
|
||||||
watchFn={HistogramBrush.watchAsync}
|
watchFn={HistogramBrush.watchAsync}
|
||||||
@@ -386,11 +390,7 @@ class HistogramBrush extends React.PureComponent {
|
|||||||
<div
|
<div
|
||||||
id={`histogram_${fieldForId}`}
|
id={`histogram_${fieldForId}`}
|
||||||
data-testid={`histogram-${field}`}
|
data-testid={`histogram-${field}`}
|
||||||
data-testclass={
|
data-testclass={testClass}
|
||||||
isUserDefined
|
|
||||||
? "histogram-user-gene"
|
|
||||||
: "histogram-continuous-metadata"
|
|
||||||
}
|
|
||||||
style={{
|
style={{
|
||||||
padding: mini ? 0 : globals.leftSidebarSectionPadding,
|
padding: mini ? 0 : globals.leftSidebarSectionPadding,
|
||||||
backgroundColor: zebra ? globals.lightestGrey : "white",
|
backgroundColor: zebra ? globals.lightestGrey : "white",
|
||||||
|
|||||||
Reference in New Issue
Block a user