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
|
|
@ -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