diff --git a/src/components/Header/HeaderTests/ToolbarToggle.test.js b/src/components/Header/HeaderTests/ToolbarToggle.test.js
index 02c6a71ce..c2e47d903 100644
--- a/src/components/Header/HeaderTests/ToolbarToggle.test.js
+++ b/src/components/Header/HeaderTests/ToolbarToggle.test.js
@@ -29,39 +29,39 @@ describe('ToolbarToggle', () => {
clickSpy.mockReset();
});
- it('should render correctly', () => {
+ it('should render correctly', async () => {
const { container } = render();
const toggleButton = container.querySelector('#foo');
expect(toggleButton).toBeTruthy();
- act(() => {
+ await act(async () => {
fireEvent.click(toggleButton);
});
expect(container.querySelector('div')).toMatchSnapshot();
});
- it('should open/close menu correctly', () => {
+ it('should open/close menu correctly', async () => {
const { container } = render();
const toggleButton = container.querySelector('#foo');
expect(toggleButton).toBeTruthy();
- act(() => {
+ await act(async () => {
fireEvent.click(toggleButton);
});
expect(container.querySelectorAll('.pf-v5-c-menu__list-item')).toHaveLength(2);
- act(() => {
+ await act(async () => {
fireEvent.click(toggleButton);
});
expect(container.querySelectorAll('.pf-v5-c-menu__list-item')).toHaveLength(0);
});
- it('should call onClick menu item callback', () => {
+ it('should call onClick menu item callback', async () => {
const { container } = render();
const toggleButton = container.querySelector('#foo');
- act(() => {
+ await act(async () => {
fireEvent.click(toggleButton);
});
const actionButton = container.querySelector('button.pf-v5-c-menu__item');
expect(actionButton).toBeTruthy();
- act(() => {
+ await act(async () => {
fireEvent.click(actionButton);
});
expect(clickSpy).toHaveBeenCalled();
diff --git a/src/components/Header/HeaderTests/__snapshots__/ToolbarToggle.test.js.snap b/src/components/Header/HeaderTests/__snapshots__/ToolbarToggle.test.js.snap
index 268169d50..ec837b4cb 100644
--- a/src/components/Header/HeaderTests/__snapshots__/ToolbarToggle.test.js.snap
+++ b/src/components/Header/HeaderTests/__snapshots__/ToolbarToggle.test.js.snap
@@ -6,7 +6,10 @@ exports[`ToolbarToggle should render correctly 1`] = `
data-ouia-component-id="OUIA-Generated-Dropdown-1"
data-ouia-component-type="PF5/Dropdown"
data-ouia-safe="true"
- style="position: absolute; left: 0px; top: 0px; z-index: 9999; min-width: 0px;"
+ data-popper-escaped="true"
+ data-popper-placement="bottom-end"
+ data-popper-reference-hidden="true"
+ style="position: absolute; left: 0px; top: 0px; z-index: 9999; min-width: 0px; transform: translate(0px, 0px);"
>