From fa0eda6229d873b9a140dd017e2037e6d77eb8b0 Mon Sep 17 00:00:00 2001 From: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Date: Mon, 12 Feb 2024 20:07:58 +0530 Subject: [PATCH] test: Cypress | Replacing external user api with TED mock api in OnLoadActions_Spec.ts (#31029) ## Description - This PR replaced external user api with TED mock api in ServerSide/OnLoadTests/OnLoadActions_Spec.ts #### Type of change - Script fix (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [X] Cypress CI runs ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed ## Summary by CodeRabbit - **New Features** - Added dynamic API URL handling in tests for more flexible test configurations. - Enhanced Right-to-Left (RTL) support testing for the Select Widget. - **Enhancements** - Improved test reliability by asserting element visibility and existence in various commands and methods. - Streamlined the login and logout process in tests by optimizing command implementations. - **Bug Fixes** - Fixed issues with test setup by removing unnecessary timeouts and refresh calls, enhancing test execution speed and reliability. - **Refactor** - Updated Cypress tests to toggle between running limited tests and all specs more efficiently. - Removed deprecated timeout parameters in favor of more reliable element visibility checks. --- .../Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts | 3 ++- app/client/cypress/support/Pages/HomePage.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts index 35cd9dc65b..3c59c6fade 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts @@ -2,6 +2,7 @@ import { agHelper, apiPage, assertHelper, + dataManager, deployMode, entityExplorer, entityItems, @@ -49,7 +50,7 @@ describe( //apiPage.RunAPI(); apiPage.CreateAndFillApi( - "https://randomuser.me/api/", + dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl, "RandomUser", 30000, ); diff --git a/app/client/cypress/support/Pages/HomePage.ts b/app/client/cypress/support/Pages/HomePage.ts index b7e4e4bb11..1135766b26 100644 --- a/app/client/cypress/support/Pages/HomePage.ts +++ b/app/client/cypress/support/Pages/HomePage.ts @@ -354,7 +354,6 @@ export class HomePage { }).then((response) => { expect(response.status).equal(200); //Verifying logout is success }); - this.agHelper.CypressReload(); } public Signout(toNavigateToHome = true) {