Skip to content

Commit

Permalink
fix(tests) Try to fix race condition in tests by awaiting dispatch fo…
Browse files Browse the repository at this point in the history
…llow up actions
  • Loading branch information
Rheeseyb committed Oct 18, 2024
1 parent b27dfa8 commit f9cea56
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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')

Expand Down

0 comments on commit f9cea56

Please sign in to comment.