From ce03fc75f14c44f244687cae0702efe2dcd1e1c5 Mon Sep 17 00:00:00 2001
From: Xavier Verges <460418+xverges@users.noreply.github.com>
Date: Fri, 30 Apr 2021 06:31:58 +0200
Subject: [PATCH 1/4] Prevent unit test from calling the real API
---
.../components/data-exploration/heatmap/HeatmapPlot.test.jsx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/__test__/components/data-exploration/heatmap/HeatmapPlot.test.jsx b/src/__test__/components/data-exploration/heatmap/HeatmapPlot.test.jsx
index 498797d2a3..54164c2f49 100644
--- a/src/__test__/components/data-exploration/heatmap/HeatmapPlot.test.jsx
+++ b/src/__test__/components/data-exploration/heatmap/HeatmapPlot.test.jsx
@@ -4,8 +4,8 @@ import { Provider } from 'react-redux';
import Adapter from 'enzyme-adapter-react-16';
import thunk from 'redux-thunk';
import configureMockStore from 'redux-mock-store';
-import { Empty, Skeleton } from 'antd';
-import waitForComponentToPaint from '../../../../utils/tests/waitForComponentToPaint';
+import { enableFetchMocks } from 'jest-fetch-mock';
+import { Empty } from 'antd';
// eslint-disable-next-line import/no-named-as-default
import HeatmapPlot from '../../../../components/data-exploration/heatmap/HeatmapPlot';
import VegaHeatmap from '../../../../components/data-exploration/heatmap/VegaHeatmap';
@@ -15,6 +15,7 @@ import { CELL_SETS_LOADING } from '../../../../redux/actionTypes/cellSets';
jest.mock('localforage');
jest.mock('../../../../components/data-exploration/heatmap/VegaHeatmap');
VegaHeatmap.mockImplementation(() =>
+
{allSteps.map((step, index) => {
let color = colors.completed;
if (index === currentStep) {
From 41b117e9288ce69aa9a9e8cf8502f89a95f46fba Mon Sep 17 00:00:00 2001
From: Xavier Verges <460418+xverges@users.noreply.github.com>
Date: Fri, 30 Apr 2021 10:37:29 +0200
Subject: [PATCH 3/4] useEffect was ignoring required updates
---
.../experiments/[experimentId]/data-processing/index.jsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/pages/experiments/[experimentId]/data-processing/index.jsx b/src/pages/experiments/[experimentId]/data-processing/index.jsx
index cf2c544c39..38c36bd190 100644
--- a/src/pages/experiments/[experimentId]/data-processing/index.jsx
+++ b/src/pages/experiments/[experimentId]/data-processing/index.jsx
@@ -119,7 +119,7 @@ const DataProcessingPage = ({ experimentId, experimentData, route }) => {
)
}
- }, [samples.meta.loading])
+ }, [samples.meta.loading, samples.ids])
useEffect(() => {
if (
@@ -134,7 +134,7 @@ const DataProcessingPage = ({ experimentId, experimentData, route }) => {
})
}
- }, [preFilteredSamples, processingConfig.meta])
+ }, [stepIdx, preFilteredSamples, processingConfig.meta])
useEffect(() => {
if (sampleKeys && sampleKeys.length === 1) {
@@ -340,6 +340,7 @@ const DataProcessingPage = ({ experimentId, experimentData, route }) => {
// Called when the pipeline is triggered to be run by the user.
const onPipelineRun = (stepKey) => {
+ console.log('=======' + stepKey);
setChangesOutstanding(false);
dispatch((runPipeline(experimentId, stepKey)))
}
@@ -469,6 +470,7 @@ const DataProcessingPage = ({ experimentId, experimentData, route }) => {
{steps[stepIdx].multiSample && (