From b6cf348222a2cd375526c24de7b519bbf293f9f6 Mon Sep 17 00:00:00 2001 From: sneha122 Date: Tue, 30 Jan 2024 16:47:08 +0530 Subject: [PATCH] chore: fixed cypress sleep statement (#30743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR fixes cypress test statement of agHelper.Sleep() added in PR: https://github.com/appsmithorg/appsmith/pull/30720 #### PR fixes following issue(s) Fixes # (issue number) > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed ## Summary by CodeRabbit - **Tests** - Improved the reliability of the onboarding tests by replacing sleep timers with network status assertions. Co-authored-by: “sneha122” <“sneha@appsmith.com”> --- .../e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts index 8948691521..128df81e4c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Onboarding/StartFromData_spec.ts @@ -26,7 +26,7 @@ describe( }); it("1. onboarding flow - create datasource and save, it should take me to datasource page with view mode", function () { - agHelper.Sleep(1000); + assertHelper.AssertNetworkStatus("@getPlugins"); dataSources.CreateDataSource("Postgres", false); dataSources.selectTabOnDatasourcePage("View data"); agHelper.TypeText(dataSources._datasourceStructureSearchInput, "users");