Skip to content

Commit

Permalink
Use waitForAsyncTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Jun 12, 2024
1 parent c74352a commit 88dad26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mui-base/src/Popover/Title/PopoverTitle.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as React from 'react';
import * as Popover from '@base_ui/react/Popover';
import { act, createRenderer, screen } from '@mui/internal-test-utils';
import { createRenderer, screen } from '@mui/internal-test-utils';
import { expect } from 'chai';
import { describeConformance } from '../../../test/describeConformance';
import { waitForAsyncTasks } from '../../../test/conformanceTests/utils';

describe('<Popover.Title />', () => {
const { render } = createRenderer();
Expand Down Expand Up @@ -33,7 +34,7 @@ describe('<Popover.Title />', () => {
</Popover.Root>,
);

await act(async () => {});
await waitForAsyncTasks();

const id = document.querySelector('h2')?.id;
expect(screen.getByRole('dialog')).to.have.attribute('aria-labelledby', id);
Expand Down

0 comments on commit 88dad26

Please sign in to comment.