diff --git a/src/frontend/tests/end-to-end/basicExamples.spec.ts b/src/frontend/tests/end-to-end/basicExamples.spec.ts index 84c98634e..30f97a559 100644 --- a/src/frontend/tests/end-to-end/basicExamples.spec.ts +++ b/src/frontend/tests/end-to-end/basicExamples.spec.ts @@ -42,7 +42,9 @@ test("Basic Prompting (Hello, World)", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + + await page.waitForTimeout(2000); await page.getByTestId("button_run_chat output").click(); await page.waitForSelector("text=built successfully", { timeout: 30000 }); @@ -125,7 +127,9 @@ test("Memory Chatbot", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + + await page.waitForTimeout(2000); await page.getByTestId("button_run_chat output").click(); await page.waitForSelector("text=built successfully", { timeout: 30000 }); @@ -218,8 +222,9 @@ test("Document QA", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); const fileChooserPromise = page.waitForEvent("filechooser"); await page.getByTestId("icon-FileSearch2").click(); const fileChooser = await fileChooserPromise; @@ -311,8 +316,9 @@ test("Blog Writer", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page .getByTestId("input-list-input_urls-0") .nth(0) diff --git a/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts b/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts index f90166f8c..5446881c3 100644 --- a/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts +++ b/src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts @@ -48,8 +48,9 @@ test("user must interact with chat with Input/Output", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByText("Playground", { exact: true }).click(); await page.waitForSelector('[data-testid="input-chat-playground"]', { @@ -167,8 +168,9 @@ test("user must be able to see output inspection", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByTestId("button_run_chat output").last().click(); await page.waitForTimeout(5000); @@ -229,8 +231,9 @@ test("user must be able to send an image on chat", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByText("Chat Input", { exact: true }).click(); await page.getByTestId("more-options-modal").click(); await page.getByTestId("edit-button-modal").click(); diff --git a/src/frontend/tests/end-to-end/generalBugs.spec.ts b/src/frontend/tests/end-to-end/generalBugs.spec.ts index b9b8bd9b0..082f09ef8 100644 --- a/src/frontend/tests/end-to-end/generalBugs.spec.ts +++ b/src/frontend/tests/end-to-end/generalBugs.spec.ts @@ -85,8 +85,9 @@ test("erase button should clear the chat messages", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByText("Playground", { exact: true }).click(); await page.waitForSelector('[data-testid="input-chat-playground"]', { diff --git a/src/frontend/tests/end-to-end/logs.spec.ts b/src/frontend/tests/end-to-end/logs.spec.ts index dc9e3aa62..f3f0a7c95 100644 --- a/src/frontend/tests/end-to-end/logs.spec.ts +++ b/src/frontend/tests/end-to-end/logs.spec.ts @@ -35,8 +35,9 @@ test("should able to see and interact with logs", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByTestId("button_run_chat output").first().click(); await page.waitForTimeout(2000); diff --git a/src/frontend/tests/end-to-end/textInputOutput.spec.ts b/src/frontend/tests/end-to-end/textInputOutput.spec.ts index 403799e80..199941164 100644 --- a/src/frontend/tests/end-to-end/textInputOutput.spec.ts +++ b/src/frontend/tests/end-to-end/textInputOutput.spec.ts @@ -166,8 +166,9 @@ test("TextInputOutputComponent", async ({ page }) => { .fill(process.env.OPENAI_API_KEY ?? ""); await page.getByTestId("dropdown-model_name").click(); - await page.getByText("gpt-4o", { exact: true }).click(); + await page.getByTestId("gpt-4o-0-option").click(); + await page.waitForTimeout(2000); await page.getByText("Playground", { exact: true }).click(); await page.getByText("Run Flow", { exact: true }).click();