diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/UpdateApplication_spec.js b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/UpdateApplication_spec.js index 0fa71f02dd..706334ea08 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/UpdateApplication_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/UpdateApplication_spec.js @@ -15,11 +15,13 @@ describe("Update Application", () => { appname = localStorage.getItem("appName"); cy.get(homePage.searchInput).clear(); - cy.get(homePage.searchInput).type(workspaceName); + cy.get(homePage.searchInput).click().type(workspaceName); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appMoreIcon).first().click({ force: true }); - cy.get(homePage.applicationName).type(`${appname} updated` + "{enter}"); + cy.get(homePage.applicationName) + .click() + .type(`${appname} updated` + "{enter}"); cy.wait("@updateApplication").should( "have.nested.property", "response.body.responseMeta.status", @@ -45,7 +47,7 @@ describe("Update Application", () => { it("3. Check for errors in updating application name", () => { cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(homePage.searchInput).clear(); - cy.get(homePage.searchInput).type(workspaceName); + cy.get(homePage.searchInput).click().type(workspaceName); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.applicationCard).first().trigger("mouseover"); @@ -55,14 +57,16 @@ describe("Update Application", () => { cy.wait(2000); cy.AppSetupForRename(); - cy.get(homePage.applicationName).type(" "); + cy.get(homePage.applicationName).click().type(" "); cy.get(homePage.toastMessage).should( "contain", "Application name can't be empty", ); cy.AppSetupForRename(); - cy.get(homePage.applicationName).type(" " + "{enter}"); + cy.get(homePage.applicationName) + .click() + .type(" " + "{enter}"); cy.wait("@updateApplication").should( "have.nested.property", "response.body.data.name", @@ -76,7 +80,9 @@ describe("Update Application", () => { // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.appMoreIcon).first().click({ force: true }); - cy.get(homePage.applicationName).type(veryLongAppName + "{enter}"); + cy.get(homePage.applicationName) + .click() + .type(veryLongAppName + "{enter}"); agHelper.GetNClick(homePage.workspaceCompleteSection, 0, true); cy.wait("@updateApplication").should( "have.nested.property", @@ -85,7 +91,7 @@ describe("Update Application", () => { ); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); - cy.get(homePage.searchInput).type(veryLongAppName); + cy.get(homePage.searchInput).click().type(veryLongAppName); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(2000); cy.get(homePage.applicationCard) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts index 87a07bc113..71e8bf1e95 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts @@ -92,11 +92,8 @@ describe( deployMode.DeployApp(); agHelper.GetNClick(datePickerlocators.input); agHelper.ClearNType(datePickerlocators.inputHour, "12", 0, true); - agHelper.Sleep(500); // wait for the input to be updated for CI runs agHelper.ClearNType(datePickerlocators.inputMinute, "58", 0, true); - agHelper.Sleep(500); // wait for the input to be updated for CI runs agHelper.ClearNType(datePickerlocators.inputSecond, "59", 0, true); - agHelper.Sleep(500); // wait for the input to be updated for CI runs agHelper.PressEnter(); agHelper .GetAttribute(datePickerlocators.input, "value") diff --git a/app/client/cypress/support/Pages/AggregateHelper.ts b/app/client/cypress/support/Pages/AggregateHelper.ts index 820c57c5de..911e7c2e66 100644 --- a/app/client/cypress/support/Pages/AggregateHelper.ts +++ b/app/client/cypress/support/Pages/AggregateHelper.ts @@ -885,7 +885,11 @@ export class AggregateHelper { } public ClearTextField(selector: string, force = false, index = 0) { - this.GetElement(selector).eq(index).focus().clear({ force }); + this.GetElement(selector) + .eq(index) + .scrollIntoView({ easing: "linear" }) + .click() + .clear({ force }); this.Sleep(500); //for text to clear for CI runs } @@ -934,6 +938,8 @@ export class AggregateHelper { element.focus(); } + if (value === "") return element; + return element.wait(100).type(value, { parseSpecialCharSequences: parseSpecialCharSeq, delay: delay,