Merge remote-tracking branch 'origin/dev' into two_edges
This commit is contained in:
parent
3d82417068
commit
4c87f7662c
283 changed files with 11734 additions and 9297 deletions
|
|
@ -23,8 +23,8 @@ test("chat_io_teste", async ({ page }) => {
|
|||
}
|
||||
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/ChatTest.json",
|
||||
"utf-8",
|
||||
"src/frontend/tests/end-to-end/assets/ChatTest.json",
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
|
@ -47,7 +47,7 @@ test("chat_io_teste", async ({ page }) => {
|
|||
"drop",
|
||||
{
|
||||
dataTransfer,
|
||||
},
|
||||
}
|
||||
);
|
||||
await page.getByLabel("fit view").click();
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ test("user must interact with chat with Input/Output", async ({ page }) => {
|
|||
.fill(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
);
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
await page.getByText("Close", { exact: true }).click();
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-sender_name")
|
||||
.nth(1)
|
||||
|
|
@ -68,7 +71,7 @@ test("user must interact with chat with Input/Output", async ({ page }) => {
|
|||
.nth(0)
|
||||
.fill("TestSenderNameAI");
|
||||
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
|
||||
valueUser = await page
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ test("CodeAreaModalComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("python function");
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ test("should delete a flow", async ({ page }) => {
|
|||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByText("Save").last().click();
|
||||
await page.waitForTimeout(8000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
||||
await page.getByTestId("install-Website Content QA").click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ test.describe("drag and drop test", () => {
|
|||
await page.locator("span").filter({ hasText: "My Collection" }).isVisible();
|
||||
// Read your file into a buffer.
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/collection.json",
|
||||
"src/frontend/tests/end-to-end/assets/collection.json",
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
|
|
@ -62,6 +62,8 @@ test("dropDownComponent", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
|
|
@ -170,7 +172,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
value = await page.getByTestId("dropdown-model_id").innerText();
|
||||
if (value !== "ai21.j2-mid-v1") {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("LLMChain - Tooltip", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
|
|
@ -117,7 +117,7 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("llmchain");
|
||||
|
|
@ -148,7 +148,6 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
await expect(page.getByTestId("model_specsChatOllama")).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatOpenAI")).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatVertexAI")).toBeVisible();
|
||||
await expect(page.getByTestId("model_specsCohere")).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsGoogle Generative AI"),
|
||||
).toBeVisible();
|
||||
|
|
@ -176,7 +175,6 @@ test("LLMChain - Filter", async ({ page }) => {
|
|||
await expect(page.getByTestId("model_specsChatOllama")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatOpenAI")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatVertexAI")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsCohere")).not.toBeVisible();
|
||||
|
||||
await page
|
||||
.locator(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("ollama");
|
||||
|
|
@ -60,26 +60,20 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
await page.locator('//*[@id="showcache"]').click();
|
||||
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showcache"]').click();
|
||||
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showformat").click();
|
||||
expect(await page.locator('//*[@id="showformat"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showformat").click();
|
||||
expect(await page.locator('//*[@id="showformat"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(await page.locator('//*[@id="showmirostat"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(await page.locator('//*[@id="showmirostat"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
|
|
@ -138,7 +132,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.locator('//*[@id="float-input"]');
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
|
@ -154,7 +148,7 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
await page.locator('//*[@id="float-input"]').click();
|
||||
await page.locator('//*[@id="float-input"]').fill("3");
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test.describe("Flow Page tests", () => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("custom");
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@ test("flowSettings", async ({ page }) => {
|
|||
"Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test Flow Name Test 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();
|
||||
await page.getByTestId("save-flow-settings").click();
|
||||
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,33 +31,16 @@ test("CRUD folders", async ({ page }) => {
|
|||
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.getByTestId("add-folder-button").click();
|
||||
await page.getByText("New Folder").last().isVisible();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Folder created successfully").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("New Folder").last().dblclick();
|
||||
await page.getByTestId("input-folder").fill("new folder test name");
|
||||
await page.keyboard.press("Enter");
|
||||
await page.getByText("new folder test name").last().isVisible();
|
||||
|
||||
await page
|
||||
.getByText("test edit")
|
||||
.getByText("new folder test name")
|
||||
.last()
|
||||
.hover()
|
||||
.then(async () => {
|
||||
|
|
@ -74,7 +57,7 @@ test("add folder by drag and drop", async ({ page }) => {
|
|||
await page.waitForTimeout(2000);
|
||||
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/collection.json",
|
||||
"src/frontend/tests/end-to-end/assets/collection.json",
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
|
|
@ -131,17 +114,13 @@ test("change flow folder", async ({ page }) => {
|
|||
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.getByTestId("add-folder-button").click();
|
||||
await page.getByText("New Folder").last().isVisible();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Folder created successfully").isVisible();
|
||||
await page.getByText("test").last().isVisible();
|
||||
await page.getByText("New Folder").last().dblclick();
|
||||
await page.getByTestId("input-folder").fill("new folder test name");
|
||||
await page.keyboard.press("Enter");
|
||||
await page.getByText("new folder test name").last().isVisible();
|
||||
|
||||
await page.getByText("My Projects").last().click();
|
||||
await page.getByText("Basic Prompting").first().hover();
|
||||
|
|
|
|||
99
src/frontend/tests/end-to-end/generalBugs.spec.ts
Normal file
99
src/frontend/tests/end-to-end/generalBugs.spec.ts
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("should interact with api request", 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.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("api request");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page
|
||||
.getByTestId("dataAPI Request")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
});
|
||||
|
||||
test("erase button should clear the chat messages", 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.getByTestId("icon-Eraser").last().click();
|
||||
|
||||
await page.getByText("Hello, how are you?").isHidden();
|
||||
await page.getByText("AI", { exact: true }).last().isHidden();
|
||||
await page.getByText("User", { exact: true }).last().isHidden();
|
||||
await page.getByText("Start a conversation").isVisible();
|
||||
await page.getByText("Langflow Chat").isVisible();
|
||||
});
|
||||
|
|
@ -22,7 +22,7 @@ test("GlobalVariables", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("openai");
|
||||
|
|
@ -69,7 +69,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("Chroma");
|
||||
|
|
@ -73,9 +73,9 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showchroma_server_host"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_port"]').click();
|
||||
await page.locator('//*[@id="showchroma_server_http_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked(),
|
||||
await page.locator('//*[@id="showchroma_server_http_port"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click();
|
||||
|
|
@ -110,9 +110,9 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showchroma_server_host"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_port"]').click();
|
||||
await page.locator('//*[@id="showchroma_server_http_port"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showchroma_server_port"]').isChecked(),
|
||||
await page.locator('//*[@id="showchroma_server_http_port"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="showchroma_server_ssl_enabled"]').click();
|
||||
|
|
@ -138,7 +138,7 @@ test("InputComponent", async ({ page }) => {
|
|||
.getByTestId("popover-anchor-input-collection_name-edit")
|
||||
.fill("NEW_collection_name_test_123123123!@#$&*(&%$@ÇÇÇÀõe");
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId("input-collection_name");
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
|
@ -155,7 +155,7 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showcollection_name"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
let value = await page
|
||||
.getByTestId("popover-anchor-input-collection_name")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("astradb");
|
||||
|
|
@ -68,7 +68,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
.getByTestId("input-list-input-edit_metadata_indexing_include-1")
|
||||
.fill("test1 test1 test1 test1");
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page
|
||||
.getByTestId("input-list-input_metadata_indexing_include-0")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("IntComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("openai");
|
||||
|
|
@ -39,6 +39,12 @@ test("IntComponent", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
await page.getByTestId("showmax_tokens").click();
|
||||
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
await page.getByTestId("int-input-max_tokens").click();
|
||||
await page
|
||||
.getByTestId("int-input-max_tokens")
|
||||
|
|
@ -154,7 +160,7 @@ test("IntComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showtemperature"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId("int-input-max_tokens");
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
|
@ -177,7 +183,7 @@ test("IntComponent", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
await page.getByTestId("int-input-max_tokens").click();
|
||||
await page.getByTestId("int-input-max_tokens").fill("3");
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("amazon bedrock");
|
||||
|
|
@ -83,7 +83,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
expect(
|
||||
await page.locator('//*[@id="showcredentials_profile_name"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.locator('//*[@id="plusbtn0"]');
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
|
@ -108,7 +108,7 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
const elementKeyCount = await keyPairVerification?.count();
|
||||
|
||||
if (elementKeyCount === 1) {
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByTestId("div-generic-node").click();
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("ollama");
|
||||
|
|
@ -47,11 +47,11 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTestId("title-Ollama").click();
|
||||
await page.getByTestId("generic-node-title-arrangement").click();
|
||||
await page.keyboard.press(`${control}+Shift+A`);
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByTestId("title-Ollama").click();
|
||||
await page.getByTestId("generic-node-title-arrangement").click();
|
||||
await page.keyboard.press(`${control}+d`);
|
||||
|
||||
let numberOfNodes = await page.getByTestId("title-Ollama")?.count();
|
||||
|
|
@ -71,7 +71,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.getByTestId("title-Ollama").click();
|
||||
await page.getByTestId("generic-node-title-arrangement").click();
|
||||
await page.keyboard.press(`${control}+c`);
|
||||
|
||||
await page.getByTestId("title-Ollama").click();
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ test("should able to see and interact with logs", async ({ page }) => {
|
|||
await page.getByText("No Data Available", { exact: true }).isVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("NestedComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("pinecone");
|
||||
|
|
@ -189,5 +189,5 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showtext_key"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("prompt");
|
||||
|
|
@ -164,7 +164,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showprompt"]').click();
|
||||
expect(await page.locator('//*[@id="showprompt"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ test.describe("save component tests", () => {
|
|||
|
||||
// Read your file into a buffer.
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/flow_group_test.json",
|
||||
"src/frontend/tests/end-to-end/assets/flow_group_test.json",
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
|
|
@ -91,6 +91,8 @@ test.describe("save component tests", () => {
|
|||
if (replaceButton) {
|
||||
await page.getByTestId("replace-button").click();
|
||||
}
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("group");
|
||||
|
|
|
|||
|
|
@ -96,27 +96,29 @@ test("should filter by type", async ({ page }) => {
|
|||
await page.getByText("Website Content QA").isVisible();
|
||||
|
||||
await page.getByTestId("flows-button-store").click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(8000);
|
||||
|
||||
let iconGroup = await page.getByTestId("icon-Group")?.count();
|
||||
expect(iconGroup).not.toBe(0);
|
||||
|
||||
await page.getByText("icon-ToyBrick").isHidden();
|
||||
await page.getByText("icon-ToyBrick").last().isHidden();
|
||||
|
||||
await page.getByTestId("components-button-store").click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(8000);
|
||||
|
||||
await page.getByTestId("icon-Group").isHidden();
|
||||
await page.getByTestId("icon-Group").last().isHidden();
|
||||
let toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
|
||||
expect(toyBrick).not.toBe(0);
|
||||
|
||||
await page.getByTestId("all-button-store").click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForTimeout(8000);
|
||||
|
||||
iconGroup = await page.getByTestId("icon-Group")?.count();
|
||||
toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
|
||||
let iconGroupAllCount = await page.getByTestId("icon-Group")?.count();
|
||||
await page.waitForTimeout(2000);
|
||||
let toyBrickAllCount = await page.getByTestId("icon-ToyBrick")?.count();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
if (iconGroup === 0 || toyBrick === 0) {
|
||||
if (iconGroupAllCount === 0 || toyBrickAllCount === 0) {
|
||||
expect(false).toBe(true);
|
||||
}
|
||||
});
|
||||
|
|
@ -141,7 +143,6 @@ test("should add API-KEY", async ({ page }) => {
|
|||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API Key Error").isVisible();
|
||||
|
||||
await page.getByTestId("api-key-button-store").click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key")
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
|
|
@ -174,6 +175,9 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API Key Error").isHidden();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("button-store").click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
const likedValue = await page
|
||||
|
|
@ -250,6 +254,7 @@ test("should share component with share button", async ({ page }) => {
|
|||
.getByPlaceholder("Flow description")
|
||||
.inputValue();
|
||||
await page.getByText("Save").last().click();
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByTestId("icon-Share3").first().click();
|
||||
await page.getByText("Name:").isVisible();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("prompt");
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("text input");
|
||||
|
|
@ -132,11 +132,13 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
|
||||
await page.getByText("Outputs", { exact: true }).nth(1).click();
|
||||
await page.getByText("Text Output", { exact: true }).nth(2).click();
|
||||
let contentOutput = await page.getByPlaceholder("Empty").inputValue();
|
||||
let contentOutput = await page.getByPlaceholder("Enter text...").inputValue();
|
||||
expect(contentOutput).not.toBe(null);
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page.getByText("Close", { exact: true }).last().click();
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-input_value")
|
||||
.nth(0)
|
||||
|
|
@ -151,6 +153,6 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
|
||||
await page.getByText("Outputs", { exact: true }).nth(1).click();
|
||||
await page.getByText("Text Output", { exact: true }).nth(2).click();
|
||||
contentOutput = await page.getByPlaceholder("Empty").inputValue();
|
||||
contentOutput = await page.getByPlaceholder("Enter text...").inputValue();
|
||||
expect(contentOutput).not.toBe(null);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("directory");
|
||||
|
|
@ -48,7 +48,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showload_hidden"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showuse_multithreading"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId("toggle-load_hidden");
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
|
@ -151,7 +151,7 @@ test("ToggleComponent", async ({ page }) => {
|
|||
await page.getByTestId("toggle-edit-load_hidden").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByTestId("toggle-load_hidden").click();
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ test("check if tweaks are updating when someothing on the flow changes", async (
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("Chroma");
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ test("should see general profile gradient", async ({ page }) => {
|
|||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByTestId("user-profile-settings").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByText("Settings").click();
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByText("General").nth(2).isVisible();
|
||||
await page.getByText("Profile Gradient").isVisible();
|
||||
});
|
||||
|
|
@ -70,7 +74,11 @@ test("should see shortcuts", async ({ page }) => {
|
|||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByTestId("user-profile-settings").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByText("Settings").click();
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
await page.getByText("General").nth(2).isVisible();
|
||||
await page.getByText("Shortcuts").nth(0).click();
|
||||
await page.getByText("Shortcuts", { exact: true }).nth(1).isVisible();
|
||||
|
|
@ -87,5 +95,33 @@ test("should see shortcuts", async ({ page }) => {
|
|||
await page.getByText("Delete Component", { exact: true }).isVisible();
|
||||
await page.getByText("Open Playground", { exact: true }).isVisible();
|
||||
await page.getByText("Undo", { exact: true }).isVisible();
|
||||
await page.getByText("Redo", { exact: true }).isVisible();
|
||||
|
||||
await page.mouse.wheel(0, 10000);
|
||||
|
||||
await page.getByText("Redo", { exact: true }).last().isVisible();
|
||||
|
||||
await page.getByText("Reset Columns").last().isVisible();
|
||||
});
|
||||
|
||||
test("should interact with API Keys", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByTestId("user-profile-settings").click();
|
||||
await page.getByText("Settings").click();
|
||||
await page.getByText("API Keys").click();
|
||||
await page.getByText("API Keys", { exact: true }).nth(1).isVisible();
|
||||
await page.getByText("Add New").click();
|
||||
await page.getByPlaceholder("Insert a name for your API Key").isVisible();
|
||||
|
||||
const randomName = Math.random().toString(36).substring(2);
|
||||
|
||||
await page
|
||||
.getByPlaceholder("Insert a name for your API Key")
|
||||
.fill(randomName);
|
||||
await page.getByText("Create Secret Key", { exact: true }).click();
|
||||
await page.getByText("Please save").isVisible();
|
||||
await page.getByTestId("icon-Copy").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Api Key Copied!").isVisible();
|
||||
await page.getByText(randomName).isVisible();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue