tests: fix dropdown components test (#3504)

*  (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
This commit is contained in:
Cristhian Zanforlin Lousa 2024-08-22 11:10:31 -03:00 committed by GitHub
commit b5116e6f68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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