test: common code change for Workflow tests (#35886)

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



<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10589609542>
> Commit: 27a55649d9f3cb398053fd68bfcecbbc96f6a694
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10589609542&attempt=3"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 28 Aug 2024 05:53:34 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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

## Summary by CodeRabbit

- **New Features**
- Enhanced user interface functionality by ensuring the application
waits for the button spinner to disappear before proceeding with
visibility assertions and onboarding.
  
- **Improvements**
- Improved user experience by reducing potential inconsistencies or
errors during the onboarding process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: NandanAnantharamu <nandan@normalyze.ai>
This commit is contained in:
NandanAnantharamu 2024-08-28 11:40:24 +05:30 committed by GitHub
parent c567b13e64
commit eec7b74c35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,6 +306,7 @@ export class HomePage {
this.agHelper.GetNClick(this._newButtonCreateApplication, 0, true);
this.AssertApplicationCreated();
if (skipSignposting) {
this.agHelper.WaitUntilEleDisappear(this.locator._btnSpinner);
AppSidebar.assertVisible();
this.agHelper.AssertElementVisibility(PageLeftPane.locators.selector);
this.onboarding.skipSignposting();