From c910da313b3facb550013542f81720a0e33c93a4 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 17 Oct 2022 12:40:59 +0300 Subject: [PATCH 1/4] Components: Refactor withFocusReturn tests to RTL --- .../with-focus-return/test/index.js | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/components/src/higher-order/with-focus-return/test/index.js b/packages/components/src/higher-order/with-focus-return/test/index.js index 9b32ae72dd790..7aa266dfa53dc 100644 --- a/packages/components/src/higher-order/with-focus-return/test/index.js +++ b/packages/components/src/higher-order/with-focus-return/test/index.js @@ -1,8 +1,7 @@ /** * External dependencies */ -import renderer from 'react-test-renderer'; -import { render, fireEvent } from '@testing-library/react'; +import { render, fireEvent, screen } from '@testing-library/react'; /** * WordPress dependencies @@ -16,8 +15,13 @@ import withFocusReturn from '../'; class Test extends Component { render() { + const { className, focusHistory } = this.props; return ( -
+