PromucFlow_constructor/app/client/cypress/support/Pages
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
..
AppSettings test: Cypress | Replace static waits from Helpers + Flaky fixes (#29856) 2024-01-05 11:42:03 +05:30
IDE feat: revamped logic for tabs removal and action/JS deletion (#32690) 2024-04-19 12:19:24 +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: Cypress | Flaky fixes (#31270) 2024-02-27 14:25:33 +05:30
AnvilLayout.ts chore: RMVF based changes for DnD, Modals, and Space distribution. (#31980) 2024-04-05 11:16:07 +05:30
ApiPage.ts chore: added new test cases for different plugins (#31068) 2024-02-13 17:19:13 +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 feat: community templates UI (#27302) 2023-09-25 11:57:23 +05:30
DataSources.ts fix: connection mode hidden from mysql form config (#32487) 2024-04-10 12:34:04 +05:30
DebuggerHelper.ts fix: api error update full error object instead of only defined keys (#27316) 2023-09-20 16:12:43 +05:30
DeployModeHelper.ts test: Cypress | Replacing some external api's with TED + Flaky fix (#31118) 2024-02-23 13:18:01 +05:30
EditorNavigation.ts fix: action selector create flow (#32326) 2024-04-05 11:28:47 +05:30
EntityExplorer.ts chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +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 fix: adding branch protection callout (#32707) 2024-04-18 15:13:51 +05:30
GSheetHelper.ts test: Gsheet Automation (#25255) 2023-07-26 18:56:24 +05:30
HomePage.ts fix: asserting getApplicationsOfWorkspace call before clicking skip (#32311) 2024-04-03 11:01:05 +05:30
InviteModal.ts test: Cypress | SetWidget property validations + CI Stabilize (#28626) 2023-11-06 15:18:00 +05:30
JSEditor.ts fix: deprecate JS object confirm before calling (#32527) 2024-04-12 12:18:14 +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 chore: Make pages section into a dropdown (#32486) 2024-04-18 16:04:38 +05:30
PartialImportExport.ts chore: Add cypress specs for partial import and export functionality (#30166) 2024-01-17 11:20:01 +05:30
PeekOverlay.ts feat: peek overlay nested properties + perf improvements (#23414) 2023-05-26 17:12:10 +05:30
PropertyPane.ts feat: show slash command prompt on focus in property pane (#31920) 2024-03-22 15:14:08 +05:30
Table.ts feat: Frontend changes for consolidated-api with EE test case support (#30506) 2024-01-24 12:14:16 +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