From fbedeefb7700f5a4ba3931a2251fa7810ce89c81 Mon Sep 17 00:00:00 2001 From: "Sebastian L.H" <66498000+sebaslh01@users.noreply.github.com> Date: Mon, 2 May 2022 18:49:50 +0200 Subject: [PATCH] I forgot to delete the duplicated lines that cause quality fail. Now it's fixed --- .../products/tests/MainProducts.test.tsx | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/webapp/src/components/products/tests/MainProducts.test.tsx b/webapp/src/components/products/tests/MainProducts.test.tsx index 79fbfc4..2ef2b12 100644 --- a/webapp/src/components/products/tests/MainProducts.test.tsx +++ b/webapp/src/components/products/tests/MainProducts.test.tsx @@ -138,26 +138,7 @@ test("When listing products, use filter by color works as expected", async () => //we cannot expect to see the content changed to yellow cars as we're mocking the API call.. expect(getByColor).toHaveBeenCalledWith("&color[eq]=yellow"); - fireEvent.click(screen.getByTestId("orange")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=orange"); - fireEvent.click(screen.getByTestId("red")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=red"); - - fireEvent.click(screen.getByTestId("gray")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=gray"); - - fireEvent.click(screen.getByTestId("green")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=green"); - - fireEvent.click(screen.getByTestId("blue")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=blue"); - - fireEvent.click(screen.getByTestId("white")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=white"); - - fireEvent.click(screen.getByTestId("black")); - expect(getByColor).toHaveBeenCalledWith("&color[eq]=black"); }); test("When listing products, use filter by color gray works", async () => { //We need to mock this function as the ProductCard calls it in order to render the img of each product.