PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide
Rahul Barwal 7c00b6a229
test: fix Regression/ClientSide/ActionExecution/FrameworkFunctions_NavigateToFunctions_spec.ts (#41015)
## Description
<ins>Problem</ins>

After creating a widget, the page URL was updated. If the widget was
subsequently removed, navigating back from an external site (e.g.,
google.com) caused the app to fail in locating the widget, resulting in
out page selector being unable to open.

<ins>Root cause</ins>

1. Redundant URL assignment persisted after widget deletion, leading to
navigation errors and an inconsistent application state.
2. Additionally, on the fourth spec when we were adding a new action on
the button click, it already had a on click action defined which was
pointing to navigate to google. com and the new navigator we were adding
was getting up and down on top of that. So basically sometimes it was
preferring first navigation and sometimes it was preferring second
navigation.

<ins>Solution</ins>

1. This PR handles the removal of unnecessary URL assignment in the
navigation test, simplifying the test case and improving code clarity
and maintainability.
2. In this PR, we remove the first navigation by applying the onClick
property in a JS mode.

Fixes #`Issue Number`  
_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.JS"

### 🔍 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/15840445845>
> Commit: a42d60a18efca0b824fbd11127ce2b7f23c043cb
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15840445845&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Tue, 24 Jun 2025 04:12:33 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

- **Tests**
- Updated a navigation test case to remove an unnecessary URL assignment
step.
- Modified navigation verification to use a direct JavaScript expression
for improved accuracy.
- Cleaned up formatting by removing a trailing blank line between test
cases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 10:57:35 +05:30
..
ActionExecution test: fix Regression/ClientSide/ActionExecution/FrameworkFunctions_NavigateToFunctions_spec.ts (#41015) 2025-06-24 10:57:35 +05:30
AdminSettings feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
AIAgents chore: add a dummy test for aiagents (#39816) 2025-03-20 12:52:14 +05:30
Anvil chore: Update Anvil border radius test (#40103) 2025-04-07 12:45:34 +05:30
AppNavigation chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
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 chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
Binding chore: update select component (#38954) 2025-02-06 13:10:25 +05:30
Branding chore: Migrate Tenant to Organization (#38891) 2025-02-18 20:41:07 +05:30
BugTests chore: flaky tests fixed (#40931) 2025-06-12 14:49:00 +05:30
CodeComment chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
CommunityTemplate chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
Debugger feat: Trigger autocomplete even outside bindings (#39446) 2025-03-07 13:35:16 +05:30
DynamicHeight chore: removed old flags for airgap instances (#36609) 2024-10-07 15:26:25 +05:30
Editor test: Cypress - separated exclude airgap cases and tagged them (#30588) 2024-01-24 16:47:58 +05:30
EmbedSettings feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
ExplorerTests fix: Updating admin settings logic to fix issues on EE (#40135) 2025-04-08 00:41:02 +05:30
Fork test: analyse flaky fork test (#39531) 2025-03-24 10:56:42 +05:30
FormLogin fix: enable form login spec improvement (#40693) 2025-06-11 23:01:13 -07:00
FormNativeToRawTests fix: commands title changed to command for each datasource query editor forms (#32526) 2024-04-10 17:05:01 +05:30
Git test: commenting tests with open bug for delete branch (#39369) 2025-03-24 10:56:05 +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 fix: Blocking disconnection of the only connected auth method in admin settings (#40150) 2025-04-08 12:32:25 +05:30
Homepage chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +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
JSLibrary chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
JSObject fix: JSobject test fixed after generate crud issue fixes (#40954) 2025-06-17 12:42:54 +05:30
Linting feat: Enable new toolbar for cypress (#37148) 2024-12-03 09:21:43 +05:30
Login test: Sign in and Sign up cases (#39028) 2025-02-05 15:20:33 +05:30
MobileResponsiveTests chore: skipping cases for mockdb usage (#38888) 2025-01-30 11:47:38 +05:30
Onboarding chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
OneClickBinding chore: skipping cases for mockdb usage (#38888) 2025-01-30 11:47:38 +05:30
OtherUIFeatures chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
PartialImportExport ci: Fixing the page actions spec (#40328) 2025-04-22 11:35:14 +05:30
PeekOverlay feat: Inspect State CTA for discovery (#39100) 2025-02-14 21:57:08 +05:30
Performance chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
ProductRamps chore: rm dr ce (#34765) 2024-07-31 08:24:51 +05:30
PropertyPane fix: Revert "Revert "feat: Added focus ring for focus visible (#37700)" (#… (#38655) 2025-02-03 11:12:29 +05:30
PublishedApps ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
Refactoring chore: Removing the feature flag for using Entity Item component from ADS templates (#39093) 2025-03-14 17:40:02 +05:30
SetProperty ci: Fixing cypress tests that are failing due to the change from executeOnLoad to runBehavior (#40489) 2025-04-30 20:21:02 +05:30
SettingsPane chore: Added sanity and tags for blank tag specs (#36421) 2024-09-19 18:21:58 +05:30
Templates chore: git mod - test fixes (#38357) 2025-01-07 12:30:42 +01:00
ThemingTests chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30
UserProfile feat: Updating admin settings page as per new designs (#40101) 2025-04-07 15:44:20 +05:30
VisualTests fix: Checking fix working for js indent failure (#38382) 2024-12-27 08:43:46 +05:30
Widgets feat: Implement empty meta widget generation for handling empty data scenarios (#40886) 2025-06-20 09:39:51 +05:30
Workspace chore: Addding dependent tags (#36965) 2024-10-18 18:19:08 +05:30