mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 19:04:38 +00:00
Chore: Update snapshot test
This commit is contained in:
parent
9b735091b6
commit
83437a7625
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render } from '@testing-library/react';
|
import { render, act } from '@testing-library/react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
|
|
||||||
import { ThemeProvider, lightTheme } from '@strapi/design-system';
|
import { ThemeProvider, lightTheme } from '@strapi/design-system';
|
||||||
@ -44,11 +44,15 @@ const ComponentFixture = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
const setup = 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', () => {
|
describe('SelectTree', () => {
|
||||||
test('renders', () => {
|
test('renders', async () => {
|
||||||
expect(setup()).toMatchSnapshot();
|
expect(await setup()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -53,12 +53,6 @@ Object {
|
|||||||
<div
|
<div
|
||||||
class=" css-npt6n7-container"
|
class=" css-npt6n7-container"
|
||||||
>
|
>
|
||||||
<span
|
|
||||||
aria-atomic="false"
|
|
||||||
aria-live="polite"
|
|
||||||
aria-relevant="additions text"
|
|
||||||
class="css-1f43avz-a11yText-A11yText"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class=" css-1sb7bue-control"
|
class=" css-1sb7bue-control"
|
||||||
>
|
>
|
||||||
@ -146,12 +140,6 @@ Object {
|
|||||||
<div
|
<div
|
||||||
class=" css-npt6n7-container"
|
class=" css-npt6n7-container"
|
||||||
>
|
>
|
||||||
<span
|
|
||||||
aria-atomic="false"
|
|
||||||
aria-live="polite"
|
|
||||||
aria-relevant="additions text"
|
|
||||||
class="css-1f43avz-a11yText-A11yText"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class=" css-1sb7bue-control"
|
class=" css-1sb7bue-control"
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user