Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(ok): wait for the conflict footer height var before asserting it (#4193)

Nick Gomez194b1d10080b
diff --git a/packages/app/src/components/DiffViewBoundary.dom.test.tsx b/packages/app/src/components/DiffViewBoundary.dom.test.tsx
index 9f20c3380..b3f1934b2 100644
--- a/packages/app/src/components/DiffViewBoundary.dom.test.tsx
+++ b/packages/app/src/components/DiffViewBoundary.dom.test.tsx
@@ -408,7 +408,11 @@ describe('DiffViewBoundary (Tier-3 mount)', () => {
const { unmount } = render(<DiffViewBoundary docName="foo" provider={makeProvider('x\n')} />);
await screen.findByRole('button', { name: /keep file deleted/i });
- expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe('0px');
+ await waitFor(() => {
+ expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe(
+ '0px',
+ );
+ });
unmount();
expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe('');
@@ -419,7 +423,11 @@ describe('DiffViewBoundary (Tier-3 mount)', () => {
const { unmount } = render(<DiffViewBoundary docName="foo" provider={makeProvider('x\n')} />);
await screen.findByRole('button', { name: /accept their deletion/i });
- expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe('0px');
+ await waitFor(() => {
+ expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe(
+ '0px',
+ );
+ });
unmount();
expect(document.documentElement.style.getPropertyValue('--conflict-footer-height')).toBe('');