PromucFlow_constructor/app/client/cypress
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
..
e2e test: fix Regression/ClientSide/ActionExecution/FrameworkFunctions_NavigateToFunctions_spec.ts (#41015) 2025-06-24 10:57:35 +05:30
fixtures ci: Fixing partial export spec (#40611) 2025-05-08 17:22:05 +05:30
locators fix: enable form login spec improvement (#40693) 2025-06-11 23:01:13 -07:00
patches
plugins chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
scripts ci: CI update for commitMsg (#39254) 2025-02-13 19:59:11 +05:30
snapshots/Regression/ClientSide fix: fix for js visual spec snapshots (#39154) 2025-02-10 19:41:52 +05:30
support fix: update assertion method in DebuggerHelper to use GetNAssertElementText (#40937) 2025-06-16 19:52:14 +05:30
.eslintrc.json chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
apply-patches.js chore: move local dependency to packages (#23395) 2023-05-22 15:55:46 +03:00
Dockerfile chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
index.ts test: Cypress | Cy 12 upgrade + Flaky fixes (#23852) 2023-06-15 18:51:11 +05:30
init-mssql-dump-for-test.sql test: Cypress - Automated basic tests for MsSQL DS (#21446) 2023-03-16 23:58:32 +05:30
init-mysql-dump-for-test.sql feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
init-pg-dump-for-test.sql
limited-tests.txt test: updated boolean spec (#39789) 2025-03-19 10:35:12 +05:30
setup-test-ci.sh chore: Logs and potential fix for CI startup flakiness (#34461) 2024-06-25 14:03:56 +05:30
tags.js chore: add tag for Airtable (#40870) 2025-06-12 11:10:24 +05:30
test.sh feat: Bundle optimization and first load improvements (#21667) 2023-05-11 10:56:03 +05:30
tsconfig.json chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
xataadd.sh ci: Comment failing tests to PR (#18450) 2022-12-19 16:23:39 +05:30
xatadel.sh ci: Comment failing tests to PR (#18450) 2022-12-19 16:23:39 +05:30