refactor: time and use waitForSelector in filterSidebar.spec.ts (#4609)

* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts

* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts
This commit is contained in:
anovazzi1 2024-11-18 22:08:26 -03:00 committed by GitHub
commit e6cd335b1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,18 +24,26 @@ test("user must see on handle click the possibility connections - LLMChain", asy
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();
}
await page.waitForTimeout(1000);
await page.waitForSelector('[data-testid="blank-flow"]', {
timeout: 3000,
});
await page.getByTestId("blank-flow").click();
await page.waitForTimeout(3000);
await page.waitForSelector('[data-testid="sidebar-search-input"]', {
timeout: 3000,
});
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("api request");
await page.waitForTimeout(1000);
await page.waitForSelector('[data-testid="dataAPI Request"]', {
timeout: 3000,
});
await page
.getByTestId("dataAPI Request")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
@ -45,8 +53,12 @@ test("user must see on handle click the possibility connections - LLMChain", asy
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(500);
await page.waitForSelector(
'[data-testid="handle-apirequest-shownode-urls-left"]',
{
timeout: 3000,
},
);
await page.getByTestId("handle-apirequest-shownode-urls-left").click();
await page.waitForTimeout(500);