feat: enhance URL component with improved description and render parameters (#5623)
* [LFOSS-74]: new input list UI * [LFOSS-93]: node colors * 📝 (Graph Vector Store RAG.json): Update description of ChatInput class to improve clarity and consistency 📝 (Graph Vector Store RAG.json): Update description of URLComponent class to improve clarity and consistency 📝 (select-items.tsx): Change noteDataType import to NoteDataType for consistency and clarity 📝 (dropdown-menu.tsx): Add RenderIcons component to display keyboard shortcuts for actions 📝 (index.tsx): Change parameter type from React.MouseEvent to KeyboardEvent for removeInput and handleDuplicateInput functions 📝 (use-overlap-shortcuts.tsx): Create custom hook to handle keyboard shortcuts with support for multiple key variations and modifiers * 📝 (backend): Remove unnecessary metadata for URLComponent in multiple files 📝 (frontend): Refactor input components to use listAddLabel instead of metadata in multiple files * ♻️ (NodeInputField/index.tsx): Remove unused 'metadata' variable to clean up the code and improve readability * [autofix.ci] apply automated fixes * merge fix * [autofix.ci] apply automated fixes * fix tests * 🐛 (generalBugs-shard-5.spec.ts): fix incorrect comments numbering connections 💡 (generalBugs-shard-5.spec.ts): add clarifying comments for connection steps in the test case * 🐛 (generalBugs-shard-5.spec.ts): fix filling delimiter in popover-anchor-input to resolve UI bug 📝 (generalBugs-shard-5.spec.ts): update test cases to improve test coverage and accuracy * ✨ (NodeOutputfield/index.tsx): Add top margin to improve spacing of NodeOutputField component 🔧 (generalBugs-shard-5.spec.ts): Remove commented out code related to input filling and waiting for visibility to clean up the test file and improve readability * 🔧 (index.tsx): increase padding-right from 6 to 10 in input-edit-node class to improve spacing for better user experience --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
febae4b589
commit
e2ff7b314b
19 changed files with 529 additions and 201 deletions
|
|
@ -54,7 +54,7 @@ test(
|
|||
await page
|
||||
.getByTestId("processingParse Data")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 100, y: 400 },
|
||||
targetPosition: { x: 100, y: 500 },
|
||||
});
|
||||
|
||||
//fifth component
|
||||
|
|
|
|||
|
|
@ -26,12 +26,22 @@ test(
|
|||
|
||||
await zoomOut(page, 4);
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page
|
||||
.getByTestId("inputsText Input")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 500, y: 150 },
|
||||
});
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page
|
||||
.getByTestId("inputsText Input")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 670, y: 200 },
|
||||
});
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("combine text");
|
||||
|
||||
|
|
@ -45,12 +55,20 @@ test(
|
|||
targetPosition: { x: 10, y: 10 },
|
||||
});
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page.getByTestId("popover-anchor-input-delimiter").fill("-");
|
||||
|
||||
await page
|
||||
.getByTestId("processingCombine Text")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 200, y: 10 },
|
||||
});
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page.getByTestId("popover-anchor-input-delimiter").last().fill("-");
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("text");
|
||||
|
||||
|
|
@ -161,7 +179,7 @@ test(
|
|||
|
||||
await page.getByTestId("group-node").click();
|
||||
|
||||
//connection 2
|
||||
//connection 1
|
||||
const elementTextOutput0 = page
|
||||
.getByTestId("handle-textinput-shownode-text-right")
|
||||
.nth(0);
|
||||
|
|
@ -171,17 +189,28 @@ test(
|
|||
);
|
||||
await elementGroupInput0.click();
|
||||
|
||||
//connection 3
|
||||
//connection 2
|
||||
const elementTextOutput1 = page
|
||||
.getByTestId("handle-textinput-shownode-text-right")
|
||||
.nth(2);
|
||||
.nth(4);
|
||||
await elementTextOutput1.click();
|
||||
|
||||
const elementGroupInput1 = page
|
||||
.getByTestId("handle-groupnode-shownode-second text-left")
|
||||
.nth(1);
|
||||
.first();
|
||||
await elementGroupInput1.click();
|
||||
|
||||
//connection 3
|
||||
const elementTextOutput2 = page
|
||||
.getByTestId("handle-textinput-shownode-text-right")
|
||||
.nth(2);
|
||||
await elementTextOutput2.click();
|
||||
|
||||
const elementGroupInput2 = page
|
||||
.getByTestId("handle-groupnode-shownode-second text-left")
|
||||
.nth(1)
|
||||
.last();
|
||||
await elementGroupInput2.click();
|
||||
|
||||
//connection 4
|
||||
const elementGroupOutput = page
|
||||
.getByTestId("handle-groupnode-shownode-combined text-right")
|
||||
|
|
@ -200,20 +229,10 @@ test(
|
|||
.nth(1)
|
||||
.fill(secondRandomName);
|
||||
|
||||
await page
|
||||
.getByPlaceholder("Type something...", { exact: true })
|
||||
.nth(4)
|
||||
.fill(thirdRandomName);
|
||||
|
||||
await page
|
||||
.getByPlaceholder("Type something...", { exact: true })
|
||||
.nth(3)
|
||||
.fill("-");
|
||||
|
||||
await page
|
||||
.getByPlaceholder("Type something...", { exact: true })
|
||||
.nth(2)
|
||||
.fill("-");
|
||||
.fill(thirdRandomName);
|
||||
|
||||
await page.getByTestId("button_run_text output").last().click();
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|||
await page.getByTestId("input-chat-playground").click();
|
||||
await page.getByTestId("input-chat-playground").fill("teste");
|
||||
await page.getByTestId("button-send").first().click();
|
||||
const chat_input = page.getByTestId("chat-message-User-teste");
|
||||
await expect(chat_input).toHaveText("teste", { timeout: 10000 });
|
||||
const chat_input = await page
|
||||
.getByTestId("chat-message-User-teste")
|
||||
.textContent();
|
||||
|
||||
expect(chat_input).toBe("teste");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ test(
|
|||
});
|
||||
await page
|
||||
.getByTestId("dataURL")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("add-component-button-url").click();
|
||||
});
|
||||
await adjustScreenView(page);
|
||||
|
||||
await page.getByTestId("inputlist_str_urls_0").fill("test test test test");
|
||||
|
|
@ -53,93 +54,83 @@ test(
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.getByTestId("input-list-minus-btn-edit_urls-1").click();
|
||||
await page.getByTestId("input-list-dropdown-menu-0-edit").click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId(
|
||||
"input-list-minus-btn-edit_urls-1",
|
||||
);
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
await page.getByTestId("input-list-dropdown-menu-0-delete").click();
|
||||
|
||||
if (elementCount > 1) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-2-edit").count(),
|
||||
).toBe(0);
|
||||
|
||||
await page.getByTestId("input-list-dropdown-menu-1-edit").click();
|
||||
|
||||
await page.getByTestId("input-list-dropdown-menu-1-delete").click();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-1-edit").count(),
|
||||
).toBe(0);
|
||||
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByTestId("input-list-minus-btn_urls-2").isHidden();
|
||||
await page.getByTestId("input-list-add-more-view").click();
|
||||
await page.getByTestId("input-list-add-more-view").click();
|
||||
await page.getByTestId("input-list-add-more-view").click();
|
||||
|
||||
await page.getByTestId("input-list-plus-btn_urls-0").click();
|
||||
await page.getByTestId("input-list-plus-btn_urls-0").click();
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-0-view").count(),
|
||||
).toBe(1);
|
||||
|
||||
await page.getByTestId("inputlist_str_urls_0").fill("test test test test");
|
||||
await page
|
||||
.getByTestId("inputlist_str_urls_1")
|
||||
.fill("test1 test1 test1 test1");
|
||||
await page
|
||||
.getByTestId("inputlist_str_urls_2")
|
||||
.fill("test2 test2 test2 test2");
|
||||
await page
|
||||
.getByTestId("inputlist_str_urls_3")
|
||||
.fill("test3 test3 test3 test3");
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-1-view").count(),
|
||||
).toBe(1);
|
||||
|
||||
await page.getByTestId("div-generic-node").click();
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("advanced-button-modal").click();
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-2-view").count(),
|
||||
).toBe(1);
|
||||
|
||||
const value0Edit = await page
|
||||
.getByTestId("inputlist_str_edit_urls_0")
|
||||
.inputValue();
|
||||
const value1Edit = await page
|
||||
.getByTestId("inputlist_str_edit_urls_1")
|
||||
.inputValue();
|
||||
const value2Edit = await page
|
||||
.getByTestId("inputlist_str_edit_urls_2")
|
||||
.inputValue();
|
||||
const value3Edit = await page
|
||||
.getByTestId("inputlist_str_edit_urls_3")
|
||||
.inputValue();
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-3-view").count(),
|
||||
).toBe(1);
|
||||
|
||||
if (
|
||||
value0Edit !== "test test test test" ||
|
||||
value1Edit !== "test1 test1 test1 test1" ||
|
||||
value2Edit !== "test2 test2 test2 test2" ||
|
||||
value3Edit !== "test3 test3 test3 test3"
|
||||
) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
expect(
|
||||
await page.getByTestId("input-list-dropdown-menu-4-view").count(),
|
||||
).toBe(0);
|
||||
|
||||
await page.getByTestId("input-list-minus-btn-edit_urls-1").click();
|
||||
await page.getByTestId("input-list-minus-btn-edit_urls-1").click();
|
||||
await page.getByTestId("input-list-minus-btn-edit_urls-1").click();
|
||||
await page.getByTestId("input-list-dropdown-menu-0-view").click();
|
||||
await page.getByTestId("input-list-dropdown-menu-0-duplicate").click();
|
||||
|
||||
const plusButtonLocatorEdit0 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_urls-0",
|
||||
);
|
||||
const elementCountEdit0 = await plusButtonLocatorEdit0?.count();
|
||||
|
||||
const plusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_urls-1",
|
||||
);
|
||||
const elementCountEdit2 = await plusButtonLocatorEdit2?.count();
|
||||
|
||||
if (elementCountEdit0 > 1 || elementCountEdit2 > 0) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
const minusButtonLocatorEdit1 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_urls-1",
|
||||
expect(await page.getByTestId("inputlist_str_urls_0").inputValue()).toBe(
|
||||
"test1 test1 test1 test1",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit1 = await minusButtonLocatorEdit1?.count();
|
||||
|
||||
const minusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_urls-2",
|
||||
expect(await page.getByTestId("inputlist_str_urls_1").inputValue()).toBe(
|
||||
"test1 test1 test1 test1",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit2 = await minusButtonLocatorEdit2?.count();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
if (elementCountMinusEdit1 > 1 || elementCountMinusEdit2 > 0) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
expect(
|
||||
await page.getByTestId("inputlist_str_edit_urls_0").inputValue(),
|
||||
).toBe("test1 test1 test1 test1");
|
||||
|
||||
expect(
|
||||
await page.getByTestId("inputlist_str_edit_urls_1").inputValue(),
|
||||
).toBe("test1 test1 test1 test1");
|
||||
|
||||
await page.getByTestId("input-list-dropdown-menu-1-edit").click();
|
||||
|
||||
await page.getByTestId("input-list-dropdown-menu-1-duplicate").click();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("inputlist_str_edit_urls_0").inputValue(),
|
||||
).toBe("test1 test1 test1 test1");
|
||||
|
||||
expect(
|
||||
await page.getByTestId("inputlist_str_edit_urls_1").inputValue(),
|
||||
).toBe("test1 test1 test1 test1");
|
||||
|
||||
expect(
|
||||
await page.getByTestId("inputlist_str_edit_urls_2").inputValue(),
|
||||
).toBe("test1 test1 test1 test1");
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue