Skip to content

Commit 133af66

Browse files
committed
test(web): await persisted diff base assertions
1 parent be5e194 commit 133af66

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/web/src/components/DiffPanel.browser.test.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ it.each([
206206
await expect.element(screen.getByText("No net changes in this selection.")).toBeVisible();
207207
await expect.element(screen.getByText(errorMessage, { exact: true })).not.toBeInTheDocument();
208208
const key = scopedThreadKey(context.threadRef);
209-
expect(useDiffPanelStore.getState().byThreadKey[key]).toEqual({ kind: "branch", baseRef });
210-
expect(useDiffPanelStore.getState().branchBaseRefByThreadKey[key]).toBe(baseRef);
209+
await vi.waitFor(() => {
210+
expect(useDiffPanelStore.getState().byThreadKey[key]).toEqual({ kind: "branch", baseRef });
211+
expect(useDiffPanelStore.getState().branchBaseRefByThreadKey[key]).toBe(baseRef);
212+
});
211213
},
212214
);

0 commit comments

Comments
 (0)