PromucFlow_constructor/app/client/cypress/support/Pages
Rahul Barwal b4d5685d21
feat: integrates on page unload behavior with backend for deployed mode of the app (#41036)
## Description
**TLDR:** Adds support for executing page unload actions during
navigation in deployed mode, refactors related components, and improves
action handling.

<ins>Problem</ins>

Page unload actions were not triggered during navigation in deployed
mode, leading to incomplete workflows especially for cleanup.

<ins>Root cause</ins>

The application lacked integration for executing unload actions on page
transitions, and related components did not properly handle navigation
or action execution.

<ins>Solution</ins>

This PR handles the integration of page unload action execution during
navigation in deployed mode. It introduces selectors for unload actions,
refactors the MenuItem component for better navigation handling, and
improves the PluginActionSaga for executing plugin actions. Unused
parameters and functions are removed for clarity and maintainability.

Fixes #40997
_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/16021075820>
> Commit: f09e3c44d379488e43aec6ab27228d7675f79415
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16021075820&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 02 Jul 2025 10:21:00 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

* **New Features**
* Added support for actions that execute automatically when navigating
away from a page.
* Introduced new navigation logic and hooks for consistent page
transitions within the app.
  * Added new menu and dropdown components for improved navigation UI.

* **Bug Fixes**
* Updated navigation item styling and active state detection for
improved accuracy.

* **Tests**
* Added comprehensive tests for navigation sagas and page unload
actions.
  * Added unit tests for navigation menu components.

* **Chores**
  * Refactored and centralized navigation logic for maintainability.
* Improved type safety and selector usage in navigation and action
execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-02 18:40:44 +05:30
..
Anvil chore: export anvil locators (#39624) 2025-03-07 18:11:11 +05:30
AppSettings feat: integrates on page unload behavior with backend for deployed mode of the app (#41036) 2025-07-02 18:40:44 +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
AdminSettings.ts fix: enable form login spec improvement (#40693) 2025-06-11 23:01:13 -07:00
AggregateHelper.ts fix: Reverting the change to add debounce to onValueChange for input widgets (#40922) 2025-06-11 12:48:54 +00:00
ApiPage.ts chore: Updating the spelling for runBehaviour (#40490) 2025-05-02 17:58:26 +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 test: Add cypress tests for Hubspot Datasource functionalities (#39419) 2025-02-25 17:34:11 +05:30
DebuggerHelper.ts fix: update assertion method in DebuggerHelper to use GetNAssertElementText (#40937) 2025-06-16 19:52:14 +05:30
DeployModeHelper.ts fix: Fix for the embedded case (#38101) 2024-12-13 15:04:00 +05:30
EditorNavigation.ts chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
EntityExplorer.ts chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
FakerHelper.ts
GitSync.ts chore: update select component (#38954) 2025-02-06 13:10:25 +05:30
GSheetHelper.ts feat: Enable new toolbar for cypress (#37148) 2024-12-03 09:21:43 +05:30
HomePage.ts fix: Use Spring's native CSRF protection, and fix login page (#37292) 2025-03-08 21:01:02 +05:30
InviteModal.ts
JSEditor.ts chore: Updating the spelling for runBehaviour (#40490) 2025-05-02 17:58:26 +05:30
LibraryInstaller.ts
MultipleEnvironments.ts
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: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
PartialImportExport.ts test: adding test for page functionality (#38538) 2025-01-18 20:26:42 +05:30
PeekOverlay.ts feat: Inspect State CTA for discovery (#39100) 2025-02-14 21:57:08 +05:30
PluginActionForm.ts feat: Enable new toolbar for cypress (#37148) 2024-12-03 09:21:43 +05:30
PropertyPane.ts test: new test cases framework functions and Action selector (#37566) 2024-12-16 16:41:54 +05:30
Table.ts feat: reset table when infinite scroll is turned on (#40066) 2025-04-10 03:58:15 -07:00
Tabs.ts
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