Skip to content

Commit

Permalink
Refactor: refactor wait times and selectors in filterEdge-shard-1.spe…
Browse files Browse the repository at this point in the history
…c.ts (#5049)

* refactor: Update wait times and selectors in filterEdge-shard-1.spec.ts
  • Loading branch information
anovazzi1 authored Dec 5, 2024
1 parent 18c423b commit 8c73d5d
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/frontend/tests/extended/features/filterEdge-shard-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,36 @@ 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();
}
await page.waitForTimeout(1000);

await page.getByTestId(
"input-list-plus-btn-edit_metadata_indexing_include-2",
);

await page.getByTestId("blank-flow").click();

await page.waitForTimeout(1000);
await page.waitForSelector('[data-testid="sidebar-options-trigger"]', {
timeout: 3000,
});

await page.getByTestId("sidebar-options-trigger").click();
await page
.getByTestId("sidebar-legacy-switch")
.isVisible({ timeout: 5000 });

await expect(page.getByTestId("sidebar-legacy-switch")).toBeVisible({
timeout: 5000,
});
await page.getByTestId("sidebar-legacy-switch").click();
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
await page.getByTestId("sidebar-options-trigger").click();

await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("retrievalqa");

await page.waitForTimeout(1000);
await page.waitForSelector(
'[data-testid="langchain_utilitiesRetrieval QA"]',
{
timeout: 3000,
},
);
await page
.getByTestId("langchain_utilitiesRetrieval QA")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
Expand All @@ -59,7 +64,6 @@ test(
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page.waitForTimeout(500);

let visibleElementHandle;

Expand Down

0 comments on commit 8c73d5d

Please sign in to comment.