tests: Reduce Timeout on Tests for Basic Examples Modal (#3429)

* reducing timeout on tests basic examples modal

* reducing timeout on tests basic examples modal

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2024-08-19 17:11:33 -03:00 • committed by GitHub
commit feb3c18ef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 72 additions and 70 deletions

View file

@ -27,7 +27,7 @@ test("Basic Prompting (Hello, World)", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -27,7 +27,7 @@ test("Blog Writer", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -32,7 +32,7 @@ test("Complex Agent", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -27,7 +27,7 @@ test("Document QA", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -32,7 +32,7 @@ test("Hierarchical Tasks Agent", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -27,7 +27,7 @@ test("Memory Chatbot", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -32,7 +32,7 @@ test("Sequential Tasks Agent", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -32,7 +32,7 @@ test("Vector Store RAG", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -16,7 +16,7 @@ test("select and delete all", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();
@ -52,7 +52,7 @@ test("select and delete a flow", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();
@ -87,7 +87,7 @@ test("search flows", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();
@ -137,7 +137,7 @@ test("search components", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();

View file

@ -29,7 +29,7 @@ test("user must be able to send an image on chat", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -28,7 +28,7 @@ test("should create a flow with decision", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -18,7 +18,7 @@ test("user must see on handle hover a tooltip with possibility connections", asy
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -18,7 +18,7 @@ test("user must see on handle click the possibility connections - LLMChain", asy
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.waitForTimeout(1000);

View file

@ -17,7 +17,7 @@ test("CRUD folders", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();
@ -68,7 +68,9 @@ test("CRUD folders", async ({ page }) => {
test("add folder by drag and drop", async ({ page }) => {
await page.goto("/");
await page.waitForTimeout(5000); // Consider using a more reliable waiting mechanism
await page.waitForSelector("text=my collection", {
timeout: 50000,
});
const jsonContent = readFileSync(
"tests/end-to-end/assets/collection.json",
@ -119,7 +121,7 @@ test("change flow folder", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByRole("heading", { name: "Basic Prompting" }).click();

View file

@ -27,7 +27,7 @@ test("user must be able to freeze a path", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -18,7 +18,7 @@ test("user must be able to freeze a component", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -24,7 +24,7 @@ test("should be able to move flow from folder, rename it and be displayed on cor
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -21,7 +21,7 @@ test("should be able to see output preview from grouped components", async ({
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}

View file

@ -28,7 +28,7 @@ test("memory should work as expect", async ({ page }) => {
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
@ -103,7 +103,7 @@ test("memory should work as expect", async ({ page }) => {
User: {user_input}
AI:
AI:
`;
await page

View file

@ -18,7 +18,7 @@ test("user must be able to save or delete a global variable", async ({
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
await page.waitForTimeout(3000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.waitForSelector('[data-testid="blank-flow"]', {

Some files were not shown because too many files have changed in this diff Show more