plugins: rtl 13 fixes for tests

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-13 13:11:15 +02:00
parent 0935b0d60f
commit 80a79cc1e7
27 changed files with 371 additions and 403 deletions
@@ -15,7 +15,7 @@
*/
import React from 'react';
import { render, act, waitFor } from '@testing-library/react';
import { render, waitFor } from '@testing-library/react';
import { Features } from './Features';
import { mockCalverProject } from '../test-helpers/test-helpers';
@@ -49,9 +49,7 @@ describe('Features', () => {
/>,
);
await act(async () => {
await waitFor(() => getByTestId(TEST_IDS.info.info));
});
await waitFor(() => getByTestId(TEST_IDS.info.info));
expect(getByTestId(TEST_IDS.info.info)).toMatchInlineSnapshot(`
<div
@@ -74,7 +74,7 @@ describe('useResponseSteps', () => {
"icon": "failure",
"message": <b>
Something went wrong
<WithStyles(ForwardRef(Typography))
aria-label="fire"
component="span"
@@ -108,7 +108,7 @@ describe('useResponseSteps', () => {
"icon": "failure",
"message": <b>
Something went wrong
<WithStyles(ForwardRef(Typography))
aria-label="fire"
component="span"