Fix: Bin size limit
limit bin size to 670, which craches on my computer beyong this And added test to confirm its workingpull/18247/head
parent
3bd249fdfc
commit
474a30e355
|
@ -129,6 +129,18 @@ describe('DataExplorer', () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should error when value is above "670" in bin size', () => {
|
||||||
|
cy.get('.view-options').within(() => {
|
||||||
|
cy.getByTestID('grid--column').within(() => {
|
||||||
|
cy.getByTestID('bin-size-input')
|
||||||
|
.clear()
|
||||||
|
.type('670')
|
||||||
|
.getByTestID('bin-size-input--error')
|
||||||
|
.should('have.length', 1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('numeric input validation when changing number of decimal places in Single Stat', () => {
|
describe('numeric input validation when changing number of decimal places in Single Stat', () => {
|
||||||
|
|
|
@ -97,7 +97,7 @@ const HeatmapOptions: FunctionComponent<Props> = props => {
|
||||||
const val = convertUserInputToNumOrNaN(e)
|
const val = convertUserInputToNumOrNaN(e)
|
||||||
setBinInput(val)
|
setBinInput(val)
|
||||||
|
|
||||||
if (isNaN(val) || val < 5) {
|
if (isNaN(val) || val < 5 || val > 670) {
|
||||||
setBinInputStatus(ComponentStatus.Error)
|
setBinInputStatus(ComponentStatus.Error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,7 @@ const HeatmapOptions: FunctionComponent<Props> = props => {
|
||||||
value={binInput}
|
value={binInput}
|
||||||
type={InputType.Number}
|
type={InputType.Number}
|
||||||
onChange={onSetBinSize}
|
onChange={onSetBinSize}
|
||||||
|
testID={'bin-size-input'}
|
||||||
/>
|
/>
|
||||||
</Form.Element>
|
</Form.Element>
|
||||||
<h5 className="view-options--header">X Axis</h5>
|
<h5 className="view-options--header">X Axis</h5>
|
||||||
|
|
Loading…
Reference in New Issue