Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 017a0a4

Browse files
edwinjosechittilappillyitalojohnnyautofix-ci[bot]Cristhianzlmendonk
authoredMar 31, 2025··
feat: deprecate Parsing component and replace them in starter projects (#6697)
* fix: fixed the parser component * fix: fixed parser component test * fix: ruff error * chore: rename input * chore: remove beta attribute * update * updated template with legacy as true * updated templates * [autofix.ci] apply automated fixes * ✨ (freeze.spec.ts): add new test steps to check sidebar options and legacy switch functionality ✨ (similarity.spec.ts): add new test steps to check sidebar options and legacy switch functionality ✨ (loop-component.spec.ts): add new test steps to check sidebar options and legacy switch functionality, as well as zoom out and expand button modal functionality * remove-copy-numbers-from-template-titles * update-blog-writer-template-readme * update-document-qa-template-notes * update-market-research-template-notes * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * ✨ (filterEdge-shard-0.spec.ts, freeze.spec.ts, Portfolio Website Code Generator.spec.ts, decisionFlow.spec.ts, similarity.spec.ts, generalBugs-shard-9.spec.ts, codeAreaModalComponent.spec.ts, fileUploadComponent.spec.ts, nestedComponent.spec.ts, filterEdge-shard-1.spec.ts, loop-component.spec.ts, generalBugs-shard-12.spec.ts, add-legacy-components.ts): add function to handle legacy components in tests for improved test readability and maintainability * remove duplicated graph rag template * update changes * update Templates with new parser component * [autofix.ci] apply automated fixes * fix: remove name attribute * fix: autofix.ci patch * ✨ (stop-building.spec.ts): add new function addLegacyComponents to include legacy components in the test scenario 🔧 (decisionFlow.spec.ts): increase timeout from 500ms to 2000ms for better stability and reliability in waiting for selectors to appear --------- Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
1 parent 85787cf commit 017a0a4

27 files changed

+4716
-4505
lines changed
 

‎src/backend/base/langflow/components/processing/parse_data.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class ParseDataComponent(Component):
1010
description = "Convert Data objects into Messages using any {field_name} from input data."
1111
icon = "message-square"
1212
name = "ParseData"
13+
legacy = True
1314
metadata = {
1415
"legacy_name": "Parse Data",
1516
}

‎src/backend/base/langflow/components/processing/parse_dataframe.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class ParseDataFrameComponent(Component):
1111
)
1212
icon = "braces"
1313
name = "ParseDataFrame"
14+
legacy = True
1415

1516
inputs = [
1617
DataFrameInput(name="df", display_name="DataFrame", info="The DataFrame to convert to text rows."),

‎src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json

+273-320
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json

+412-304
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json

+131-108
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json

+766-560
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/LoopTemplate.json

+297-291
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Market Research.json

+368-380
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json

+340-333
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json

+1,259-1,219
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json

+127-317
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json

+348-308
Large diffs are not rendered by default.

‎src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json

+325-301
Large diffs are not rendered by default.

‎src/frontend/tests/core/features/filterEdge-shard-0.spec.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { adjustScreenView } from "../../utils/adjust-screen-view";
34
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
45

@@ -12,13 +13,7 @@ test(
1213
await page.getByTestId("sidebar-search-input").click();
1314
await page.getByTestId("sidebar-search-input").fill("retrievalqa");
1415

15-
await page.getByTestId("sidebar-options-trigger").click();
16-
await page
17-
.getByTestId("sidebar-legacy-switch")
18-
.isVisible({ timeout: 5000 });
19-
await page.getByTestId("sidebar-legacy-switch").click();
20-
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
21-
await page.getByTestId("sidebar-options-trigger").click();
16+
await addLegacyComponents(page);
2217

2318
await page.waitForTimeout(1000);
2419
await page

‎src/frontend/tests/core/features/freeze.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
34
import { zoomOut } from "../../utils/zoom-out";
45

@@ -11,8 +12,9 @@ test(
1112

1213
await page.getByTestId("blank-flow").click();
1314

14-
//first component
15+
await addLegacyComponents(page);
1516

17+
//first component
1618
await page.getByTestId("sidebar-search-input").click();
1719
await page.getByTestId("sidebar-search-input").fill("text input");
1820
await page.waitForSelector('[data-testid="inputsText Input"]', {

‎src/frontend/tests/core/features/stop-building.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
34
import { removeOldApiKeys } from "../../utils/remove-old-api-keys";
45
import { updateOldComponents } from "../../utils/update-old-components";
@@ -11,6 +12,8 @@ test(
1112
await awaitBootstrapTest(page);
1213
await page.getByTestId("blank-flow").click();
1314

15+
await addLegacyComponents(page);
16+
1417
//first component
1518

1619
await page.getByTestId("sidebar-search-input").click();

‎src/frontend/tests/core/integrations/Portfolio Website Code Generator.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ withEventDeliveryModes(
7171

7272
expect(concatAllText.length).toBeGreaterThan(200);
7373

74-
expect(concatAllText).toContain("div");
75-
expect(concatAllText).toContain("class=");
74+
expect(concatAllText).toContain("html");
75+
expect(concatAllText).toContain("body");
7676
},
7777
);

‎src/frontend/tests/core/integrations/decisionFlow.spec.ts

+18-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { test } from "@playwright/test";
22
import * as dotenv from "dotenv";
33
import path from "path";
4+
import { addLegacyComponents } from "../../utils/add-legacy-components";
45
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
56
import { zoomOut } from "../../utils/zoom-out";
67

@@ -23,17 +24,13 @@ test(
2324
});
2425
await page.getByTestId("blank-flow").click();
2526

26-
await page.getByTestId("sidebar-options-trigger").click();
27-
await page
28-
.getByTestId("sidebar-legacy-switch")
29-
.isVisible({ timeout: 5000 });
30-
await page.getByTestId("sidebar-legacy-switch").click();
27+
await addLegacyComponents(page);
3128

3229
//---------------------------------- CHAT INPUT
3330
await page.getByTestId("sidebar-search-input").click();
3431
await page.getByTestId("sidebar-search-input").fill("chat input");
3532
await page.waitForSelector('[data-testid="inputsChat Input"]', {
36-
timeout: 500,
33+
timeout: 2000,
3734
});
3835

3936
await zoomOut(page, 6);
@@ -48,7 +45,7 @@ test(
4845
await page.getByTestId("sidebar-search-input").click();
4946
await page.getByTestId("sidebar-search-input").fill("list");
5047
await page.waitForSelector('[data-testid="helpersCreate List"]', {
51-
timeout: 500,
48+
timeout: 2000,
5249
});
5350
await page
5451
.getByTestId("helpersCreate List")
@@ -97,7 +94,7 @@ test(
9794
await page.getByTestId("sidebar-search-input").click();
9895
await page.getByTestId("sidebar-search-input").fill("data to message");
9996
await page.waitForSelector('[data-testid="processingData to Message"]', {
100-
timeout: 500,
97+
timeout: 2000,
10198
});
10299
await page
103100
.getByTestId("processingData to Message")
@@ -114,49 +111,49 @@ test(
114111
await page.getByTestId("sidebar-search-input").click();
115112
await page.getByTestId("sidebar-search-input").fill("pass");
116113
await page.waitForSelector('[data-testid="logicPass"]', {
117-
timeout: 500,
114+
timeout: 2000,
118115
});
119116
await page
120117
.getByTestId("logicPass")
121118
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
122119
targetPosition: { x: 800, y: 100 },
123120
});
124121
await page.waitForSelector('[data-testid="logicPass"]', {
125-
timeout: 500,
122+
timeout: 2000,
126123
});
127124
//---------------------------------- PASS
128125
await page.getByTestId("sidebar-search-input").click();
129126
await page.getByTestId("sidebar-search-input").fill("pass");
130127
await page.waitForSelector('[data-testid="logicPass"]', {
131-
timeout: 500,
128+
timeout: 2000,
132129
});
133130
await page
134131
.getByTestId("logicPass")
135132
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
136133
targetPosition: { x: 50, y: 200 },
137134
});
138135
await page.waitForSelector('[data-testid="logicPass"]', {
139-
timeout: 500,
136+
timeout: 2000,
140137
});
141138
//---------------------------------- PASS
142139
await page.getByTestId("sidebar-search-input").click();
143140
await page.getByTestId("sidebar-search-input").fill("pass");
144141
await page.waitForSelector('[data-testid="logicPass"]', {
145-
timeout: 500,
142+
timeout: 2000,
146143
});
147144
await page
148145
.getByTestId("logicPass")
149146
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
150147
targetPosition: { x: 200, y: 300 },
151148
});
152149
await page.waitForSelector('[data-testid="logicPass"]', {
153-
timeout: 500,
150+
timeout: 2000,
154151
});
155152
//---------------------------------- PROMPT
156153
await page.getByTestId("sidebar-search-input").click();
157154
await page.getByTestId("sidebar-search-input").fill("prompt");
158155
await page.waitForSelector('[data-testid="promptsPrompt"]', {
159-
timeout: 500,
156+
timeout: 2000,
160157
});
161158
await page
162159
.getByTestId("promptsPrompt")
@@ -168,7 +165,7 @@ test(
168165
await page.getByTestId("sidebar-search-input").click();
169166
await page.getByTestId("sidebar-search-input").fill("openai");
170167
await page.waitForSelector('[data-testid="modelsOpenAI"]', {
171-
timeout: 500,
168+
timeout: 2000,
172169
});
173170
await page
174171
.getByTestId("modelsOpenAI")
@@ -180,7 +177,7 @@ test(
180177
await page.getByTestId("sidebar-search-input").click();
181178
await page.getByTestId("sidebar-search-input").fill("if else");
182179
await page.waitForSelector('[data-testid="logicIf-Else"]', {
183-
timeout: 500,
180+
timeout: 2000,
184181
});
185182
await page
186183
.getByTestId("logicIf-Else")
@@ -191,29 +188,29 @@ test(
191188
await page.getByTestId("sidebar-search-input").click();
192189
await page.getByTestId("sidebar-search-input").fill("chat output");
193190
await page.waitForSelector('[data-testid="outputsChat Output"]', {
194-
timeout: 500,
191+
timeout: 2000,
195192
});
196193
await page
197194
.getByTestId("outputsChat Output")
198195
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
199196
targetPosition: { x: 800, y: 300 },
200197
});
201198
await page.waitForSelector('[data-testid="outputsChat Output"]', {
202-
timeout: 500,
199+
timeout: 2000,
203200
});
204201
//---------------------------------- CHAT OUTPUT
205202
await page.getByTestId("sidebar-search-input").click();
206203
await page.getByTestId("sidebar-search-input").fill("chat output");
207204
await page.waitForSelector('[data-testid="outputsChat Output"]', {
208-
timeout: 500,
205+
timeout: 2000,
209206
});
210207
await page
211208
.getByTestId("outputsChat Output")
212209
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
213210
targetPosition: { x: 800, y: 400 },
214211
});
215212
await page.waitForSelector('[data-testid="outputsChat Output"]', {
216-
timeout: 500,
213+
timeout: 2000,
217214
});
218215
//----------------------------------
219216
await page.getByTestId("fit_view").click();

‎src/frontend/tests/core/integrations/similarity.spec.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
34
import { updateOldComponents } from "../../utils/update-old-components";
45
import { zoomOut } from "../../utils/zoom-out";
@@ -16,7 +17,10 @@ test(
1617

1718
await page.getByTestId("blank-flow").click();
1819

20+
await addLegacyComponents(page);
21+
1922
//first component
23+
2024
await page.getByTestId("sidebar-search-input").click();
2125
await page.getByTestId("sidebar-search-input").fill("openai embedding");
2226
await page.waitForSelector("text=OpenAI Embeddings", {

‎src/frontend/tests/core/regression/generalBugs-shard-9.spec.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "@playwright/test";
22
import * as dotenv from "dotenv";
33
import path from "path";
4+
import { addLegacyComponents } from "../../utils/add-legacy-components";
45
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
56
import { initialGPTsetup } from "../../utils/initialGPTsetup";
67
test(
@@ -28,11 +29,7 @@ test(
2829
await page.getByTestId("sidebar-search-input").click();
2930
await page.getByTestId("sidebar-search-input").fill("message history");
3031

31-
await page.getByTestId("sidebar-options-trigger").click();
32-
await page
33-
.getByTestId("sidebar-legacy-switch")
34-
.isVisible({ timeout: 5000 });
35-
await page.getByTestId("sidebar-legacy-switch").click();
32+
await addLegacyComponents(page);
3633

3734
// Locate the canvas element
3835
const canvas = page.locator("#react-flow-id"); // Update the selector if needed

‎src/frontend/tests/core/unit/codeAreaModalComponent.spec.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
34

45
test(
@@ -19,11 +20,7 @@ test(
1920
timeout: 3000,
2021
});
2122

22-
await page.getByTestId("sidebar-options-trigger").click();
23-
await page
24-
.getByTestId("sidebar-legacy-switch")
25-
.isVisible({ timeout: 5000 });
26-
await page.getByTestId("sidebar-legacy-switch").click();
23+
await addLegacyComponents(page);
2724

2825
await page.waitForSelector('[data-testid="prototypesPython Function"]', {
2926
timeout: 3000,

‎src/frontend/tests/core/unit/fileUploadComponent.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from "@playwright/test";
22
import fs from "fs";
33
import path from "path";
4+
import { addLegacyComponents } from "../../utils/add-legacy-components";
45
import { adjustScreenView } from "../../utils/adjust-screen-view";
56
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
67
import { generateRandomFilename } from "../../utils/generate-filename";
@@ -29,6 +30,8 @@ test(
2930
});
3031
await page.getByTestId("blank-flow").click();
3132

33+
await addLegacyComponents(page);
34+
3235
await page.getByTestId("sidebar-search-input").click();
3336
await page.getByTestId("sidebar-search-input").fill("file");
3437

‎src/frontend/tests/core/unit/nestedComponent.spec.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { adjustScreenView } from "../../utils/adjust-screen-view";
34
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
45

@@ -15,13 +16,7 @@ test(
1516
await page.getByTestId("sidebar-search-input").click();
1617
await page.getByTestId("sidebar-search-input").fill("alter metadata");
1718

18-
await page.getByTestId("sidebar-options-trigger").click();
19-
await page
20-
.getByTestId("sidebar-legacy-switch")
21-
.isVisible({ timeout: 5000 });
22-
await page.getByTestId("sidebar-legacy-switch").click();
23-
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
24-
await page.getByTestId("sidebar-options-trigger").click();
19+
await addLegacyComponents(page);
2520

2621
await page.waitForTimeout(500);
2722

‎src/frontend/tests/extended/features/filterEdge-shard-1.spec.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { adjustScreenView } from "../../utils/adjust-screen-view";
34
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
45

@@ -14,14 +15,7 @@ test(
1415
timeout: 3000,
1516
});
1617

17-
await page.getByTestId("sidebar-options-trigger").click();
18-
19-
await expect(page.getByTestId("sidebar-legacy-switch")).toBeVisible({
20-
timeout: 5000,
21-
});
22-
await page.getByTestId("sidebar-legacy-switch").click();
23-
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
24-
await page.getByTestId("sidebar-options-trigger").click();
18+
await addLegacyComponents(page);
2519

2620
await page.getByTestId("sidebar-search-input").click();
2721
await page.getByTestId("sidebar-search-input").fill("retrievalqa");

‎src/frontend/tests/extended/features/loop-component.spec.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from "@playwright/test";
2+
import { addLegacyComponents } from "../../utils/add-legacy-components";
23
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
34
import { zoomOut } from "../../utils/zoom-out";
45

@@ -9,6 +10,8 @@ test(
910
await awaitBootstrapTest(page);
1011
await page.getByTestId("blank-flow").click();
1112

13+
await addLegacyComponents(page);
14+
1215
await page.waitForSelector(
1316
'[data-testid="sidebar-custom-component-button"]',
1417
{
@@ -146,13 +149,23 @@ test(
146149
.first()
147150
.click();
148151

152+
await zoomOut(page, 4);
153+
149154
await page.getByTestId("div-generic-node").nth(5).click();
150155

151156
await page.waitForTimeout(1000);
152157

158+
await page.waitForSelector('[data-testid="more-options-modal"]', {
159+
timeout: 100000,
160+
});
161+
153162
await page.getByTestId("more-options-modal").click();
154163

155-
await page.waitForTimeout(500);
164+
await page.waitForTimeout(1000);
165+
166+
await page.waitForSelector('[data-testid="expand-button-modal"]', {
167+
timeout: 100000,
168+
});
156169

157170
await page.getByTestId("expand-button-modal").click();
158171

There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.