PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide/Widgets
Jacques Ikot 13d316db55
fix: select column to display cell value when options are mismatched (#38387)
## Description
**Problem**
When a table cell is configured with the Select column type, the cell
value is not displayed if it does not match any of the label-value pairs
in the select options. This results in a broken user experience where it
appears as if the cell has no value.

**Expected Behaviour**
The table cell should always display its value if it exists, regardless
of whether it matches the provided select options.

**Solution**
To address this issue, the default behaviour for the select options has
been updated to prioritise the cell's value instead of falling back to
an empty string. This ensures that cell values are always visible to the
user, even if they are not part of the predefined select options.


Fixes #35807

## Automation

/ok-to-test tags="@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12544985047>
> Commit: d39d7f30bb9ae713a4d7c2038fbef89b6e8acadf
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12544985047&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Widget, @tag.Select, @tag.Binding, @tag.Table,
@tag.Sanity`
> Spec:
> <hr>Mon, 30 Dec 2024 11:52:44 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved display logic in the SelectCell component to show the value
when no matching option is found.
- Updated test cases for the Select column type functionality to ensure
accurate verification of select options and display behavior when
options are not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-13 07:40:33 +01:00
..
Audio chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Button chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Camera chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Chart chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Checkbox chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
CodeScanner chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
CurrencyInput chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Custom chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Datepicker test: fixed datepicker skipped tests set 2 (#37126) 2024-11-05 17:11:02 +05:30
Divider chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
DocumentViewer chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Dropdown chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Filepicker chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Form chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Iframe fix: Fix iframe and widget test case for clicking (#38039) 2024-12-09 19:00:43 +05:30
Image chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Input chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
JSONForm chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
List chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
ListV2 feat: Enable new toolbar for cypress (#37148) 2024-12-03 09:21:43 +05:30
Modal chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Multiselect chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Others chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
PhoneInput chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Radio test: new test cases framework functions and Action selector (#37566) 2024-12-16 16:41:54 +05:30
Rating chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
RTE chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Select chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Sliders test: new test cases framework functions and Action selector (#37566) 2024-12-16 16:41:54 +05:30
Statbox chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Switch chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Tab test: fix tabs skipped test CE (#37023) 2024-10-25 21:21:57 +05:30
TableV1 chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
TableV2 fix: select column to display cell value when options are mismatched (#38387) 2025-01-13 07:40:33 +01:00
Text chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
TreeSelect chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Video chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Container_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
ContainerTest2_spec.ts chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
deprecatedWidgets_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Disabled_Widgets_drag_validation_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Migration_Spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Tab_reset_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
WidgetCanvas_spec.js test: Cypress - @tag.Video, @tag.Container, @tag.Switch, @tag.Slider, @tag.Tab, @tag.Table, @tag.Select (#29698) 2023-12-18 17:05:27 +05:30
WidgetCopyPaste_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
WidgetGrouping_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Widgets_Labels_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
WidgetSelection_spec.js chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30