Skip to content

Commit

Permalink
test added
Browse files Browse the repository at this point in the history
Signed-off-by: stefanbabukov <[email protected]>
  • Loading branch information
StefanBabukov committed Nov 28, 2023
1 parent a4b7c03 commit 7c814c4
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { initialPlotConfigStates } from 'redux/reducers/componentConfig/initialS
import { generateDataProcessingPlotUuid } from 'utils/generateCustomPlotUuid';
import CellSizeDistribution from 'components/data-processing/CellSizeDistribution/CellSizeDistribution';
import CalculationConfig from 'components/data-processing/CellSizeDistribution/CalculationConfig';
import SliderWithInput from 'components/SliderWithInput';
import generateExperimentSettingsMock from '../../../test-utils/experimentSettings.mock';

import filterStatisticsMock from '../../../test-utils/plotData.mock';
Expand Down Expand Up @@ -147,4 +148,31 @@ describe('CellSizeDistribution', () => {
expect(plots.length).toEqual(3);
expect(tables.length).toEqual(1);
});
it('Disables bin step slider when plot type is knee plot', () => {
const modifiedWithData = {
...withData,
componentConfig: {
...withData.componentConfig,
plotType: 'kneePlot',
},
};

const store = mockStore(modifiedWithData);

const component = mount(
<Provider store={store}>
<CellSizeDistribution
experimentId={experimentId}
sampleId={sampleId}
sampleIds={sampleIds}
onConfigChange={() => { }}
/>
</Provider>,
);

const page = component.find(CellSizeDistribution).at(0);
const calculationConfig = page.find(CalculationConfig);
const sliderWithInput = calculationConfig.find(SliderWithInput);
expect(sliderWithInput.props().disabled).toBe(true);
});
});

0 comments on commit 7c814c4

Please sign in to comment.