merge fix

This commit is contained in:
cristhianzl 2024-03-29 22:11:53 -03:00
commit a93e971005
19 changed files with 34 additions and 21 deletions

View file

@ -52,11 +52,14 @@ export default function Dropdown({
editNode ? "input-edit-node" : "py-2"
)}
>
{value &&
value !== "" &&
options.find((option) => option === value)
? options.find((option) => option === value)
: "Choose an option..."}
<span data-testid={`value-dropdown-` + id}>
{value &&
value !== "" &&
options.find((option) => option === value)
? options.find((option) => option === value)
: "Choose an option..."}
</span>
<ForwardedIconComponent
name="ChevronsUpDown"
className="ml-2 h-4 w-4 shrink-0 opacity-50"

View file

@ -6,13 +6,17 @@ export default function ParentDisclosureComponent({
button: { title, Icon, buttons = [] },
children,
openDisc,
testId,
}: DisclosureComponentType): JSX.Element {
return (
<Disclosure as="div" defaultOpen={openDisc} key={title}>
{({ open }) => (
<>
<div>
<Disclosure.Button className="parent-disclosure-arrangement">
<Disclosure.Button
className="parent-disclosure-arrangement"
data-testid={testId}
>
<div className="flex gap-4">
<span className="parent-disclosure-title">{title}</span>
</div>

View file

@ -352,6 +352,7 @@ export default function ExtraSidebar(): JSX.Element {
title: "Extended",
Icon: nodeIconsLucide.unknown,
}}
testId="extended-disclosure"
>
{Object.keys(dataFilter)
.sort(sortKeys)

View file

@ -159,6 +159,7 @@ export type DisclosureComponentType = {
onClick: (event?: React.MouseEvent) => void;
}[];
};
testId?: string;
};
export type RangeSpecType = {

View file

@ -9,12 +9,14 @@ test("CodeAreaModalComponent", async ({ page }) => {
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("pythonfunctiontool");
await page.waitForTimeout(1000);
await page.getByTestId("extended-disclosure").click();
await page
.getByTestId("toolsPythonFunctionTool")
.dragTo(page.locator('//*[@id="react-flow-id"]'));

View file

@ -10,6 +10,7 @@ test("dropDownComponent", async ({ page }) => {
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("amazon");
@ -39,7 +40,7 @@ test("dropDownComponent", async ({ page }) => {
await page.getByTestId("ai21.j2-mid-v1-10-option").click();
let value = await page
.getByTestId("value-dropdown-model_id")
.getByTestId("value-dropdown-dropdown-model_id")
.first()
.innerText();
if (value !== "ai21.j2-mid-v1") {

View file

@ -10,6 +10,7 @@ test("LLMChain - Tooltip", async ({ page }) => {
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("llmchain");
@ -104,7 +105,7 @@ test("LLMChain - Filter", async ({ page }) => {
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("llmchain");

View file

@ -9,7 +9,7 @@ test("FloatComponent", async ({ page }) => {
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("ollama");

View file

@ -15,7 +15,7 @@ test.describe("Flow Page tests", () => {
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("custom");

View file

@ -9,7 +9,7 @@ test("InputComponent", async ({ page }) => {
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("Chroma");

View file

@ -9,7 +9,7 @@ test("InputListComponent", async ({ page }) => {
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("astradb search");

View file

@ -9,7 +9,7 @@ test("IntComponent", async ({ page }) => {
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("openai");

View file

@ -9,7 +9,7 @@ test("KeypairListComponent", async ({ page }) => {
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("csv");

View file

@ -18,7 +18,7 @@ test("LangflowShortcuts", async ({ page }) => {
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("ollama");

View file

@ -9,7 +9,7 @@ test("NestedComponent", async ({ page }) => {
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("pinecone");

View file

@ -9,7 +9,7 @@ test("PromptTemplateComponent", async ({ page }) => {
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("prompt");

View file

@ -87,7 +87,7 @@ test.describe("save component tests", () => {
if (replaceButton) {
await page.getByTestId("replace-button").click();
}
await page.getByTestId("extended-disclosure").click();
await page.getByPlaceholder("Search").click();
await page.getByPlaceholder("Search").fill("group");
await page.waitForTimeout(1000);

View file

@ -9,7 +9,7 @@ test("TextAreaModalComponent", async ({ page }) => {
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("prompt");

View file

@ -9,7 +9,7 @@ test("ToggleComponent", async ({ page }) => {
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("directoryLoader");