import { describe, it, expect } from "vitest"; import { renderWithProviders, screen } from "@/test/render"; import { SourceStockItemCombobox } from "./source-stock-item-combobox"; describe("SourceStockItemCombobox", () => { it("renders the search input once a source site is set", async () => { await renderWithProviders( {}} />, { waitForButton: false }, ); expect( await screen.findByPlaceholderText("Search items in stock at source..."), ).toBeInTheDocument(); }); it("prompts to pick a source first when no source site is set", async () => { await renderWithProviders( {}} />, { waitForButton: false }, ); expect(await screen.findByPlaceholderText("Select a source first")).toBeInTheDocument(); }); });