feat: add support to accept Dataframe as input to split text, and added relevant tests (#6302)

* update to support dataframe

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update split_text.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* update names

* Update src/backend/base/langflow/schema/dataframe.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* [autofix.ci] apply automated fixes

* update to template

* update review changes

* Update Vector Store RAG.json

* fix lint errors

* fix tests

* 📝 (freeze.spec.ts): update test description to match the actual element being tested for better clarity and accuracy

*  (stop-button-playground.spec.ts): improve test reliability by specifying target position for drag action to prevent flakiness

*  (logs.spec.ts): increase timeout from 1000ms to 3000ms for better test reliability
 (stop-building.spec.ts): update test selector from "handle-splittext-shownode-data inputs-left" to "handle-splittext-shownode-input documents-left" for accurate testing
 (starter-projects.spec.ts): add a 1000ms timeout before asserting visibility of an element for better test stability

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Edwin Jose 2025-02-19 15:40:56 -05:00 committed by GitHub
commit e8529eaecb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 1184 additions and 924 deletions

View file

@ -119,7 +119,7 @@ test(
await urlOutput.hover();
await page.mouse.down();
const splitTextInputData = await page.getByTestId(
"handle-splittext-shownode-data inputs-left",
"handle-splittext-shownode-input documents-left",
);
await splitTextInputData.hover();
await page.mouse.up();

View file

@ -22,7 +22,7 @@ test(
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await expect(page.getByTestId(/.*rf__node.*/).first()).toBeVisible({
timeout: 1000,
timeout: 3000,
});
let outdatedComponents = await page
.getByTestId("icon-AlertTriangle")

View file

@ -82,7 +82,7 @@ test(
await urlOutput.hover();
await page.mouse.down();
const splitTextInputData = await page.getByTestId(
"handle-splittext-shownode-data inputs-left",
"handle-splittext-shownode-input documents-left",
);
await splitTextInputData.hover();
await page.mouse.up();

View file

@ -17,6 +17,8 @@ test(
await page.getByTestId("search-input-template").fill("Document");
await page.waitForTimeout(1000);
expect(
page.getByTestId("template_basic-prompting-(hello,-world)"),
).toBeVisible({ visible: false, timeout: 3000 });

View file

@ -23,9 +23,6 @@ test(
await page.getByTestId("sidebar-custom-component-button").click();
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.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("chat output");
@ -36,7 +33,9 @@ test(
await page
.getByTestId("outputsChat Output")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
targetPosition: { x: 400, y: 400 },
});
await adjustScreenView(page);