add tests improvements
This commit is contained in:
parent
b19264506c
commit
5d58e796d4
31 changed files with 818 additions and 517 deletions
|
|
@ -15,7 +15,7 @@ dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
|||
export default defineConfig({
|
||||
testDir: "./tests",
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: false,
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
forbidOnly: !!process.env.CI,
|
||||
/* Retry on CI only */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export default function HandleRenderComponent({
|
|||
colors,
|
||||
setFilterEdge,
|
||||
showNode,
|
||||
testIdComplement,
|
||||
}: {
|
||||
left: boolean;
|
||||
nodes: any;
|
||||
|
|
@ -33,7 +34,10 @@ export default function HandleRenderComponent({
|
|||
colors: string[];
|
||||
setFilterEdge: any;
|
||||
showNode: any;
|
||||
testIdComplement?: string;
|
||||
}) {
|
||||
console.log(myData);
|
||||
|
||||
return (
|
||||
<Button
|
||||
unstyled
|
||||
|
|
|
|||
|
|
@ -248,6 +248,8 @@ export default function ParameterComponent({
|
|||
}
|
||||
}, [disabledOutput]);
|
||||
|
||||
console.log(data);
|
||||
|
||||
return !showNode ? (
|
||||
left && LANGFLOW_SUPPORTED_TYPES.has(type ?? "") && !optionalHandle ? (
|
||||
<></>
|
||||
|
|
@ -264,6 +266,7 @@ export default function ParameterComponent({
|
|||
colors={colors}
|
||||
setFilterEdge={setFilterEdge}
|
||||
showNode={showNode}
|
||||
testIdComplement={`${data?.type?.toLowerCase()}-noshownode`}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
|
|
@ -390,6 +393,7 @@ export default function ParameterComponent({
|
|||
colors={colors}
|
||||
setFilterEdge={setFilterEdge}
|
||||
showNode={showNode}
|
||||
testIdComplement={`${data?.type?.toLowerCase()}-shownode`}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
26
src/frontend/tests/end-to-end/autoLogin.spec.ts
Normal file
26
src/frontend/tests/end-to-end/autoLogin.spec.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test.describe("Auto_login tests", () => {
|
||||
test("auto_login sign in", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
});
|
||||
|
||||
test("auto_login block_admin", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/login");
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/admin");
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.goto("/admin/login");
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
test("chat_io_teste", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
|
|
@ -22,10 +21,9 @@ test("chat_io_teste", async ({ page }) => {
|
|||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/ChatTest.json",
|
||||
"utf-8",
|
||||
);
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
|
|
@ -67,20 +65,37 @@ test("chat_io_teste", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
const elementsChatInput = await page
|
||||
.locator('[data-testid="handle-chatinput-shownode-message-right"]')
|
||||
.all();
|
||||
|
||||
let visibleElementHandle;
|
||||
|
||||
for (const element of elementsChatInput) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div/div/div[2]/div[2]/div/div[2]/div[9]/button/div[1]',
|
||||
)
|
||||
.hover();
|
||||
await visibleElementHandle.hover();
|
||||
await page.mouse.down();
|
||||
|
||||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div/div/div[2]/div[1]/div/div[2]/div[3]/div/button/div[1]',
|
||||
)
|
||||
.hover();
|
||||
|
||||
const elementsChatOutput = await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.all();
|
||||
|
||||
for (const element of elementsChatOutput) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover();
|
||||
|
||||
// Release the mouse
|
||||
await page.mouse.up();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ test("CodeAreaModalComponent", async ({ page }) => {
|
|||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ test("dropDownComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ test("should be able to upload a file", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
@ -77,38 +78,70 @@ test("should be able to upload a file", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
let visibleElementHandle;
|
||||
|
||||
const elementsFile = await page
|
||||
.getByTestId("handle-file-shownode-data-right")
|
||||
.all();
|
||||
|
||||
for (const element of elementsFile) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 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[1]',
|
||||
)
|
||||
.hover();
|
||||
await visibleElementHandle.hover();
|
||||
await page.mouse.down();
|
||||
|
||||
// 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[4]/div/button/div[1]',
|
||||
)
|
||||
.hover();
|
||||
|
||||
const parseDataElement = await page
|
||||
.getByTestId("handle-parsedata-shownode-data-left")
|
||||
.all();
|
||||
|
||||
for (const element of parseDataElement) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover();
|
||||
|
||||
// Release the mouse
|
||||
await page.mouse.up();
|
||||
|
||||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[3]/div/div[2]/div[7]/button/div[1]',
|
||||
)
|
||||
.hover();
|
||||
|
||||
const parseDataOutputElement = await page
|
||||
.getByTestId("handle-parsedata-shownode-text-right")
|
||||
.all();
|
||||
|
||||
for (const element of parseDataOutputElement) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover();
|
||||
await page.mouse.down();
|
||||
|
||||
// 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[1]',
|
||||
)
|
||||
.hover();
|
||||
const textOutputElement = await page
|
||||
.getByTestId("handle-textoutput-shownode-text-left")
|
||||
.all();
|
||||
|
||||
for (const element of textOutputElement) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover();
|
||||
|
||||
// Release the mouse
|
||||
await page.mouse.up();
|
||||
|
|
|
|||
175
src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts
Normal file
175
src/frontend/tests/end-to-end/filterEdge-shard-0.spec.ts
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("LLMChain - Tooltip", async ({ page }) => {
|
||||
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.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("llmchain");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByTestId("chainsLLMChain")
|
||||
.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();
|
||||
|
||||
const llmChainOutputElements = await page
|
||||
.getByTestId("handle-llmchain-shownode-text-right")
|
||||
.all();
|
||||
let visibleElementHandle;
|
||||
|
||||
for (const element of llmChainOutputElements) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover().then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("available-output-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-textsplitters").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-retrievers").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-prototypes").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-tools").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-memories").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-toolkits").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-agents").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-helpers").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-langchain_utilities").first(),
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByTestId("icon-X").click();
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
const llmChainInputElements1 = await page
|
||||
.getByTestId("handle-llmchain-shownode-llm-left")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainInputElements1) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover().then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("available-input-models").first(),
|
||||
).toBeVisible();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("icon-Search").click();
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
const llmChainInputElements0 = await page
|
||||
.getByTestId("handle-llmchain-shownode-template-left")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainInputElements0) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover().then(async () => {
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await expect(
|
||||
page.getByTestId("available-input-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-prototypes").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-agents").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-helpers").first(),
|
||||
).toBeVisible();
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
const llmChainInputElements2 = await page
|
||||
.getByTestId("handle-llmchain-shownode-memory-left")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainInputElements2) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.hover().then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("empty-tooltip-filter").first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
148
src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts
Normal file
148
src/frontend/tests/end-to-end/filterEdge-shard-1.spec.ts
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("LLMChain - Filter", 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.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("llmchain");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByTestId("chainsLLMChain")
|
||||
.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();
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
let visibleElementHandle;
|
||||
|
||||
const llmChainOutputElements = await page
|
||||
.getByTestId("handle-llmchain-shownode-text-right")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainOutputElements) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.click({
|
||||
force: true,
|
||||
});
|
||||
|
||||
await expect(page.getByTestId("disclosure-helpers")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-agents")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-chains")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-utilities")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-memories")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-prototypes")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-retrievers")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-text splitters")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-toolkits")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-tools")).toBeVisible();
|
||||
|
||||
await expect(page.getByTestId("chainsLLMChain").first()).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("langchain_utilitiesSearchApi").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("memoriesAstra DB Message Reader").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("prototypesFlow as Tool").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("retrieversAmazon Kendra Retriever").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("textsplittersCharacterTextSplitter").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("toolkitsVectorStoreInfo").first(),
|
||||
).toBeVisible();
|
||||
await expect(page.getByTestId("toolsSearchApi").first()).toBeVisible();
|
||||
|
||||
await page.getByPlaceholder("Search").click();
|
||||
|
||||
await expect(page.getByTestId("model_specsVertexAI")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsCTransformers")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsAmazon Bedrock")).not.toBeVisible();
|
||||
await expect(page.getByTestId("modelsAzure OpenAI")).not.toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("model_specsAzureChatOpenAI"),
|
||||
).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatAnthropic")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatLiteLLM")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatOllama")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatOpenAI")).not.toBeVisible();
|
||||
await expect(page.getByTestId("model_specsChatVertexAI")).not.toBeVisible();
|
||||
|
||||
const llmChainInputElements1 = await page
|
||||
.getByTestId("handle-llmchain-shownode-llm-left")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainInputElements1) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.blur();
|
||||
|
||||
await visibleElementHandle.click({
|
||||
force: true,
|
||||
});
|
||||
|
||||
await expect(page.getByTestId("disclosure-models")).toBeVisible();
|
||||
|
||||
const llmChainInputElements0 = await page
|
||||
.getByTestId("handle-llmchain-shownode-template-left")
|
||||
.all();
|
||||
|
||||
for (const element of llmChainInputElements0) {
|
||||
if (await element.isVisible()) {
|
||||
visibleElementHandle = element;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await visibleElementHandle.click();
|
||||
|
||||
await expect(page.getByTestId("disclosure-helpers")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-agents")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-chains")).toBeVisible();
|
||||
await expect(page.getByTestId("disclosure-prototypes")).toBeVisible();
|
||||
});
|
||||
|
|
@ -19,8 +19,9 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ test("flowSettings", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ test("GlobalVariables", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -1,159 +0,0 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("LLMChain - Tooltip", async ({ page }) => {
|
||||
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.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("llmchain");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByTestId("chainsLLMChain")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
await page.waitForSelector('[title="fit view"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[7]/button/div[1]',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("available-output-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-textsplitters").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-retrievers").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-prototypes").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-tools").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-memories").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-toolkits").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-agents").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-helpers").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-output-langchain_utilities").first(),
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByTestId("icon-X").click();
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[4]/div/button/div[1]',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("available-input-models").first(),
|
||||
).toBeVisible();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("icon-Search").click();
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
await page.waitForSelector('[title="fit view"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div/div/div[2]/div/div/div[2]/div[3]/div/button/div[1]',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await expect(
|
||||
page.getByTestId("available-input-chains").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-prototypes").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-agents").first(),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByTestId("available-input-helpers").first(),
|
||||
).toBeVisible();
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div/div/div[2]/div[5]/div/button/div[1]',
|
||||
)
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await expect(
|
||||
page.getByTestId("empty-tooltip-filter").first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
@ -19,8 +19,9 @@ test("InputComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ test("IntComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -19,10 +19,13 @@ test("KeypairListComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("amazon bedrock");
|
||||
|
|
|
|||
|
|
@ -67,11 +67,9 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
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]',
|
||||
)
|
||||
.click();
|
||||
const ollamaTitleElement = await page.getByTestId("title-Ollama").last();
|
||||
|
||||
await ollamaTitleElement.click();
|
||||
await page.keyboard.press("Backspace");
|
||||
|
||||
numberOfNodes = await page.getByTestId("title-Ollama")?.count();
|
||||
|
|
@ -90,11 +88,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
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]',
|
||||
)
|
||||
.click();
|
||||
await ollamaTitleElement.click();
|
||||
await page.keyboard.press("Backspace");
|
||||
|
||||
await page.getByTestId("title-Ollama").click();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 100000,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue