From eb7ed7234b650391e9d15ebaac48cb461b14cbd1 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Thu, 4 Jul 2024 15:54:01 -0300 Subject: [PATCH] test: fix test after changes on LLMs components (#2538) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✅ (tests): remove redundant test assertions in filterEdge-shard-0.spec.ts ✅ (tests): add new test assertions and remove redundant ones in filterEdge-shard-1.spec.ts * ✅ (filterSidebar.spec.ts): add test for visibility of helpersID Generator ♻️ (filterSidebar.spec.ts): remove redundant visibility test for textsplittersCharacterTextSplitter --------- Co-authored-by: Gabriel Luiz Freitas Almeida --- src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts | 6 ------ src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts | 9 +++++---- src/frontend/tests/end-to-end/filterSidebar.spec.ts | 5 ++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts b/src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts index 4be381f97f40..9aef2bccb2e6 100644 --- a/src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts +++ b/src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts @@ -55,9 +55,6 @@ test("LLMChain - Tooltip", async ({ page }) => { await expect( page.getByTestId("available-output-chains").first(), ).toBeVisible(); - await expect( - page.getByTestId("available-output-textsplitters").first(), - ).toBeVisible(); await expect( page.getByTestId("available-output-retrievers").first(), ).toBeVisible(); @@ -73,9 +70,6 @@ test("LLMChain - Tooltip", async ({ page }) => { await expect( page.getByTestId("available-output-toolkits").first(), ).toBeVisible(); - await expect( - page.getByTestId("available-output-chains").first(), - ).toBeVisible(); await expect( page.getByTestId("available-output-agents").first(), ).toBeVisible(); diff --git a/src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts b/src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts index 2d5f906f9c24..af72e5d78a9a 100644 --- a/src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts +++ b/src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts @@ -69,10 +69,13 @@ test("LLMChain - Filter", async ({ page }) => { await expect(page.getByTestId("disclosure-memories")).toBeVisible(); await expect(page.getByTestId("disclosure-prototypes")).toBeVisible(); await expect(page.getByTestId("disclosure-retrievers")).toBeVisible(); - await expect(page.getByTestId("disclosure-text splitters")).toBeVisible(); await expect(page.getByTestId("disclosure-toolkits")).toBeVisible(); await expect(page.getByTestId("disclosure-tools")).toBeVisible(); + await expect(page.getByTestId("helpersID Generator").first()).toBeVisible(); + + await expect(page.getByTestId("agentsCSVAgent").first()).toBeVisible(); + await expect(page.getByTestId("chainsLLMChain").first()).toBeVisible(); await expect( page.getByTestId("langchain_utilitiesSearchApi").first(), @@ -86,9 +89,7 @@ test("LLMChain - Filter", async ({ page }) => { await expect( page.getByTestId("retrieversAmazon Kendra Retriever").first(), ).toBeVisible(); - await expect( - page.getByTestId("textsplittersCharacterTextSplitter").first(), - ).toBeVisible(); + await expect( page.getByTestId("toolkitsVectorStoreInfo").first(), ).toBeVisible(); diff --git a/src/frontend/tests/end-to-end/filterSidebar.spec.ts b/src/frontend/tests/end-to-end/filterSidebar.spec.ts index b8190db86629..c8c3b1df18a0 100644 --- a/src/frontend/tests/end-to-end/filterSidebar.spec.ts +++ b/src/frontend/tests/end-to-end/filterSidebar.spec.ts @@ -50,6 +50,7 @@ test("LLMChain - Filter", async ({ page }) => { ) .click(); + await expect(page.getByTestId("helpersID Generator")).toBeVisible(); await expect(page.getByTestId("disclosure-agents")).toBeVisible(); await expect(page.getByTestId("chainsLLMChain").first()).toBeVisible(); @@ -65,9 +66,7 @@ test("LLMChain - Filter", async ({ page }) => { await expect( page.getByTestId("retrieversAmazon Kendra Retriever").first(), ).toBeVisible(); - await expect( - page.getByTestId("textsplittersCharacterTextSplitter").first(), - ).toBeVisible(); + await expect( page.getByTestId("toolkitsVectorStoreInfo").first(), ).toBeVisible();