From f9cea56a98cb26bfcbb17f932acf131a6d905d67 Mon Sep 17 00:00:00 2001 From: RheeseyB <1044774+Rheeseyb@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:04:17 +0100 Subject: [PATCH] fix(tests) Try to fix race condition in tests by awaiting dispatch follow up actions --- .../navigator/left-pane/settings-pane.spec.browser2.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/src/components/navigator/left-pane/settings-pane.spec.browser2.tsx b/editor/src/components/navigator/left-pane/settings-pane.spec.browser2.tsx index b76adcba9ef4..ff48ed3d9619 100644 --- a/editor/src/components/navigator/left-pane/settings-pane.spec.browser2.tsx +++ b/editor/src/components/navigator/left-pane/settings-pane.spec.browser2.tsx @@ -55,6 +55,7 @@ describe('Settings Pane', () => { it('Project name is editable if the user can edit project', async () => { const renderResult = await renderRemixProject(project) await renderResult.dispatch([updateProjectServerState({ isMyProject: 'yes' })], true) + await renderResult.getDispatchFollowUpActionsFinished() const settingsTabButton = await renderResult.renderedDOM.findByText('Settings') @@ -71,6 +72,7 @@ describe('Settings Pane', () => { it('Project name is not editable if the user can not edit project', async () => { const renderResult = await renderRemixProject(project) await renderResult.dispatch([updateProjectServerState({ isMyProject: 'no' })], true) + await renderResult.getDispatchFollowUpActionsFinished() const settingsTabButton = await renderResult.renderedDOM.findByText('Settings')