This commit is contained in:
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 />);
|
||||
|
||||
|
||||
Reference in new issue
Block a user