From f95d1aa5b42c3234fbaa56045b0d271b87c02996 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Mon, 8 Feb 2021 07:45:04 +0100 Subject: [PATCH] [test] Isolate Tooltip tests more --- packages/material-ui/src/Tooltip/Tooltip.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/material-ui/src/Tooltip/Tooltip.test.js b/packages/material-ui/src/Tooltip/Tooltip.test.js index 552e91e9d56b0d..e973140a0292d1 100644 --- a/packages/material-ui/src/Tooltip/Tooltip.test.js +++ b/packages/material-ui/src/Tooltip/Tooltip.test.js @@ -15,7 +15,6 @@ import { } from 'test/utils'; import { camelCase } from 'lodash/string'; import Tooltip, { testReset } from './Tooltip'; -import Input from '../Input'; async function raf() { return new Promise((resolve) => { @@ -459,11 +458,12 @@ describe('', () => { }); it('should handle autoFocus + onFocus forwarding', () => { + const handleFocus = spy(); const AutoFocus = (props) => (
{props.open ? ( - + ) : null}
@@ -477,6 +477,7 @@ describe('', () => { }); expect(getByRole('tooltip')).toBeVisible(); + expect(handleFocus.callCount).to.equal(1); }); });