test(shop): cover mobile catalog search refresh
Deploy Canina / deploy (push) Successful in 2m13s

This commit is contained in:
devops committed 2026-10-16 20:51:18 +00:00
1 parent 6dbee69601
commit 8ef98cb415
1 file changed
+13
@@ -204,6 +204,19 @@ describe("ArchivePage Component", () => {
});
});
it("refreshes products from the mobile catalog search control", async () => {
render(<ArchivePage initialProducts={mockProducts as any} />);
const mobileSearch = screen.getByTestId("shop-search-input-mobile");
fireEvent.change(mobileSearch, { target: { value: "گلوکوزامین" } });
await waitFor(() => {
expect(productService.getProducts).toHaveBeenCalledWith(
expect.objectContaining({ query: "گلوکوزامین" })
);
});
});
it("filters products by search query input", async () => {
render(<ArchivePage />);