diff --git a/conda/js/src/components/experiment/ExperimentEditor.jsx b/conda/js/src/components/experiment/ExperimentEditor.jsx index 78f3e502588f2e4468686f34b64f534d82757b90..d6c0a1d970e7fb159b0c0646a7b61e46c873bac0 100644 --- a/conda/js/src/components/experiment/ExperimentEditor.jsx +++ b/conda/js/src/components/experiment/ExperimentEditor.jsx @@ -1305,9 +1305,9 @@ export class ExperimentEditor extends React.Component<Props, State> { { this.state.disableTypeInference ? 'Enable' : 'Disable' } Type Inference </Button> </FormGroup> - { this.renderBlocks() } - { this.renderAnalyzers() } - { this.renderDatasets() } + { this.state.activeBlockInfo.set === 'blocks' && this.renderBlocks() } + { this.state.activeBlockInfo.set === 'analyzers' && this.renderAnalyzers() } + { this.state.activeBlockInfo.set === 'datasets' && this.renderDatasets() } { this.renderGlobals() } </Form> </div> diff --git a/conda/js/src/components/experiment/ExperimentEditor.spec.jsx b/conda/js/src/components/experiment/ExperimentEditor.spec.jsx index 71feeed1c40d5cedff0b0f4211b814eabb2da511..1c236bccf14c4e98b127bd2b5083c172af464b9e 100644 --- a/conda/js/src/components/experiment/ExperimentEditor.spec.jsx +++ b/conda/js/src/components/experiment/ExperimentEditor.spec.jsx @@ -98,6 +98,7 @@ describe('<ExperimentEditor />', () => { //console.log('finished name change, doing dataset'); + wrapper.find('svg #block_set').simulate('click'); wrapper.find('div.dataset0 select').simulate('change', { target: { value: 'protocol/set (simple/1)'}}); expect(updateFunc.callCount).to.equal(1); expect(wrapper.props().data.contents).to.have.deep.property('datasets', { @@ -237,6 +238,7 @@ describe('<ExperimentEditor />', () => { //console.log('doing dataset'); + wrapper.find('svg #block_training_data').simulate('click'); wrapper.find('div.datasets select').at(0).simulate('change', { target: { value: '{"testing_data":{"database":"iris/1","protocol":"Main","set":"training"},"training_data":{"database":"iris/1","protocol":"Main","set":"testing"}}'}}); expect(updateFunc.callCount).to.equal(1); expect(wrapper.props().data.contents).to.have.deep.property('datasets', {