test: Adds tests to the AnnotationLayer component (#13748)

This commit is contained in:
Michael S. Molina
2021-04-01 13:10:42 -03:00
committed by GitHub
parent 9156f089ff
commit bb677b8ef1
6 changed files with 209 additions and 35 deletions

View File

@@ -26,6 +26,7 @@ import ControlHeader from 'src/explore/components/ControlHeader';
type InputValueType = string | number;
export interface TextControlProps<T extends InputValueType = InputValueType> {
label?: string;
disabled?: boolean;
isFloat?: boolean;
isInt?: boolean;
@@ -109,7 +110,7 @@ export default class TextControl<
return (
<div>
<ControlHeader {...this.props} />
<FormGroup controlId={this.state.controlId} bsSize="medium">
<FormGroup controlId={this.state.controlId}>
<FormControl
type="text"
data-test="inline-name"
@@ -118,6 +119,7 @@ export default class TextControl<
onFocus={this.props.onFocus}
value={value}
disabled={this.props.disabled}
aria-label={this.props.label}
/>
</FormGroup>
</div>