mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 13:17:34 +08:00
refactor: Improve page loading and element selection in DuckDuckGo integration test (#5128)
* fix: Improve page loading and element selection in DuckDuckGo integration test
This commit is contained in:
@ -25,7 +25,9 @@ test(
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
@ -33,7 +35,9 @@ test(
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("duck");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('//*[@id="toolsDuckDuckGo Search"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.locator('//*[@id="toolsDuckDuckGo Search"]')
|
||||
@ -61,9 +65,7 @@ test(
|
||||
"built successfully",
|
||||
) ?? false;
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
await page.getByTestId("output-inspection-data").first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
if (isBuiltSuccessfully) {
|
||||
await page.getByRole("gridcell").first().click();
|
||||
|
||||
Reference in New Issue
Block a user