PromucFlow_constructor/app/client/cypress/support
albinAppsmith 5a671807a3
feat: revamped logic for tabs removal and action/JS deletion (#32690)
## Description

This PR has changed the logic of next item selection after deleting an
item or removing a tab.
The new logic is
1. If there is no more tabs left after removal of current item, navigate
to first item from all items list
2. If all items list is empty, navigate to add
3. If the removed tab is not currently selected, no redirection required
just close the tab
4. If removed tab is in 0th position, redirect to current tab + 1
5. if removed tab is not in 0th position, redirect to tab - 1

Fixes #32634  

## Automation

/ok-to-test tags="@tag.Sanity, @tag.IDE"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8748435770>
> Commit: e3e9b51cc9a708fadf4d1b9f0e426b63e9f3c10a
> Cypress dashboard: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8748435770&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank"> Click here!</a>
> The following are new failures, please fix them before merging the PR:
<ol>
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js
> <li>cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js
</ol>
> To know the list of identified flaky tests - <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">Refer here</a>

<!-- end of auto-generated comment: Cypress test results  -->








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

- **New Features**
- Improved the closing functionality for JavaScript and query action
tabs in the IDE, enhancing user experience with smoother tab management.

- **Refactor**
- Aligned sagas and reducers with new action types for improved handling
of tab closures and entity redirects within the IDE.

- **Tests**
- Updated test cases to reflect changes in IDE saga functions and logic,
ensuring reliability and consistency in behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-19 12:19:24 +05:30
..
ee chore: code splitting for multiple env feature (#25479) 2023-07-21 12:53:17 +07:00
Objects chore: Make Editor Pane Segments GA (#32712) 2024-04-18 10:05:34 +05:30
Pages feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
AdminSettingsCommands.js chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
ApiCommands.js chore: removed onboarding flags ab_create_new_apps_enabled , ab_start_with_data_default_enabled (#31384) 2024-03-15 11:13:14 +05:30
commands.js fix: Updating the ramp link for Enterprise features to open the pricing page (#32698) 2024-04-16 19:05:07 +05:30
Constants.js chore: Anvil cypress tests (#30580) 2024-01-31 11:02:38 +05:30
dataSourceCommands.js fix: reverting the default port numbers for the datasources (#32726) 2024-04-17 13:44:18 +05:30
e2e.js feat: Frontend changes for consolidated-api with EE test case support (#30506) 2024-01-24 12:14:16 +05:30
gitSync.js chore: remove git release feature flags (#30962) 2024-02-09 10:22:47 +05:30
index.d.ts chore: cypress test for canvas view mode (#32354) 2024-04-03 14:52:09 +05:30
queryCommands.js test: Cypress | Flaky fixes + Replacing static waits (#30067) 2024-01-12 12:00:12 +05:30
RapidMode.ts
themeCommands.js
timeout.js
widgetCommands.js chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
WorkspaceCommands.js test: Cypress | Helpers improved + Flaky fixes (#30735) 2024-02-01 16:42:53 +05:30