Skip to content

Commit

Permalink
refactor: time and use waitForSelector in filterSidebar.spec.ts (#4609)
Browse files Browse the repository at this point in the history
* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts

* refactor: Improve time and use waitForSelector in filterSidebar.spec.ts
  • Loading branch information
anovazzi1 authored Nov 19, 2024
1 parent 4965971 commit e6cd335
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/frontend/tests/core/features/filterSidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'));
Expand All @@ -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);
Expand Down

0 comments on commit e6cd335

Please sign in to comment.