fix: handle null and boolean correctly on table parameter (#6722)

* Added Null, Undefined and Bool rendering to table

* Handling formatter to come from the backend in table definitions

* Added validator to make type as formatter and vice versa

* Added boolean case to show badge

* Added Toggle Cell Editor

* Supress Row Click Selection on Table node component

* ADd boolean as type for formatter

* Adds Boolean formatter type to show toggle editor

* run format_backend

* ✅ (tableInputComponent.spec.ts): update unit test for table input component to use new methods for interacting with elements and improve readability and maintainability of the test code.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Lucas Oliveira 2025-02-24 18:33:34 -03:00 • committed by GitHub
commit 3257c5720e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 119 additions and 27 deletions

View file

@ -113,33 +113,27 @@ class CustomComponent(Component):
await expect(page.getByText(text).last()).toBeVisible();
}
await page.locator(".ag-cell-value").first().click();
await page.getByPlaceholder("Empty").fill(randomText);
await page.getByText("Save").last().click();
await expect(page.getByTestId("icon-Type")).toBeHidden({
timeout: 2000,
});
await page.locator(".ag-cell-value").nth(12).click();
await page.getByPlaceholder("Empty").fill(secondRandomText);
await page.getByText("Save").last().click();
await expect(page.getByTestId("icon-Type")).toBeHidden({
timeout: 2000,
await page.locator(".ag-cell-value").first().dblclick({
force: true,
});
await page.locator(".ag-cell-value").nth(24).click();
await expect(page.getByTestId("icon-Type")).toBeVisible({
timeout: 2000,
await page.getByLabel("Input Editor").fill(randomText);
await page.keyboard.press("Enter");
await page.locator(".ag-cell-value").nth(12).dblclick({
force: true,
});
await page.getByPlaceholder("Empty").fill(thirdRandomText);
await page.getByText("Save").last().click();
await page.getByLabel("Input Editor").fill(secondRandomText);
await page.keyboard.press("Enter");
await expect(page.getByTestId("icon-Type")).toBeHidden({
timeout: 2000,
await page.locator(".ag-cell-value").nth(24).dblclick({
force: true,
});
await page.getByLabel("Input Editor").fill(thirdRandomText);
await page.keyboard.press("Enter");
expect(page.getByText(randomText)).toBeVisible();
expect(page.getByText(secondRandomText)).toBeVisible();
expect(page.getByText(thirdRandomText)).toBeVisible();