fix: inconsistent text table result for Message Type output (#6633)

* Update component.py

* 🐛 (loop-component.spec.ts): fix clicking on incorrect element in test causing failure

* 🔧 (freeze-path.spec.ts): Remove redundant clicks on "Close" button in multiple test cases to improve test efficiency
🔧 (freeze.spec.ts): Remove redundant clicks on "Close" button in multiple test cases to improve test efficiency

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Edwin Jose 2025-02-17 15:36:39 -05:00 committed by GitHub
commit c9153b0d82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 0 additions and 25 deletions

View file

@ -981,9 +981,6 @@ class Component(CustomComponent):
return {"repr": custom_repr, "raw": raw, "type": artifact_type}
def _process_raw_result(self, result):
"""Process the raw result of the component."""
if len(self.outputs) == 1:
return self.status or self.extract_data(result)
return self.extract_data(result)
def extract_data(self, result):

View file

@ -62,15 +62,12 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const randomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.waitForSelector('[data-testid="default_slider_display_value"]', {
timeout: 1000,
@ -94,15 +91,12 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const secondRandomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.waitForSelector("text=OpenAI", {
timeout: 1000,
@ -145,15 +139,12 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const thirdRandomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
expect(randomTextGeneratedByAI).not.toEqual(secondRandomTextGeneratedByAI);
expect(randomTextGeneratedByAI).not.toEqual(thirdRandomTextGeneratedByAI);

View file

@ -189,16 +189,12 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const firstRunWithoutFreezing = await page
.getByPlaceholder("Empty")
.textContent();
await page.getByText("Close").last().click();
await page.getByTestId("btn-close-modal").click();
await page.getByTestId("textarea_str_input_value").first().fill(",");
await page.getByTestId("button_run_chat output").click();
@ -221,14 +217,11 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const secondRunWithoutFreezing = await page
.getByPlaceholder("Empty")
.textContent();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.getByText("Split Text", { exact: true }).last().click();
@ -277,11 +270,8 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const firstTextFreezed = await page.getByPlaceholder("Empty").textContent();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.getByText("Split Text", { exact: true }).click();
@ -322,8 +312,6 @@ test(
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const thirdTextWithoutFreezing = await page
.getByPlaceholder("Empty")
.textContent();

View file

@ -231,7 +231,6 @@ test(
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const output = await page.getByPlaceholder("Empty").textContent();
expect(output).toContain("modified_value");