✨ (playwright.config.ts): decrease the number of workers from 3 to 2 to improve test performance
🐛 (chat_io.spec.ts): remove unnecessary wait and fix typo in test name 🐛 (codeAreaModalComponent.spec.ts): remove unnecessary click action 🐛 (curl_api_generation.spec.ts): fix the URL in page.goto() to include the protocol 🐛 (dropdownComponent.spec.ts): remove unnecessary click actions 🐛 (inputListComponent.spec.ts): remove duplicate click action 🐛 (python_api_generation.spec.ts): fix the test name in getByRole() function 🐛 (tweaks_test.spec.ts): fix the test name in getByRole() function
This commit is contained in:
parent
833b6a3265
commit
120c4687ee
8 changed files with 9 additions and 34 deletions
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
|||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: 3,
|
||||
workers: 2,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
timeout: 120 * 1000,
|
||||
// reporter: [
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@ test("chat_io_teste", async ({ page }) => {
|
|||
"utf-8"
|
||||
);
|
||||
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ test("CodeAreaModalComponent", async ({ page }) => {
|
|||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
|
||||
await page
|
||||
.getByTestId("toolsPythonFunctionTool")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("curl_api_generation", async ({ page, context }) => {
|
||||
await page.goto("/");
|
||||
await page.goto("http:localhost:3000/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
|
||||
await page.getByRole("heading", { name: "Data Ingestion" }).click();
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API", { exact: true }).click();
|
||||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
|
|
|
|||
|
|
@ -89,16 +89,6 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
|
|
@ -145,16 +135,6 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
|
|
@ -165,12 +145,6 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showstream"]').click();
|
||||
expect(await page.locator('//*[@id="showstream"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showstream"]').click();
|
||||
expect(await page.locator('//*[@id="showstream"]').isChecked()).toBeTruthy();
|
||||
|
||||
// showmodel_id
|
||||
await page.locator('//*[@id="showmodel_id"]').click();
|
||||
expect(await page.locator('//*[@id="showmodel_id"]').isChecked()).toBeFalsy();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ test("python_api_generation", async ({ page, context }) => {
|
|||
await page.goto("/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
|
||||
await page.getByRole("heading", { name: "Data Ingestion" }).click();
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API", { exact: true }).click();
|
||||
await page.getByRole("tab", { name: "Python API" }).click();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
await page.goto("/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
|
||||
await page.getByRole("heading", { name: "Data Ingestion" }).click();
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API", { exact: true }).click();
|
||||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue