PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide/Templates
Sagar Khalasi c44c35609c
fix: Fixed flaky fork template test case (#36200)
## Description
Root Cause Analysis (RCA):
The issue stemmed from the use of hardcoded templates in our tests,
which introduced inherent flakiness. This approach caused intermittent
failures, particularly when the hardcoded template was not available or
had changed.

Solution:
I have resolved this by implementing dynamic locators that select the
first available template during the test execution. This ensures greater
stability and reduces flakiness. The only scenario where this approach
could fail is if no templates are available, which would be a
product-level blocker rather than a test issue.


Fixes #`36199`  

## Automation

/ok-to-test tags="@tag.Templates"

### 🔍 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/10775279036>
> Commit: be8fc879c21fa90b7083e52d4cde52439f8f5546
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10775279036&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Templates`
> Spec:
> <hr>Mon, 09 Sep 2024 14:51:58 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved reliability of the template forking test by updating element
selectors and streamlining navigation steps.
- Enhanced test coverage by adding a step for generating a page with
data.

- **Chores**
- Renamed test specification file to better reflect its focus on
application-level testing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 15:29:02 +05:30
..
Filtering feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
CreateNewAppFromTemplates_spec.ts chore: Add spec for create new app from template (#31311) 2024-02-28 14:42:35 +05:30
Fork_Template_Existing_app_spec.js test: Cypress | Helpers improved + Flaky fixes (#30735) 2024-02-01 16:42:53 +05:30
Fork_Template_To_App_spec.ts fix: Fixed flaky fork template test case (#36200) 2024-09-10 15:29:02 +05:30
ForkTemplateToGitConnectedApp.js chore: Remove empty canvas prompts and improve widget editor header (#33993) 2024-06-06 14:29:41 +05:30
TemplatesPage_spec.ts feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30