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 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)");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user