Commit 31bb85fa authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh

dont let user change algorithm api version

parent 911a59d5
Pipeline #27559 passed with stages
in 13 minutes and 17 seconds
......@@ -581,14 +581,13 @@ export class AlgorithmEditor extends React.Component<Props, State> {
<Col sm={4}>
<Label>API Version</Label>
<Input
required
disabled
type='select'
className='custom-select'
name='apiversion'
id='apiversion'
placeholder='Algorithm API Version...'
value={this.props.data.contents.api_version}
onChange={(e) => this.changeContentsVal('api_version', e.target.value)}
>
<option value={1.0}>1.0</option>
<option value={2.0}>2.0</option>
......
......@@ -778,16 +778,13 @@ describe('<AlgorithmEditor />', () => {
);
wrapper.find('Input[type="select"]#schemaversion').prop('onChange')({ target: { value: 2.0 }});
wrapper.find('Input[type="select"]#apiversion').prop('onChange')({ target: { value: 1.0 }});
wrapper.find('Input[type="select"]#algtype').prop('onChange')({ target: { value: 'autonomous' }});
expect(wrapper.props().data.contents.schema_version).to.equal(2.0);
expect(wrapper.props().data.contents.api_version).to.equal(1.0);
expect(wrapper.props().data.contents.type).to.equal('autonomous');
expect(wrapper.props().data.contents).to.deep.equal({
...aTestAlg.contents,
schema_version: 2.0,
api_version: 1.0,
type: 'autonomous',
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment