Chore: Update snapshot test

This commit is contained in:
Gustav Hansen 2022-04-12 14:44:37 +02:00
parent 9b735091b6
commit 83437a7625
2 changed files with 8 additions and 16 deletions

View File

@ -1,5 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import { render, act } from '@testing-library/react';
import { IntlProvider } from 'react-intl';
import { ThemeProvider, lightTheme } from '@strapi/design-system';
@ -44,11 +44,15 @@ const ComponentFixture = props => (
);
const setup = props => {
return render(<ComponentFixture options={FIXTURE_OPTIONS} {...props} />);
return new Promise(resolve => {
return act(() => {
resolve(render(<ComponentFixture options={FIXTURE_OPTIONS} {...props} />));
});
});
};
describe('SelectTree', () => {
test('renders', () => {
expect(setup()).toMatchSnapshot();
test('renders', async () => {
expect(await setup()).toMatchSnapshot();
});
});

View File

@ -53,12 +53,6 @@ Object {
<div
class=" css-npt6n7-container"
>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class=" css-1sb7bue-control"
>
@ -146,12 +140,6 @@ Object {
<div
class=" css-npt6n7-container"
>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class=" css-1sb7bue-control"
>