PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide
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
..
ActionExecution fix: appsmith.URL.queryParams update on same page navigation (#32382) 2024-04-09 16:01:17 +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: Merge wds and anvil feature flags (#32609) 2024-04-12 22:54:04 +05:30
AppNavigation
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: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
Binding chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
Branding chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +05:30
BugTests fix: removed success toast message for onload js functions (#32700) 2024-04-18 18:19:33 +05:30
CodeComment
CommunityTemplate
Debugger chore: removed config logs from debugger (#32049) 2024-03-26 14:10:22 +05:30
DynamicHeight test: Cypress | Text_With_Different_Size_spec.ts re-write + Flaky fixes (#30445) 2024-02-08 16:55:58 +05:30
Editor
EmbedSettings
ExplorerTests chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
Fork fix: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
FormLogin chore: Make edit launch buttons as links & add upgrade ramps for session timeout setting (#31862) 2024-03-21 15:37:13 +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 chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +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
IDE feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +05:30
JSLibrary
JSObject
Linting fix: show linting errors on browser API added (#32732) 2024-04-18 18:49:15 +05:30
MobileResponsiveTests chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
Onboarding chore: removed onboarding flags ab_create_new_apps_enabled , ab_start_with_data_default_enabled (#31384) 2024-03-15 11:13:14 +05:30
OneClickBinding chore: create action source instrumentation added (#31585) 2024-03-11 10:22:24 +05:30
OtherUIFeatures chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
PartialImportExport test: Cypress | Text_With_Different_Size_spec.ts re-write + Flaky fixes (#30445) 2024-02-08 16:55:58 +05:30
PeekOverlay
Performance
ProductRamps
PropertyPane
PublishedApps
Refactoring
SetProperty
SettingsPane
Templates fix: widget card filter (#32420) 2024-04-09 10:38:01 +01:00
ThemingTests chore: Remove "Save theme" functionality (#31481) 2024-03-12 18:54:39 +05:30
UserProfile
VisualTests fix: broken line in page settings (#30951) 2024-02-12 13:12:19 +05:30
Widgets test: updated tests by replacing external APIs (#32718) 2024-04-18 19:01:46 +05:30
Workspace chore: Removing partner program callout from invite modal (#31576) 2024-03-07 13:20:51 +05:30