PromucFlow_constructor/app/client
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
..
.husky chore: adds depandabot.yml (#40521) 2025-05-01 05:44:04 +00:00
.yarn
config fix: Suppress webpack-dev-server ResizeObserver loop development runtime error (#40968) 2025-06-18 11:16:53 +05:30
cypress test: fix Regression/ClientSide/ActionExecution/FrameworkFunctions_NavigateToFunctions_spec.ts (#41015) 2025-06-24 10:57:35 +05:30
docker/templates
generators chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
packages chore: add workflows setting for agents CE (#40988) 2025-06-19 18:44:22 +05:30
public chore: add maximum-scale to avoid zoom on inputs in iOS (#40171) 2025-04-08 19:16:31 +05:30
scripts fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
src feat: Adding core logic for Reactive Actions in Post evaluations flow (#40963) 2025-06-23 20:00:42 +05:30
test chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
typings
.babelrc chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
.dockerignore
.editorconfig
.eslintrc.base.json
.eslintrc.js
.fork-ts-checkerrc
.gitignore
.lintstagedrc.json chore: update import of AppState to DefaultReduxState (#40494) 2025-05-01 15:53:37 +05:30
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh fix: sourcemaps (#39301) 2025-02-16 20:05:50 +03:00
cypress_ci_custom.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci_hosted.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress-add-tags.js
cypress.config.ts
download-assets.js
jest.config.js fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
knip.json chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
package.json fix: upgrade tinymce to latest MIT licensed version (#41003) 2025-06-20 16:02:25 +05:30
README.md
README.old.md
start-caddy.sh
start-https.sh chore: convert consolidated api etag to a weak one (#38939) 2025-01-31 16:35:20 +05:30
tailwind.config.js
tsconfig.json
tsconfig.path.json
vercel.json
yarn.lock fix: upgrade tinymce to latest MIT licensed version (#41003) 2025-06-20 16:02:25 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide