PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide
Jacques Ikot 2cded02983
feat: display label in table select cell (#35124)
## Description
**Issue**
In the table widget, the select column currently displays the value from
the dropdown when a user makes a selection, rather than the label. This
behaviour is inconsistent with the standalone select widget, which
correctly renders the label upon selection.

**Fix**
This PR addresses the inconsistency by modifying the table widget's
select column to display the label of the selected item, while
maintaining the table cell value and ensuring alignment with the
behaviour of the standalone select widget.

**Tested Cases**
Manual Test Cases for Table Select Widget Improvement

1. Default Value Display
**Objective:** Ensure that a new table displays the correct default
label key from the selectOptions in the cell.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Verify that the table cell displays the value from the label key of
the `selectOptions` by default.

2. Binding Check for Selected Row
**Objective:** Ensure that the table binding for the selected row
reflects the correct value key from the selectOptions.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Select a row and verify that `Table1.selectedRow.gender` matches the
value key from the `selectOptions`.

3. Updating Table Cell Content
**Objective:** Verify that updating the table cell content via the
dropdown updates the cell with the correct label key property.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Change the content of the table cell using the dropdown.
- Confirm that the cell content updates accordingly with the value key
property.

4. Add New Row Functionality
**Objective:** Ensure that adding a new row works as expected with the
enhanced functionality.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Add a new row to the table.
- Verify that the new row uses the label key property from the
`selectOptions` in the table display.

5. Deployed Mode Verification
**Objective:** Verify that the display functionality works correctly in
deployed mode.
**Steps:**
- Drop a new table widget.
- Add sample data to the table.
- Set a column (e.g., gender) to select type.
- Change the displayAs property to both value and label.
- Deploy the table.
- Verify that the table displays correctly in both value and label modes
in the deployed environment.


Fixes #26188

## Automation

/ok-to-test tags="@tag.Table, @tag.Binding, @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/10080592979>
> Commit: 78b268d2b566aa07ef23fec567ce05e8c5a6add4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10080592979&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Binding, @tag.Sanity`
> Spec:
> <hr>Wed, 24 Jul 2024 17:17:06 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

- **New Features**
- Improved display of selected options in table widgets by showing the
corresponding label instead of the raw value.
- Introduced a feature flag to toggle the table cell label value
functionality.

- **Bug Fixes**
- Enhanced test cases to ensure accurate validation of select options
behavior within the table widget.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-25 12:39:24 +01:00
..
ActionExecution feat: added modal name, lint warning for string, action selector modal (#32893) 2024-05-02 17:48:53 +05:30
AdminSettings chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
Anvil chore: add tests for app theming (#34839) 2024-07-22 22:08:48 +03:00
AppNavigation test:PartialExport_Widgets spec file updated and import app method updated with validations (#33343) 2024-05-10 19:20:40 +05:30
AuditLogs chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
Autocomplete fix: expose isVisible field in JSONFom widget autocomplete (#34869) 2024-07-17 10:54:23 +05:30
Binding test: replace togglebarDisable with CheckUncheck (#34069) 2024-06-10 19:55:17 +05:30
Branding test: Updating the locator for upgrade button on admin settings (#33872) 2024-05-31 21:07:28 +05:30
BugTests feat: Refactor SelectWidget sourceData handling (#34619) 2024-07-03 13:31:35 +05:30
CodeComment test: Cypress - added tag - @tag.AutoHeight, @tag.IDE (#29670) 2023-12-18 12:45:44 +05:30
CommunityTemplate fix: default port numbers for the datasources (#32901) 2024-04-30 13:15:11 +05:30
Debugger fix: property navigation spec (#32782) 2024-04-19 13:09:20 +05:30
DynamicHeight test: Updated file name for remove duplicate (#34821) 2024-07-12 10:07:17 +05:30
Editor test: Cypress - separated exclude airgap cases and tagged them (#30588) 2024-01-24 16:47:58 +05:30
EmbedSettings test: Cypress | Added Dynamic checks for Flaky fix + Cypress upgrade (#30840) 2024-02-02 16:01:59 +05:30
ExplorerTests fix: Remove collapsed widget tags (#34979) 2024-07-23 18:46:01 +05:30
Fork test: Use deep.eq for comparing DSLs (#34523) 2024-06-27 13:17:49 +05:30
FormLogin test: Remove pause from code (#34798) 2024-07-10 11:54:40 +05:30
FormNativeToRawTests fix: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
Git test: fixed failing GitImport test (#34589) 2024-07-15 15:34:59 +05:30
Github chore: Updating the login and signup page for cloud hosting as per new design (#32641) 2024-04-17 21:46:44 +05:30
Google chore: Updating the login and signup page for cloud hosting as per new design (#32641) 2024-04-17 21:46:44 +05:30
Homepage feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
IDE fix: Overflow list new UI restore (#34658) 2024-07-05 11:55:29 +05:30
JSLibrary feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
JSObject test: fix JsObjectMutation flaky test (#32936) 2024-04-26 18:19:22 +05:30
Linting fix: show linting errors on browser API added (#32732) 2024-04-18 18:49:15 +05:30
MobileResponsiveTests test: updated tests with aghelper table methods (#33737) 2024-05-31 14:01:06 +05:30
Onboarding chore: Remove unnecessary flag ab_show_templates_instead_of_blank_canvas_enabled (#33313) 2024-05-13 09:32:00 +05:30
OneClickBinding test: Updated file name for remove duplicate (#34821) 2024-07-12 10:07:17 +05:30
OtherUIFeatures feat: cURL import now happens via a modal (#34830) 2024-07-10 14:22:39 +05:30
PartialImportExport test: PartialExport_Widgets_spec - updated test validation logic (#33371) 2024-05-21 18:40:02 +05:30
PeekOverlay feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
Performance feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
ProductRamps test: replace LogintoApp with LoginFromAPI (#34040) 2024-06-14 20:52:49 +05:30
PropertyPane test: Cypress - added tags - @tag.JS, @tag.Perf, @tag.Settings, @tag.PropertyPane, @tag.Theme (#29682) 2023-12-18 17:18:23 +05:30
PublishedApps test: Cypress - added tags - @tag.JS, @tag.Perf, @tag.Settings, @tag.PropertyPane, @tag.Theme (#29682) 2023-12-18 17:18:23 +05:30
Refactoring feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
SetProperty chore: Add evalTreeWithDiff to evalWorkerAction (#34403) 2024-06-27 12:08:53 +05:30
SettingsPane test: Fix page name test (#32825) 2024-04-19 17:59:03 +05:30
Templates chore: Remove empty canvas prompts and improve widget editor header (#33993) 2024-06-06 14:29:41 +05:30
ThemingTests test:replace assertPageSave with AssertAutoSave (#33972) 2024-06-06 13:11:03 +05:30
UserProfile feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
VisualTests test: Failing cypress tests due to removal of empty canvas prompts (#34037) 2024-06-07 15:24:07 +05:30
Widgets feat: display label in table select cell (#35124) 2024-07-25 12:39:24 +01:00
Workspace test: replace LogintoApp with LoginFromAPI (#34040) 2024-06-14 20:52:49 +05:30