Merge remote-tracking branch 'origin/dev' into feature/output_dropdown
This commit is contained in:
commit
bd4f4c8724
318 changed files with 14679 additions and 9306 deletions
124
src/frontend/tests/end-to-end/actionsMainPage.spec.ts
Normal file
124
src/frontend/tests/end-to-end/actionsMainPage.spec.ts
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("select and delete all", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
|
||||
await page.getByText("Select All").click();
|
||||
await page.getByText("Unselect All").isVisible();
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page.getByText("Delete").last().click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Selected items deleted successfully").isVisible();
|
||||
});
|
||||
|
||||
test("search flows", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
|
||||
await page.getByText("Select All").isVisible();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.getByRole("heading", { name: "Memory Chatbot" }).click();
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.getByRole("heading", { name: "Document QA" }).click();
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
await page.getByPlaceholder("Search flows").fill("Memory Chatbot");
|
||||
await page.getByText("Memory Chatbot", { exact: true }).isVisible();
|
||||
await page.getByText("Document QA", { exact: true }).isHidden();
|
||||
await page.getByText("Basic Prompting", { exact: true }).isHidden();
|
||||
});
|
||||
|
||||
test("search components", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.getByText("Chat Input").first().click();
|
||||
await page.getByTestId("icon-SaveAll").first().click();
|
||||
await page.keyboard.press("Escape");
|
||||
await page
|
||||
.getByText("Prompt", {
|
||||
exact: true,
|
||||
})
|
||||
.first()
|
||||
.click();
|
||||
await page.getByTestId("icon-SaveAll").first().click();
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByText("OpenAI", {
|
||||
exact: true,
|
||||
})
|
||||
.first()
|
||||
.click();
|
||||
await page.getByTestId("icon-SaveAll").first().click();
|
||||
await page.keyboard.press("Escape");
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
|
||||
await page
|
||||
.getByText("Components", {
|
||||
exact: true,
|
||||
})
|
||||
.click();
|
||||
|
||||
await page.getByPlaceholder("Search components").fill("Chat Input");
|
||||
await page.getByText("Chat Input", { exact: true }).isVisible();
|
||||
await page.getByText("Prompt", { exact: true }).isHidden();
|
||||
await page.getByText("OpenAI", { exact: true }).isHidden();
|
||||
});
|
||||
|
|
@ -3,24 +3,24 @@ import { test } from "@playwright/test";
|
|||
test.describe("Auto_login tests", () => {
|
||||
test("auto_login sign in", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
});
|
||||
|
||||
test("auto_login block_admin", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/login");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/admin");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/admin/login");
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,95 +1,10 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test("user must interact with chat with Input/Output", async ({ page }) => {
|
||||
if (!process.env.CI) {
|
||||
dotenv.config();
|
||||
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||||
}
|
||||
|
||||
await page.goto("/");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
if (!process.env.OPENAI_API_KEY) {
|
||||
//You must set the OPENAI_API_KEY on .env file to run this test
|
||||
expect(false).toBe(true);
|
||||
}
|
||||
|
||||
await page
|
||||
.getByTestId("input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByPlaceholder("Send a message...").fill("Hello, how are you?");
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
let valueUser = await page.getByTestId("sender_name_user").textContent();
|
||||
let valueAI = await page.getByTestId("sender_name_ai").textContent();
|
||||
|
||||
expect(valueUser).toBe("User");
|
||||
expect(valueAI).toBe("AI");
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByTestId("textarea-input_value")
|
||||
.nth(1)
|
||||
.fill(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
);
|
||||
await page.getByTestId("input-sender_name").nth(1).fill("TestSenderNameUser");
|
||||
await page.getByTestId("input-sender_name").nth(0).fill("TestSenderNameAI");
|
||||
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
|
||||
valueUser = await page
|
||||
.getByTestId("sender_name_testsendernameuser")
|
||||
.textContent();
|
||||
valueAI = await page
|
||||
.getByTestId("sender_name_testsendernameai")
|
||||
.textContent();
|
||||
|
||||
expect(valueUser).toBe("TestSenderNameUser");
|
||||
expect(valueAI).toBe("TestSenderNameAI");
|
||||
|
||||
expect(
|
||||
await page
|
||||
.getByText(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
{ exact: true },
|
||||
)
|
||||
.isVisible(),
|
||||
);
|
||||
});
|
||||
|
||||
test("chat_io_teste", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.locator("span").filter({ hasText: "My Collection" }).isVisible();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
|
|
@ -102,7 +17,7 @@ test("chat_io_teste", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
|
|||
92
src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts
Normal file
92
src/frontend/tests/end-to-end/chatInputOutputUser.spec.ts
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("user must interact with chat with Input/Output", async ({ page }) => {
|
||||
if (!process.env.CI) {
|
||||
dotenv.config();
|
||||
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||||
}
|
||||
|
||||
await page.goto("/");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
if (!process.env.OPENAI_API_KEY) {
|
||||
//You must set the OPENAI_API_KEY on .env file to run this test
|
||||
expect(false).toBe(true);
|
||||
}
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByPlaceholder("Send a message...").fill("Hello, how are you?");
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
let valueUser = await page.getByTestId("sender_name_user").textContent();
|
||||
let valueAI = await page.getByTestId("sender_name_ai").textContent();
|
||||
|
||||
expect(valueUser).toBe("User");
|
||||
expect(valueAI).toBe("AI");
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByTestId("textarea-input_value")
|
||||
.nth(1)
|
||||
.fill(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
);
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-sender_name")
|
||||
.nth(1)
|
||||
.fill("TestSenderNameUser");
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-sender_name")
|
||||
.nth(0)
|
||||
.fill("TestSenderNameAI");
|
||||
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
|
||||
valueUser = await page
|
||||
.getByTestId("sender_name_testsendernameuser")
|
||||
.textContent();
|
||||
valueAI = await page
|
||||
.getByTestId("sender_name_testsendernameai")
|
||||
.textContent();
|
||||
|
||||
expect(valueUser).toBe("TestSenderNameUser");
|
||||
expect(valueAI).toBe("TestSenderNameAI");
|
||||
|
||||
expect(
|
||||
await page
|
||||
.getByText(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
{ exact: true },
|
||||
)
|
||||
.isVisible(),
|
||||
);
|
||||
});
|
||||
|
|
@ -15,7 +15,7 @@ test("CodeAreaModalComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
await page.getByRole("button", { name: "Copy Code" }).click();
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText()
|
||||
navigator.clipboard.readText(),
|
||||
);
|
||||
const clipboardContent = await handle.jsonValue();
|
||||
expect(clipboardContent.length).toBeGreaterThan(0);
|
||||
|
|
|
|||
|
|
@ -4,19 +4,23 @@ test("shoud delete a flow", async ({ page }) => {
|
|||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
||||
await page.getByText("API Key", { exact: true }).click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key", { exact: true })
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByText("Save").last().click();
|
||||
await page.waitForTimeout(8000);
|
||||
|
||||
await page.getByTestId("install-Website Content QA").click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.getByText("My Collection").nth(0).click();
|
||||
await page.getByText("Website Content QA").first().isVisible();
|
||||
await page.getByLabel("checkbox-component").first().click();
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page
|
||||
.getByTestId("card-website-content-qa")
|
||||
.first()
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("icon-Trash2").first().click();
|
||||
await page.waitForTimeout(2000);
|
||||
});
|
||||
await page.getByText("Confirm deletion of component?").isVisible();
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
|
|
@ -31,15 +35,11 @@ test("shoud delete a component", async ({ page }) => {
|
|||
await page.getByText("My Collection").nth(0).click();
|
||||
await page.getByText("Components").first().click();
|
||||
await page.getByText("Basic RAG").first().isVisible();
|
||||
await page.getByLabel("checkbox-component").first().click();
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page
|
||||
.getByTestId("card-basic-rag")
|
||||
.first()
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("icon-Trash2").first().click();
|
||||
await page.waitForTimeout(2000);
|
||||
});
|
||||
await page.getByText("Confirm deletion of component?").isVisible();
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ test.describe("drag and drop test", () => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -50,9 +50,6 @@ test.describe("drag and drop test", () => {
|
|||
},
|
||||
);
|
||||
|
||||
await page.getByText("Getting Started").first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
const genericNoda = page.getByTestId("div-generic-node");
|
||||
const elementCount = await genericNoda?.count();
|
||||
if (elementCount > 0) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -78,32 +78,32 @@ test("dropDownComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showendpoint_url"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showendpoint_url"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showmodel_id
|
||||
|
|
@ -113,7 +113,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
// showmodel_id
|
||||
await page.locator('//*[@id="showmodel_id"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_id"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_id"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showcache"]').click();
|
||||
|
|
@ -124,32 +124,32 @@ test("dropDownComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showendpoint_url"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showendpoint_url"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked()
|
||||
await page.locator('//*[@id="showendpoint_url"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showregion_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked()
|
||||
await page.locator('//*[@id="showregion_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showmodel_id
|
||||
|
|
@ -159,7 +159,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
// showmodel_id
|
||||
await page.locator('//*[@id="showmodel_id"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_id"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_id"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("dropdown-edit-model_id").click();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -72,7 +72,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[3]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("LLMChain - Tooltip", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ test("LLMChain - Tooltip", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[3]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
|
|
@ -60,17 +60,17 @@ test("LLMChain - Tooltip", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[4]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[4]/div/button/div/div',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("tooltip-Model Specs").first()
|
||||
page.getByTestId("tooltip-Model Specs").first(),
|
||||
).toBeVisible();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await expect(
|
||||
page.getByTestId("tooltip-Model Specs").first()
|
||||
page.getByTestId("tooltip-Model Specs").first(),
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByTestId("icon-Search").click();
|
||||
|
|
@ -81,12 +81,12 @@ test("LLMChain - Tooltip", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[5]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div/div/div[2]/div/div/div[2]/div[5]/div/button/div/div',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("empty-tooltip-filter").first()
|
||||
page.getByTestId("empty-tooltip-filter").first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
@ -106,14 +106,14 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2"
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
|
@ -136,7 +136,7 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[4]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[4]/div/button/div/div',
|
||||
)
|
||||
.click();
|
||||
|
||||
|
|
@ -150,14 +150,14 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
await expect(page.getByTestId("model_specsChatVertexAI")).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsCohere")).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsGoogle Generative AI")
|
||||
page.getByTestId("model_specsGoogle Generative AI"),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsHugging Face Inference API")
|
||||
page.getByTestId("model_specsHugging Face Inference API"),
|
||||
).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsOllama")).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsQianfanChatEndpoint")
|
||||
page.getByTestId("model_specsQianfanChatEndpoint"),
|
||||
).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsQianfanLLMEndpoint")).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsVertexAI")).toBeVisible();
|
||||
|
|
@ -169,7 +169,7 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
await expect(page.getByTestId("model_specsAmazon Bedrock")).not.toBeVisible();
|
||||
await expect(page.getByTestId("modelsAzure OpenAI")).not.toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsAzureChatOpenAI")
|
||||
page.getByTestId("model_specsAzureChatOpenAI"),
|
||||
).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatAnthropic")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatLiteLLM")).not.toBeVisible();
|
||||
|
|
@ -180,13 +180,13 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div',
|
||||
)
|
||||
.click();
|
||||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div/div',
|
||||
)
|
||||
.click();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
|
|
@ -82,22 +82,22 @@ test("FloatComponent", async ({ page }) => {
|
|||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat_tau").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_tau"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat_tau"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat_tau").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_tau"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat_tau"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmodel").click();
|
||||
|
|
@ -120,22 +120,22 @@ test("FloatComponent", async ({ page }) => {
|
|||
|
||||
await page.getByTestId("shownum_thread").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked()
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("shownum_thread").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked()
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showrepeat_last_n").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked()
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showrepeat_last_n").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked()
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
@ -151,7 +151,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
// showtemperature
|
||||
await page.locator('//*[@id="showtemperature"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ test.describe("Flow Page tests", () => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("flowSettings", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ test("flowSettings", async ({ page }) => {
|
|||
await page
|
||||
.getByPlaceholder("Flow name")
|
||||
.fill(
|
||||
"Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test"
|
||||
"Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test",
|
||||
);
|
||||
|
||||
await page.getByText("Character limit reached").isVisible();
|
||||
|
|
@ -41,7 +41,7 @@ test("flowSettings", async ({ page }) => {
|
|||
await page
|
||||
.getByPlaceholder("Flow description")
|
||||
.fill(
|
||||
"Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test"
|
||||
"Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test",
|
||||
);
|
||||
|
||||
await page.getByText("Save").last().click();
|
||||
|
|
|
|||
152
src/frontend/tests/end-to-end/folders.spec.ts
Normal file
152
src/frontend/tests/end-to-end/folders.spec.ts
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
import { test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test("CRUD folders", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
|
||||
await page.getByText("My Collection").nth(2).isVisible();
|
||||
await page.getByPlaceholder("Search flows").isVisible();
|
||||
await page.getByText("Flows").isVisible();
|
||||
await page.getByText("Components").isVisible();
|
||||
await page.getByText("All").first().isVisible();
|
||||
await page.getByText("Select All").isVisible();
|
||||
|
||||
await page.getByText("New Folder", { exact: true }).last().click();
|
||||
await page.getByPlaceholder("Insert a name for the folder").fill("test");
|
||||
await page
|
||||
.getByPlaceholder("Insert a description for the folder")
|
||||
.fill("test");
|
||||
await page.getByText("Save Folder").click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Folder created succefully").isVisible();
|
||||
await page.getByText("test").last().isVisible();
|
||||
await page
|
||||
.getByText("test")
|
||||
.last()
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("icon-pencil").last().click();
|
||||
});
|
||||
|
||||
await page.getByPlaceholder("Insert a name for the folder").fill("test edit");
|
||||
await page
|
||||
.getByPlaceholder("Insert a description for the folder")
|
||||
.fill("test edit");
|
||||
await page.getByText("Edit Folder").last().click();
|
||||
await page.getByText("test edit").last().isVisible();
|
||||
|
||||
await page
|
||||
.getByText("test edit")
|
||||
.last()
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("icon-trash").last().click();
|
||||
});
|
||||
|
||||
await page.getByText("Delete").last().click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Folder deleted succefully").isVisible();
|
||||
});
|
||||
|
||||
test("add folder by drag and drop", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/collection.json",
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
// Create the DataTransfer and File
|
||||
const dataTransfer = await page.evaluateHandle((data) => {
|
||||
const dt = new DataTransfer();
|
||||
// Convert the buffer to a hex array
|
||||
const file = new File([data], "flowtest.json", {
|
||||
type: "application/json",
|
||||
});
|
||||
dt.items.add(file);
|
||||
return dt;
|
||||
}, jsonContent);
|
||||
|
||||
// Now dispatch
|
||||
await page.dispatchEvent(
|
||||
'//*[@id="root"]/div/div[1]/div[2]/div[3]/aside/nav/div/div[2]',
|
||||
"drop",
|
||||
{
|
||||
dataTransfer,
|
||||
},
|
||||
);
|
||||
|
||||
await page.getByText("Getting Started").first().isVisible();
|
||||
});
|
||||
|
||||
test("change flow folder", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.getByTestId("icon-ChevronLeft").first().click();
|
||||
|
||||
await page.getByText("My Collection").nth(2).isVisible();
|
||||
await page.getByPlaceholder("Search flows").isVisible();
|
||||
await page.getByText("Flows").isVisible();
|
||||
await page.getByText("Components").isVisible();
|
||||
await page.getByText("All").first().isVisible();
|
||||
await page.getByText("Select All").isVisible();
|
||||
|
||||
await page.getByText("New Folder", { exact: true }).last().click();
|
||||
await page.getByPlaceholder("Insert a name for the folder").fill("test");
|
||||
await page
|
||||
.getByPlaceholder("Insert a description for the folder")
|
||||
.fill("test");
|
||||
|
||||
await page.getByText("Save Folder").click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Folder created succefully").isVisible();
|
||||
await page.getByText("test").last().isVisible();
|
||||
|
||||
await page.getByText("My Projects").last().click();
|
||||
await page.getByText("Basic Prompting").first().hover();
|
||||
await page.mouse.down();
|
||||
await page.getByText("test").first().hover();
|
||||
await page.mouse.up();
|
||||
await page.getByText("Basic Prompting").first().isVisible();
|
||||
});
|
||||
|
|
@ -15,7 +15,7 @@ test("GlobalVariables", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ test("GlobalVariables", async ({ page }) => {
|
|||
const genericName = Math.random().toString();
|
||||
const credentialName = Math.random().toString();
|
||||
|
||||
await page.getByTestId("icon-Globe").nth(1).click();
|
||||
await page.getByTestId("icon-Globe").nth(0).click();
|
||||
await page.getByText("Add New Variable", { exact: true }).click();
|
||||
await page
|
||||
.getByPlaceholder("Insert a name for the variable...")
|
||||
|
|
@ -69,6 +69,9 @@ test("GlobalVariables", async ({ page }) => {
|
|||
await page.getByText("Save Variable", { exact: true }).click();
|
||||
expect(page.getByText(credentialName, { exact: true })).not.toBeNull();
|
||||
await page.getByText(credentialName, { exact: true }).isVisible();
|
||||
await page.getByText("Save Variable", { exact: true }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page
|
||||
.getByText(credentialName, { exact: true })
|
||||
.hover()
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ test.describe("group node test", () => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +30,10 @@ test.describe("group node test", () => {
|
|||
|
||||
await page.getByRole("button", { name: "Group" }).click();
|
||||
await page.getByTestId("title-Group").dblclick();
|
||||
await page.getByTestId("input-title-Group").first().fill("test");
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-title-Group")
|
||||
.first()
|
||||
.fill("test");
|
||||
await page.getByTestId("icon-Ungroup").first().click();
|
||||
await page.keyboard.press("Control+g");
|
||||
await page.getByTestId("title-OpenAI").isVisible();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("InputComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -38,12 +38,14 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTestId("input-collection_name").click();
|
||||
await page.getByTestId("popover-anchor-input-collection_name").click();
|
||||
await page
|
||||
.getByTestId("input-collection_name")
|
||||
.getByTestId("popover-anchor-input-collection_name")
|
||||
.fill("collection_name_test_123123123!@#$&*(&%$@");
|
||||
|
||||
let value = await page.getByTestId("input-collection_name").inputValue();
|
||||
let value = await page
|
||||
.getByTestId("popover-anchor-input-collection_name")
|
||||
.inputValue();
|
||||
|
||||
if (value != "collection_name_test_123123123!@#$&*(&%$@") {
|
||||
expect(false).toBeTruthy();
|
||||
|
|
@ -58,82 +60,82 @@ test("InputComponent", async ({ page }) => {
|
|||
expect(
|
||||
await page
|
||||
.locator('//*[@id="showchroma_server_cors_allow_origins"]')
|
||||
.isChecked()
|
||||
.isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_host"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_host"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_host"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showcollection_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcollection_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcollection_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showindex_directory"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_directory"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_directory"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_cors_allow_origins"]').click();
|
||||
expect(
|
||||
await page
|
||||
.locator('//*[@id="showchroma_server_cors_allow_origins"]')
|
||||
.isChecked()
|
||||
.isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_grpc_port"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_host"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_host"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_host"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked()
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showindex_directory"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_directory"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_directory"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
let valueEditNode = await page
|
||||
.getByTestId("input-collection_name-edit")
|
||||
.getByTestId("popover-anchor-input-collection_name-edit")
|
||||
.inputValue();
|
||||
|
||||
if (valueEditNode != "collection_name_test_123123123!@#$&*(&%$@") {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.getByTestId("input-collection_name-edit").click();
|
||||
await page.getByTestId("popover-anchor-input-collection_name-edit").click();
|
||||
await page
|
||||
.getByTestId("input-collection_name-edit")
|
||||
.getByTestId("popover-anchor-input-collection_name-edit")
|
||||
.fill("NEW_collection_name_test_123123123!@#$&*(&%$@ÇÇÇÀõe");
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
@ -150,12 +152,14 @@ test("InputComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showcollection_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcollection_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcollection_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
||||
let value = await page.getByTestId("input-collection_name").inputValue();
|
||||
let value = await page
|
||||
.getByTestId("popover-anchor-input-collection_name")
|
||||
.inputValue();
|
||||
|
||||
if (value != "NEW_collection_name_test_123123123!@#$&*(&%$@ÇÇÇÀõe") {
|
||||
expect(false).toBeTruthy();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByTestId("vectorsearchAstra DB Search")
|
||||
.getByTestId("vectorstoresAstra DB")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
|
@ -41,19 +41,19 @@ test("InputListComponent", async ({ page }) => {
|
|||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.getByTestId("showmetadata_indexing_exclude").click();
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.getByTestId("showmetadata_indexing_include").click();
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page
|
||||
|
|
@ -93,7 +93,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
.click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId(
|
||||
"input-list-plus-btn_metadata_indexing_include-1"
|
||||
"input-list-plus-btn_metadata_indexing_include-1",
|
||||
);
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
||||
|
|
@ -164,12 +164,12 @@ test("InputListComponent", async ({ page }) => {
|
|||
.click();
|
||||
|
||||
const plusButtonLocatorEdit0 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-0"
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-0",
|
||||
);
|
||||
const elementCountEdit0 = await plusButtonLocatorEdit0?.count();
|
||||
|
||||
const plusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2"
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
const elementCountEdit2 = await plusButtonLocatorEdit2?.count();
|
||||
|
||||
|
|
@ -178,13 +178,13 @@ test("InputListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
const minusButtonLocatorEdit1 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-1"
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-1",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit1 = await minusButtonLocatorEdit1?.count();
|
||||
|
||||
const minusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-2"
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit2 = await minusButtonLocatorEdit2?.count();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("IntComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -81,77 +81,77 @@ test("IntComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_base"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_key"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showtemperature"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_base"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_key"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showtemperature"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmodel_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked()
|
||||
await page.locator('//*[@id="showmodel_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_base"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_base"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showopenai_api_key"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showtemperature"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
@ -166,7 +166,7 @@ test("IntComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showtimeout"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtimeout"]').isChecked()
|
||||
await page.locator('//*[@id="showtimeout"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
const valueEditNode = await page
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeFalsy();
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked()
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
await page.locator('//*[@id="showcache"]').click();
|
||||
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeTruthy();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]'
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]',
|
||||
)
|
||||
.click();
|
||||
await page.keyboard.press("Backspace");
|
||||
|
|
@ -84,7 +84,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]'
|
||||
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div/div[1]',
|
||||
)
|
||||
.click();
|
||||
await page.keyboard.press("Backspace");
|
||||
|
|
|
|||
60
src/frontend/tests/end-to-end/logs.spec.ts
Normal file
60
src/frontend/tests/end-to-end/logs.spec.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("should able to see and interact with logs", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("icon-ChevronDown").click();
|
||||
await page.getByText("Logs").click();
|
||||
await page.getByText("No Data Available", { exact: true }).isVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
await page.getByTestId("button_run_chat output").first().click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page
|
||||
.getByText("Chat Output built successfully", { exact: true })
|
||||
.isVisible();
|
||||
await page.getByTestId("icon-ChevronDown").click();
|
||||
await page.getByText("Logs").click();
|
||||
|
||||
await page.getByText("timestamp").isVisible();
|
||||
await page.getByText("flow_id").isVisible();
|
||||
await page.getByText("source").isVisible();
|
||||
await page.getByText("target", { exact: true }).isVisible();
|
||||
await page.getByText("target_args", { exact: true }).isVisible();
|
||||
await page.getByRole("gridcell").first().isVisible();
|
||||
|
||||
await page.getByText("Messages", { exact: true }).click();
|
||||
await page.getByText("timestamp").isVisible();
|
||||
await page.getByText("sender", { exact: true }).isVisible();
|
||||
await page.getByText("sender_name").isVisible();
|
||||
await page.getByText("session_id", { exact: true }).isVisible();
|
||||
await page.getByText("message", { exact: true }).isVisible();
|
||||
await page.getByText("artifacts", { exact: true }).isVisible();
|
||||
await page.getByRole("gridcell").first().isVisible();
|
||||
});
|
||||
|
|
@ -15,7 +15,7 @@ test("NestedComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpool_threads"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpool_threads"]').isChecked()
|
||||
await page.locator('//*[@id="showpool_threads"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
//showtext_key
|
||||
|
|
@ -53,182 +53,140 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked()
|
||||
await page.locator('//*[@id="showindex_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// shownamespace
|
||||
await page.locator('//*[@id="shownamespace"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked()
|
||||
await page.locator('//*[@id="shownamespace"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_api_key
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
//showpool_threads
|
||||
await page.locator('//*[@id="showpool_threads"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpool_threads"]').isChecked()
|
||||
await page.locator('//*[@id="showpool_threads"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
//showtext_key
|
||||
await page.locator('//*[@id="showtext_key"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showtext_key"]').isChecked()
|
||||
await page.locator('//*[@id="showtext_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showtemplate"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked()
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showprompt"]').click();
|
||||
|
|
@ -158,7 +158,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showtemplate"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked()
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showprompt"]').click();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ test("python_api_generation", async ({ page, context }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ test("python_api_generation", async ({ page, context }) => {
|
|||
await page.getByRole("tab", { name: "Python API" }).click();
|
||||
await page.getByRole("button", { name: "Copy Code" }).click();
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText()
|
||||
navigator.clipboard.readText(),
|
||||
);
|
||||
const clipboardContent = await handle.jsonValue();
|
||||
expect(clipboardContent.length).toBeGreaterThan(0);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ test.describe("save component tests", () => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ test.describe("save component tests", () => {
|
|||
// Read your file into a buffer.
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/flow_group_test.json",
|
||||
"utf-8"
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
// Create the DataTransfer and File
|
||||
|
|
@ -49,7 +49,7 @@ test.describe("save component tests", () => {
|
|||
"drop",
|
||||
{
|
||||
dataTransfer,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const genericNoda = page.getByTestId("div-generic-node");
|
||||
|
|
@ -61,9 +61,6 @@ test.describe("save component tests", () => {
|
|||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[3]')
|
||||
.click();
|
||||
|
||||
await page.getByTestId("title-PythonFunctionTool").click({
|
||||
modifiers: ["Control"],
|
||||
});
|
||||
await page.getByTestId("title-ChatOpenAI").click({
|
||||
modifiers: ["Control"],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ test("should add API-KEY", async ({ page }) => {
|
|||
await page.getByTestId("api-key-button-store").click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key")
|
||||
.fill("x1fOKU0v2e5zL5d-BZW6CxZBZvoyuFgF");
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByTestId("api-key-save-button-store").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
@ -165,7 +165,7 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key")
|
||||
.fill("x1fOKU0v2e5zL5d-BZW6CxZBZvoyuFgF");
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByTestId("api-key-save-button-store").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
@ -174,6 +174,8 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API Key Error").isHidden();
|
||||
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
const likedValue = await page
|
||||
.getByTestId("likes-Website Content QA")
|
||||
.innerText();
|
||||
|
|
@ -214,7 +216,7 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
await page.getByText("My Collection").click();
|
||||
await page.getByText("Website Content QA").first().isVisible();
|
||||
|
||||
await page.getByTestId("sidebar-nav-Components").click();
|
||||
await page.getByText("Components").first().click();
|
||||
await page.getByText("Basic RAG").first().isVisible();
|
||||
});
|
||||
|
||||
|
|
@ -233,7 +235,7 @@ test("should share component with share button", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -255,7 +257,7 @@ test("should share component with share button", async ({ page }) => {
|
|||
await page.getByText("Set workflow status to public").isVisible();
|
||||
await page
|
||||
.getByText(
|
||||
"Attention: API keys in specified fields are automatically removed upon sharing."
|
||||
"Attention: API keys in specified fields are automatically removed upon sharing.",
|
||||
)
|
||||
.isVisible();
|
||||
await page.getByText("Export").first().isVisible();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
|||
await page
|
||||
.getByTestId("textarea-text")
|
||||
.fill(
|
||||
"test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!"
|
||||
"test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!",
|
||||
);
|
||||
|
||||
await page.getByTestId("textarea-text-ExternalLink").click();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -68,7 +68,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[9]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[9]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[13]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[13]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -100,7 +100,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[3]/div/div[2]/div[3]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[3]/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
@ -112,10 +112,13 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
expect(false).toBe(true);
|
||||
}
|
||||
|
||||
await page.getByTestId("input-input_value").nth(0).fill("This is a test!");
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-input_value")
|
||||
.nth(0)
|
||||
.fill("This is a test!");
|
||||
|
||||
await page
|
||||
.getByTestId("input-openai_api_key")
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByText("Run Flow", { exact: true }).click();
|
||||
|
|
@ -135,7 +138,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByTestId("input-input_value")
|
||||
.getByTestId("popover-anchor-input-input_value")
|
||||
.nth(0)
|
||||
.fill("This is a test, again just to be sure!");
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showload_hidden"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked()
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
@ -81,12 +81,12 @@ test("ToggleComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showload_hidden"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked()
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showmax_concurrency"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmax_concurrency"]').isChecked()
|
||||
await page.locator('//*[@id="showmax_concurrency"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showpath"]').click();
|
||||
|
|
@ -94,22 +94,22 @@ test("ToggleComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showrecursive"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrecursive"]').isChecked()
|
||||
await page.locator('//*[@id="showrecursive"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showsilent_errors"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showsilent_errors"]').isChecked()
|
||||
await page.locator('//*[@id="showsilent_errors"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showuse_multithreading"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showuse_multithreading"]').isChecked()
|
||||
await page.locator('//*[@id="showuse_multithreading"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showmax_concurrency"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmax_concurrency"]').isChecked()
|
||||
await page.locator('//*[@id="showmax_concurrency"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showpath"]').click();
|
||||
|
|
@ -117,17 +117,17 @@ test("ToggleComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showrecursive"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrecursive"]').isChecked()
|
||||
await page.locator('//*[@id="showrecursive"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showsilent_errors"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showsilent_errors"]').isChecked()
|
||||
await page.locator('//*[@id="showsilent_errors"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showuse_multithreading"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showuse_multithreading"]').isChecked()
|
||||
await page.locator('//*[@id="showuse_multithreading"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
|
@ -144,38 +144,38 @@ test("ToggleComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showload_hidden"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked()
|
||||
await page.locator('//*[@id="showload_hidden"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("toggle-edit-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-edit-load_hidden").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
await page.getByTestId("toggle-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-load_hidden").isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
await page.getByTestId("toggle-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-load_hidden").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
await page.getByTestId("toggle-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-load_hidden").isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
await page.getByTestId("toggle-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-load_hidden").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
await page.getByTestId("toggle-load_hidden").isChecked()
|
||||
await page.getByTestId("toggle-load_hidden").isChecked(),
|
||||
).toBeFalsy();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ test("check if tweaks are updating when someothing on the flow changes", async (
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -98,14 +98,14 @@ test("check if tweaks are updating when someothing on the flow changes", async (
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTestId("input-collection_name").click();
|
||||
await page.getByTestId("popover-anchor-input-collection_name").click();
|
||||
await page
|
||||
.getByTestId("input-collection_name")
|
||||
.getByTestId("popover-anchor-input-collection_name")
|
||||
.fill("collection_name_test_123123123!@#$&*(&%$@");
|
||||
|
||||
await page.getByTestId("input-index_directory").click();
|
||||
await page.getByTestId("popover-anchor-input-index_directory").click();
|
||||
await page
|
||||
.getByTestId("input-index_directory")
|
||||
.getByTestId("popover-anchor-input-index_directory")
|
||||
.fill("index_directory_123123123!@#$&*(&%$@");
|
||||
|
||||
await page.getByText("API", { exact: true }).first().click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue