PromucFlow_constructor/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests
sneha122 322c05ec46
chore: updated actions fetch logic for consolidated view api (#36096)
## Description
This PR introduces a couple of improvements to the actions part of the
consolidated view API.
- With current implementation, we call consolidated view API only once
during page load and fetch all of the resources at once. This can be a
problem for a heavy app which has more than 500 actions, in this case
fetching all published actions takes a sizeable amount of time. This PR
introduces an improvement where we don't fetch all actions of an
application at once, instead we fetch all actions of the current page
and whenever user switches to different page, we call the consolidated
view API again to fetch actions of the switched page. This way we can
reduce the time taken by consolidated view API's action part performant
by 5-10x.

- With this new implementation, we use the basePageId passed to the
consolidated view API and use that to fetch actions belonging to a page,
there are two possibilities here:
- If the app is not connected, basePageId can be used directly to fetch
actions of a page
- If app is git connected, first we need to fetch the pageId based on
basePageId and branchName, then use that pageId to fetch actions
belonging to the current page and branch name.


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.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/10722112357>
> Commit: a725de6d3b82c6aaf8094e8962109635e7cb2a2b
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10722112357&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 05 Sep 2024 15:19:53 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

## Summary by CodeRabbit

- **New Features**
- Introduced functionality to fetch actions specifically for pages,
enhancing action management.
- Improved action retrieval logic to focus on page-specific actions,
streamlining user experience.
- Added a new saga for fetching published page resources, enhancing data
management capabilities.

- **Bug Fixes**
- Enhanced error handling for action fetching to ensure better user
feedback during failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-09-06 13:19:08 +05:30
..
APIOnLoad_Spec.ts fix: Fall of the error toasts wall (#35839) 2024-09-05 11:06:43 +05:30
ExecuteAction_Spec.ts chore: updated actions fetch logic for consolidated view api (#36096) 2024-09-06 13:19:08 +05:30
JSOnLoad_cyclic_dependency_errors_spec.js test:replace assertPageSave with AssertAutoSave (#33972) 2024-06-06 13:11:03 +05:30
JSOnLoad2_Spec.ts fix: Fall of the error toasts wall (#35839) 2024-09-05 11:06:43 +05:30
JsOnLoad3_Spec.ts chore: remove commented code from @tag.JS specs (#32957) 2024-05-02 13:47:19 +05:30
JSOnLoad4_Spec.ts fix: deprecate JS object confirm before calling (#32527) 2024-04-12 12:18:14 +05:30
OnLoadActions_Spec.ts test: Fix extracing pageId from app page URL (#34401) 2024-06-22 18:33:29 +05:30
PostgresConnections_spec.ts feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30