PromucFlow_constructor/app/client/cypress/support/Pages
Rahul Barwal 6c8d4a9a66
fix: Fixes currentRow calculation logic in table(property pane) (#35390)
## Description

<ins>Problem</ins>
`currentRow` variable which is availabe in property pane of col settings
- is not getting correct value during runtime if the table is sorted or
filtered.

<ins>Root cause</ins> 
* We are considering `processedTableData` to get the `currentRow`.
* This property is not updated during filtering and sorting, another
property `filteredTableData` is updated instead.
* We CANNOT use `filteredTableData` as it depends on `primaryColumns`
property which we intend to update as well - this is leading to cyclic
dependency during evaluations.

<ins>Solution</ins>
Since the problem is related to edit cases and given the constraints
around using `filteredTableData` directly, we fixed the problem by
adding a new property to `editableCellValue` object called
`__originalIndex__`.
* This property stores the index of the row being edited in
`processedTableData`
* On top of this change, the PR adds a migration for updating the
current row binding in TableWidgetV2, ensuring accurate current row
calculation and improving the functionality of the widget.
* We also added unit test for migration changes.
* Additionally, This pull request refactors the DSLs for TableWidgetV2
migration test cases to update the DSLs to separate folder, drastically
reducing the file size to its core logic, improving the readability of
the code.
 * We also updated relevant test cases to account for this change.

[Testing
plan](https://www.notion.so/appsmith/Issue-34346-currentRow-doesn-t-work-correctly-when-the-table-is-filtered-449225ae822c485493036599c2b19487)
[Counter part EE
pr](https://github.com/appsmithorg/appsmith-ee/pull/4879)

Fixes #34346
_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.All"

### 🔍 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/10451549845>
> Commit: d1d65c6898c223bf3f6dfbfe93b8e8de214fcc7d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10451549845&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 19 Aug 2024 11:15:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **New Features**
- Updated DSL migration process to support version 90, enhancing
compatibility and robustness.
- Introduced new migration logic for table widget data bindings,
improving inline editing capabilities.
- Enhanced validation logic for editable cells in table widgets,
allowing for more dynamic data handling.
- Added a method to discard edits in specific table cells, improving
user interaction.
- Introduced a new message constant for required fields, enhancing user
feedback.

- **Bug Fixes**
- Improved validation checks for table cells based on updated indices
and values.

- **Tests**
- Added comprehensive tests to validate migration functions related to
Table Widget, ensuring all aspects function correctly post-update.
- Enhanced test specifications for improved validation logic and
coverage in table widget functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: sneha122 <sneha@appsmith.com>
2024-08-20 13:31:45 +05:30
..
Anvil chore: Anvil on canvas UI tests (#35342) 2024-08-12 23:55:55 +05:30
AppSettings test: Extract pageId with regex to cover more cases (#34521) 2024-07-02 06:31:59 +05:30
IDE test: increased timeout for Sidebar (#35013) 2024-07-18 12:59:50 +05:30
AdminSettings.ts chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
AggregateHelper.ts test: updated helper for airgap view permission (#35627) 2024-08-12 21:36:27 +05:30
ApiPage.ts feat: cURL import now happens via a modal (#34830) 2024-07-10 14:22:39 +05:30
AssertHelper.ts test: Cypress | Downgrade Cypress to 13.5.1 (#31011) 2024-02-09 13:33:30 +05:30
AutoLayout.ts fix: missing methods in gitexecutorceimpl (#32614) 2024-04-12 06:21:01 +05:30
Canvas.ts chore: cypress test for canvas view mode (#32354) 2024-04-03 14:52:09 +05:30
CommunityTemplates.ts fix: default port numbers for the datasources (#32901) 2024-04-30 13:15:11 +05:30
DataSources.ts fix: Update datasource deletion message for clarity (#34822) 2024-07-11 19:42:27 +05:30
DebuggerHelper.ts feat: Collapsible Bottom View (#33441) 2024-05-22 19:43:07 +05:30
DeployModeHelper.ts chore: tests for wds button widget (#34242) 2024-06-20 18:30:16 +05:30
EditorNavigation.ts fix: action selector create flow (#32326) 2024-04-05 11:28:47 +05:30
EntityExplorer.ts fix: replaced all edit name with Rename (#34570) 2024-07-17 08:49:44 +05:30
FakerHelper.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
GitSync.ts test: updated flow for GitSync (#34239) 2024-06-28 10:29:12 +05:30
GSheetHelper.ts test: Gsheet Automation (#25255) 2023-07-26 18:56:24 +05:30
HomePage.ts test: added a validation post fork (#34857) 2024-07-15 17:32:17 +05:30
InviteModal.ts test: Cypress | SetWidget property validations + CI Stabilize (#28626) 2023-11-06 15:18:00 +05:30
JSEditor.ts fix: replaced all edit name with Rename (#34570) 2024-07-17 08:49:44 +05:30
LibraryInstaller.ts chore: App Sidebar testing (#28479) 2023-11-15 08:01:12 +05:30
MultipleEnvironments.ts chore: Multiple Env code split for 1-click (#27275) 2023-09-29 16:16:24 +05:30
Onboarding.ts chore: removed onboarding flags ab_create_new_apps_enabled , ab_start_with_data_default_enabled (#31384) 2024-03-15 11:13:14 +05:30
PageList.ts test: GitSyncedApps_spec - multiple IA changes (#33257) 2024-05-10 15:34:40 +05:30
PartialImportExport.ts chore: unified way of writing messages in cypress (#33659) 2024-05-27 15:34:45 +02:00
PeekOverlay.ts feat: peek overlay nested properties + perf improvements (#23414) 2023-05-26 17:12:10 +05:30
PropertyPane.ts fix: collapse params & query params in action selector if value is not changed (#35323) 2024-08-02 15:01:18 +05:30
Table.ts fix: Fixes currentRow calculation logic in table(property pane) (#35390) 2024-08-20 13:31:45 +05:30
Tabs.ts test: added tests for Tabs (#27765) 2023-10-05 09:34:41 +05:30
Templates.ts chore: Add spec for create new app from template (#31311) 2024-02-28 14:42:35 +05:30
WDSWidgets.ts fix: Anvil toggleable widgets not working when native callbacks are used for AnvilFlexComponent (#31125) 2024-02-15 11:00:57 +05:30