mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Chore: Update snapshot test
This commit is contained in:
parent
9b735091b6
commit
83437a7625
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
@ -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"
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user