test: fix flaky test Text_new_feature_spec.js (#26631)
Fixes flaky test Text_new_feature_spec.js --------- Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
This commit is contained in:
parent
edbbefd979
commit
44375b0fec
|
|
@ -1,10 +1,14 @@
|
||||||
const commonlocators = require("../../../../../locators/commonlocators.json");
|
const commonlocators = require("../../../../../locators/commonlocators.json");
|
||||||
const widgetsPage = require("../../../../../locators/Widgets.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 () {
|
describe("Text Widget color/font/alignment Functionality", function () {
|
||||||
before(() => {
|
before(() => {
|
||||||
_.agHelper.AddDsl("textDsl");
|
agHelper.AddDsl("textDsl");
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
@ -56,11 +60,11 @@ describe("Text Widget color/font/alignment Functionality", function () {
|
||||||
this.dataSet.TextLabelValueScrollable,
|
this.dataSet.TextLabelValueScrollable,
|
||||||
);
|
);
|
||||||
cy.wait("@updateLayout");
|
cy.wait("@updateLayout");
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(commonlocators.headingTextStyle)
|
cy.get(commonlocators.headingTextStyle)
|
||||||
.should("have.text", this.dataSet.TextLabelValueScrollable)
|
.should("have.text", this.dataSet.TextLabelValueScrollable)
|
||||||
.should("have.css", "font-size", "16px");
|
.should("have.css", "font-size", "16px");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("3. Test to validate text format", function () {
|
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(500);
|
||||||
cy.wait("@updateLayout");
|
cy.wait("@updateLayout");
|
||||||
cy.readTextDataValidateCSS("color", "rgb(219, 234, 254)");
|
cy.readTextDataValidateCSS("color", "rgb(219, 234, 254)");
|
||||||
cy.get(widgetsPage.textColor)
|
propPane.EnterJSContext("Text color", "purple");
|
||||||
.clear({ force: true })
|
agHelper.Sleep(1000);
|
||||||
.type("purple", { force: true });
|
|
||||||
cy.wait("@updateLayout");
|
cy.wait("@updateLayout");
|
||||||
cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)");
|
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:
|
//Toggle JS check with cell background:
|
||||||
cy.get(widgetsPage.cellBackgroundToggle).click({ force: true });
|
propPane.EnterJSContext("Background color", "purple");
|
||||||
cy.updateCodeInput(widgetsPage.cellBackground, "purple");
|
|
||||||
|
|
||||||
cy.wait("@updateLayout");
|
cy.wait("@updateLayout");
|
||||||
cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)");
|
cy.readTextDataValidateCSS("color", "rgb(128, 0, 128)");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user