diff --git a/apps/web/src/components/os/overlays/onboarding/WhoAreYouStep.test.tsx b/apps/web/src/components/os/overlays/onboarding/WhoAreYouStep.test.tsx index 4eb1654..b6a757c 100644 --- a/apps/web/src/components/os/overlays/onboarding/WhoAreYouStep.test.tsx +++ b/apps/web/src/components/os/overlays/onboarding/WhoAreYouStep.test.tsx @@ -1,4 +1,4 @@ -import { cleanup, render, screen } from '@testing-library/react'; +import { cleanup, fireEvent, render, screen } from '@testing-library/react'; import { afterEach, describe, expect, it, vi } from 'vitest'; import WhoAreYouStep from './WhoAreYouStep'; import type { OnboardingProfileFields } from './types'; @@ -50,4 +50,27 @@ describe('WhoAreYouStep', () => { expect(chip).toHaveClass('border-[var(--line-affordance)]'); } }); + + it('stacks the Industry dropdown above the onboarding scrim', async () => { + // The wizard scrim (.onboarding-scrim in OnboardingWizard.tsx) is z-[9999]. + // The dropdown is portaled to
, so it must carry a higher z-index or + // it renders under the scrim while still receiving clicks. + const ONBOARDING_SCRIM_Z = 9999; + // jsdom has no scrollIntoView; Radix Select calls it on the focused option. + Element.prototype.scrollIntoView ??= vi.fn(); + render( +