mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Merged in bugfix/editor-unit-test (pull request #70)
fix(test): toolbar test log error * fix(test): toolbar test log error Approved-by: Paulo Veiga
This commit is contained in:
parent
9888d7542b
commit
6c41beb45e
@ -2,7 +2,7 @@
|
|||||||
* @jest-environment jsdom
|
* @jest-environment jsdom
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render, fireEvent, waitFor, screen, findByLabelText } from '@testing-library/react';
|
import { render, fireEvent, waitFor, screen, findByLabelText, act } from '@testing-library/react';
|
||||||
import ThreeDRotation from '@mui/icons-material/ThreeDRotation';
|
import ThreeDRotation from '@mui/icons-material/ThreeDRotation';
|
||||||
import Toolbar, {
|
import Toolbar, {
|
||||||
ToolbarButtonOption,
|
ToolbarButtonOption,
|
||||||
@ -313,10 +313,11 @@ describe('Toolbar', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('AppBar', () => {
|
describe('AppBar', () => {
|
||||||
it('When render it displays a menu', () => {
|
it('When render it displays a menu', async () => {
|
||||||
const capacity = new Capability('edition-owner', false);
|
const capacity = new Capability('edition-owner', false);
|
||||||
const model = new Editor(null);
|
const model = new Editor(null);
|
||||||
|
|
||||||
|
await act(async () =>
|
||||||
render(
|
render(
|
||||||
<IntlProvider locale="en">
|
<IntlProvider locale="en">
|
||||||
<AppBar
|
<AppBar
|
||||||
@ -324,8 +325,8 @@ describe('AppBar', () => {
|
|||||||
capability={capacity}
|
capability={capacity}
|
||||||
model={model}
|
model={model}
|
||||||
/>
|
/>
|
||||||
,
|
|
||||||
</IntlProvider>,
|
</IntlProvider>,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
screen.getByRole('menubar');
|
screen.getByRole('menubar');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user