diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js index 2014f85d0e..a3549d7c9e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js @@ -1,10 +1,14 @@ const commonlocators = require("../../../../../locators/commonlocators.json"); const widgetsPage = require("../../../../../locators/Widgets.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; +import { + agHelper, + deployMode, + propPane, +} from "../../../../../support/Objects/ObjectsCore"; describe("Text Widget color/font/alignment Functionality", function () { before(() => { - _.agHelper.AddDsl("textDsl"); + agHelper.AddDsl("textDsl"); }); beforeEach(() => { @@ -56,11 +60,11 @@ describe("Text Widget color/font/alignment Functionality", function () { this.dataSet.TextLabelValueScrollable, ); cy.wait("@updateLayout"); - _.deployMode.DeployApp(); + deployMode.DeployApp(); cy.get(commonlocators.headingTextStyle) .should("have.text", this.dataSet.TextLabelValueScrollable) .should("have.css", "font-size", "16px"); - _.deployMode.NavigateBacktoEditor(); + deployMode.NavigateBacktoEditor(); }); it("3. Test to validate text format", function () { @@ -86,9 +90,8 @@ describe("Text Widget color/font/alignment Functionality", function () { cy.wait(500); cy.wait("@updateLayout"); cy.readTextDataValidateCSS("color", "rgb(219, 234, 254)"); - cy.get(widgetsPage.textColor) - .clear({ force: true }) - .type("purple", { force: true }); + propPane.EnterJSContext("Text color", "purple"); + agHelper.Sleep(1000); cy.wait("@updateLayout"); cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)"); @@ -109,8 +112,7 @@ describe("Text Widget color/font/alignment Functionality", function () { ); //Toggle JS check with cell background: - cy.get(widgetsPage.cellBackgroundToggle).click({ force: true }); - cy.updateCodeInput(widgetsPage.cellBackground, "purple"); + propPane.EnterJSContext("Background color", "purple"); cy.wait("@updateLayout"); cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)");