From b5116e6f685ce15d87cb28333d10e10b62a2162b Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:10:31 -0300 Subject: [PATCH] tests: fix dropdown components test (#3504) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✅ (dropdownComponent.spec.ts): add missing test case for dropdownComponent to improve test coverage and ensure functionality 🔧 (dropdownComponent.spec.ts): update test case to include additional interactions with the page to simulate user behavior and improve test robustness * ✅ (dropdownComponent.spec.ts): update mouse wheel scroll distance to 800 to improve test reliability 📝 (dropdownComponent.spec.ts): add additional wait time to ensure stability in test execution * 🔧 (dropdownComponent.spec.ts): remove unnecessary code related to hovering and scrolling in the dropdown component test to improve test readability and maintainability --- .../tests/scheduled-end-to-end/dropdownComponent.spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/frontend/tests/scheduled-end-to-end/dropdownComponent.spec.ts b/src/frontend/tests/scheduled-end-to-end/dropdownComponent.spec.ts index f9b7a2f7c..765ac39cc 100644 --- a/src/frontend/tests/scheduled-end-to-end/dropdownComponent.spec.ts +++ b/src/frontend/tests/scheduled-end-to-end/dropdownComponent.spec.ts @@ -145,11 +145,8 @@ test("dropDownComponent", async ({ page }) => { expect(false).toBeTruthy(); } await page.getByTestId("code-button-modal").click(); - await page - .locator("#CodeEditor div") - .filter({ hasText: "import ChatBedrock" }) - .nth(1) - .click(); + await page.waitForTimeout(1000); + await page.locator("textarea").press("Control+a"); const emptyOptionsCode = `from langchain_community.chat_models.bedrock import BedrockChat