PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide
Rahul Barwal d64361e225
fix: Refactor validation logic in TableWidgetV2 to improve clarity and correctness (#40679)
## Description
<ins>Problem</ins>

The table widget skipped validations for number columns when users typed
quickly and pressed Enter, accepting invalid values despite min/max
constraints.

<ins>Root cause</ins>

The validation logic had an early exit if the value was empty and the
column wasn't required. This incorrectly allowed empty values even when
min/max constraints were set. Due to async evaluations and timing
differences, a quick backspace followed by a new input and Enter led to
premature validation success.

<ins>Solution</ins>

This PR handles a refactor of the validation logic in `TableWidgetV2` to
improve clarity and correctness.
- Consolidates checks for required fields and regex validations.  
- Ensures column type validations accurately reflect constraints like
min/max.
- Prevents premature validation passes caused by async evaluation race
conditions.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Table"

### 🔍 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/15160290045>
> Commit: b3022119656954765a79b1e03c5af2a4338a89c4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15160290045&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Wed, 21 May 2025 11:35:27 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**
- Enhanced validation for editable table cells to better enforce
required fields and regex patterns.
- Improved handling of empty values in required and non-required cells
for more accurate validation feedback.
- **Tests**
- Refactored and reorganized validation test suites for improved clarity
and maintainability without changing validation behavior.
- Updated end-to-end tests to improve timing and synchronization by
removing fixed waits and relying on automatic retries.
- Adjusted inline editing validation tests to reflect updated error
visibility expectations during editing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-21 18:45:24 +05:30
..
ActionExecution ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
AdminSettings feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
AIAgents chore: add a dummy test for aiagents (#39816) 2025-03-20 12:52:14 +05:30
Anvil chore: Update Anvil border radius test (#40103) 2025-04-07 12:45:34 +05:30
AppNavigation chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +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 chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
Binding chore: update select component (#38954) 2025-02-06 13:10:25 +05:30
Branding chore: Migrate Tenant to Organization (#38891) 2025-02-18 20:41:07 +05:30
BugTests ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
CodeComment chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
CommunityTemplate chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Debugger feat: Trigger autocomplete even outside bindings (#39446) 2025-03-07 13:35:16 +05:30
DynamicHeight chore: removed old flags for airgap instances (#36609) 2024-10-07 15:26:25 +05:30
Editor test: Cypress - separated exclude airgap cases and tagged them (#30588) 2024-01-24 16:47:58 +05:30
EmbedSettings feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
ExplorerTests fix: Updating admin settings logic to fix issues on EE (#40135) 2025-04-08 00:41:02 +05:30
Fork test: analyse flaky fork test (#39531) 2025-03-24 10:56:42 +05:30
FormLogin fix: Blocking disconnection of the only connected auth method in admin settings (#40150) 2025-04-08 12:32:25 +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: commenting tests with open bug for delete branch (#39369) 2025-03-24 10:56:05 +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 fix: Blocking disconnection of the only connected auth method in admin settings (#40150) 2025-04-08 12:32:25 +05:30
Homepage chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
IDE chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
JSLibrary chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
JSObject ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
Linting feat: Enable new toolbar for cypress (#37148) 2024-12-03 09:21:43 +05:30
Login test: Sign in and Sign up cases (#39028) 2025-02-05 15:20:33 +05:30
MobileResponsiveTests chore: skipping cases for mockdb usage (#38888) 2025-01-30 11:47:38 +05:30
Onboarding chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
OneClickBinding chore: skipping cases for mockdb usage (#38888) 2025-01-30 11:47:38 +05:30
OtherUIFeatures chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
PartialImportExport ci: Fixing the page actions spec (#40328) 2025-04-22 11:35:14 +05:30
PeekOverlay feat: Inspect State CTA for discovery (#39100) 2025-02-14 21:57:08 +05:30
Performance chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
ProductRamps chore: rm dr ce (#34765) 2024-07-31 08:24:51 +05:30
PropertyPane fix: Revert "Revert "feat: Added focus ring for focus visible (#37700)" (#… (#38655) 2025-02-03 11:12:29 +05:30
PublishedApps ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
Refactoring chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
SetProperty ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
SettingsPane chore: Added sanity and tags for blank tag specs (#36421) 2024-09-19 18:21:58 +05:30
Templates chore: git mod - test fixes (#38357) 2025-01-07 12:30:42 +01:00
ThemingTests chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
UserProfile feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
VisualTests fix: Checking fix working for js indent failure (#38382) 2024-12-27 08:43:46 +05:30
Widgets fix: Refactor validation logic in TableWidgetV2 to improve clarity and correctness (#40679) 2025-05-21 18:45:24 +05:30
Workspace chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30