mirror of
https://github.com/prometheus/prometheus
synced 2025-01-13 10:22:46 +00:00
React UI: Fix tests harder (#6316)
* React UI: Fix tests harder Again not sure why this passed last time (?), but now I was getting an error about 'NaN' not being a valid value to assign to the 'height' property of the input element. This changes it so that only the blur() function is actually mocked out on the active input element. Signed-off-by: Julius Volz <julius.volz@gmail.com> * Fixup Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
20ec57160c
commit
22d884b38e
@ -178,7 +178,7 @@ describe('ExpressionInput', () => {
|
||||
const downshift = expressionInput.find(Downshift);
|
||||
const instance: any = expressionInput.instance();
|
||||
const spyBlur = jest.fn();
|
||||
instance.exprInputRef.current = { blur: spyBlur };
|
||||
instance.exprInputRef.current.blur = spyBlur;
|
||||
const input = downshift.find(Input);
|
||||
downshift.setState({ isOpen: false });
|
||||
const event = getKeyEvent('Escape');
|
||||
|
Loading…
Reference in New Issue
Block a user