diff --git a/src/components/ProjectSettings/tests/index.test.tsx b/src/components/ProjectSettings/tests/index.test.tsx index c4e9d3d23e..c3b9ad80f8 100644 --- a/src/components/ProjectSettings/tests/index.test.tsx +++ b/src/components/ProjectSettings/tests/index.test.tsx @@ -126,9 +126,7 @@ describe("ProjectSettings", () => { const tabs = Object.values(ProjectSettingsTab); expect(screen.queryAllByRole("tab")).toHaveLength(tabs.length); for (const tab of tabs) { - await act(async () => { - await agent.click(screen.getByTestId(tab)); - }); + await agent.click(screen.getByTestId(tab)); isPanelVisible(tab); } }); @@ -143,9 +141,7 @@ describe("ProjectSettings", () => { const tabs = whichTabs(perm, hasSchedule); expect(screen.queryAllByRole("tab")).toHaveLength(tabs.length); for (const tab of tabs) { - await act(async () => { - await agent.click(screen.getByTestId(tab)); - }); + await agent.click(screen.getByTestId(tab)); whichSettings(perm, hasSchedule, tab).forEach((s) => screen.getByTestId(s) ); @@ -164,9 +160,7 @@ describe("ProjectSettings", () => { const tabs = whichTabs(perm, hasSchedule); expect(screen.queryAllByRole("tab")).toHaveLength(tabs.length); for (const tab of tabs) { - await act(async () => { - await agent.click(screen.getByTestId(tab)); - }); + await agent.click(screen.getByTestId(tab)); whichSettings(perm, hasSchedule, tab).forEach((s) => screen.getByTestId(s) ); diff --git a/src/components/ProjectUsers/tests/SpeakerConsentListItemIcon.test.tsx b/src/components/ProjectUsers/tests/SpeakerConsentListItemIcon.test.tsx index 7295f5c166..64ab376633 100644 --- a/src/components/ProjectUsers/tests/SpeakerConsentListItemIcon.test.tsx +++ b/src/components/ProjectUsers/tests/SpeakerConsentListItemIcon.test.tsx @@ -81,9 +81,7 @@ describe("SpeakerConsentListItemIcon", () => { expect(screen.queryByTestId(ListItemIconId.RecordAudio)).toBeNull; expect(screen.queryByTestId(ListItemIconId.UploadAudio)).toBeNull; - await act(async () => { - await agent.click(screen.getByRole("button")); - }); + await agent.click(screen.getByRole("button")); expect(screen.queryByRole("menu")).not.toBeNull; expect(screen.queryByTestId(ListItemIconId.RecordAudio)).not.toBeNull; expect(screen.queryByTestId(ListItemIconId.UploadAudio)).not.toBeNull; @@ -121,9 +119,7 @@ describe("SpeakerConsentListItemIcon", () => { }); expect(screen.queryAllByRole("dialog")).toBeNull; - await act(async () => { - await agent.click(screen.getByRole("button")); - }); + await agent.click(screen.getByRole("button")); expect(screen.queryAllByRole("dialog")).not.toBeNull; }); }); diff --git a/src/components/SiteSettings/tests/index.test.tsx b/src/components/SiteSettings/tests/index.test.tsx index 5c1d01c263..42199d14d2 100644 --- a/src/components/SiteSettings/tests/index.test.tsx +++ b/src/components/SiteSettings/tests/index.test.tsx @@ -53,21 +53,15 @@ describe("SiteSettings", () => { await renderSiteSettings(); // Banners tab - await act(async () => { - await agent.click(screen.getByTestId(SiteSettingsTab.Banners)); - }); + await agent.click(screen.getByTestId(SiteSettingsTab.Banners)); isPanelVisible(SiteSettingsTab.Banners); // Projects tab - await act(async () => { - await agent.click(screen.getByTestId(SiteSettingsTab.Projects)); - }); + await agent.click(screen.getByTestId(SiteSettingsTab.Projects)); isPanelVisible(SiteSettingsTab.Projects); // Users tab - await act(async () => { - await agent.click(screen.getByTestId(SiteSettingsTab.Users)); - }); + await agent.click(screen.getByTestId(SiteSettingsTab.Users)); isPanelVisible(SiteSettingsTab.Users); }); });