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:
parent
3bb27bb51b
commit
c9153b0d82
4 changed files with 0 additions and 25 deletions
|
|
@ -981,9 +981,6 @@ class Component(CustomComponent):
|
||||||
return {"repr": custom_repr, "raw": raw, "type": artifact_type}
|
return {"repr": custom_repr, "raw": raw, "type": artifact_type}
|
||||||
|
|
||||||
def _process_raw_result(self, result):
|
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)
|
return self.extract_data(result)
|
||||||
|
|
||||||
def extract_data(self, result):
|
def extract_data(self, result):
|
||||||
|
|
|
||||||
|
|
@ -62,15 +62,12 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const randomTextGeneratedByAI = await page
|
const randomTextGeneratedByAI = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.first()
|
.first()
|
||||||
.inputValue();
|
.inputValue();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
await page.getByText("Close").last().click();
|
|
||||||
|
|
||||||
await page.waitForSelector('[data-testid="default_slider_display_value"]', {
|
await page.waitForSelector('[data-testid="default_slider_display_value"]', {
|
||||||
timeout: 1000,
|
timeout: 1000,
|
||||||
|
|
@ -94,15 +91,12 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const secondRandomTextGeneratedByAI = await page
|
const secondRandomTextGeneratedByAI = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.first()
|
.first()
|
||||||
.inputValue();
|
.inputValue();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
await page.getByText("Close").last().click();
|
|
||||||
|
|
||||||
await page.waitForSelector("text=OpenAI", {
|
await page.waitForSelector("text=OpenAI", {
|
||||||
timeout: 1000,
|
timeout: 1000,
|
||||||
|
|
@ -145,15 +139,12 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const thirdRandomTextGeneratedByAI = await page
|
const thirdRandomTextGeneratedByAI = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.first()
|
.first()
|
||||||
.inputValue();
|
.inputValue();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
await page.getByText("Close").last().click();
|
|
||||||
|
|
||||||
expect(randomTextGeneratedByAI).not.toEqual(secondRandomTextGeneratedByAI);
|
expect(randomTextGeneratedByAI).not.toEqual(secondRandomTextGeneratedByAI);
|
||||||
expect(randomTextGeneratedByAI).not.toEqual(thirdRandomTextGeneratedByAI);
|
expect(randomTextGeneratedByAI).not.toEqual(thirdRandomTextGeneratedByAI);
|
||||||
|
|
|
||||||
|
|
@ -189,16 +189,12 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const firstRunWithoutFreezing = await page
|
const firstRunWithoutFreezing = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.textContent();
|
.textContent();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
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("textarea_str_input_value").first().fill(",");
|
||||||
|
|
||||||
await page.getByTestId("button_run_chat output").click();
|
await page.getByTestId("button_run_chat output").click();
|
||||||
|
|
@ -221,14 +217,11 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const secondRunWithoutFreezing = await page
|
const secondRunWithoutFreezing = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.textContent();
|
.textContent();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
await page.getByText("Close").last().click();
|
|
||||||
|
|
||||||
await page.getByText("Split Text", { exact: true }).last().click();
|
await page.getByText("Split Text", { exact: true }).last().click();
|
||||||
|
|
||||||
|
|
@ -277,11 +270,8 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const firstTextFreezed = await page.getByPlaceholder("Empty").textContent();
|
const firstTextFreezed = await page.getByPlaceholder("Empty").textContent();
|
||||||
|
|
||||||
await page.getByText("Close").last().click();
|
|
||||||
await page.getByText("Close").last().click();
|
await page.getByText("Close").last().click();
|
||||||
|
|
||||||
await page.getByText("Split Text", { exact: true }).click();
|
await page.getByText("Split Text", { exact: true }).click();
|
||||||
|
|
@ -322,8 +312,6 @@ test(
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const thirdTextWithoutFreezing = await page
|
const thirdTextWithoutFreezing = await page
|
||||||
.getByPlaceholder("Empty")
|
.getByPlaceholder("Empty")
|
||||||
.textContent();
|
.textContent();
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,6 @@ test(
|
||||||
.getByTestId("output-inspection-message-chatoutput")
|
.getByTestId("output-inspection-message-chatoutput")
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.click();
|
||||||
await page.getByRole("gridcell").nth(4).click();
|
|
||||||
|
|
||||||
const output = await page.getByPlaceholder("Empty").textContent();
|
const output = await page.getByPlaceholder("Empty").textContent();
|
||||||
expect(output).toContain("modified_value");
|
expect(output).toContain("modified_value");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue