diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index da9786805..42d8e6e0f 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -37,7 +37,7 @@ const SelectContent = React.forwardRef< { + const source = fs.readFileSync(SELECT_TSX, "utf8"); + + it("limits popper content to the available viewport height", () => { + expect(source).toContain("--radix-select-content-available-height"); + expect(source).toContain( + "max-h-[min(24rem,var(--radix-select-content-available-height))]", + ); + }); + + it("allows long option lists to scroll vertically", () => { + expect(source).toContain("overflow-y-auto"); + expect(source).toContain("overflow-x-hidden"); + }); +});