Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Jan 20, 2021
2 parents 63fb249 + a478fcb commit ee985af
Showing 1 changed file with 98 additions and 98 deletions.
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
const commonlocators = require("../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/formdsl1.json");
const publishPage = require("../../../locators/publishWidgetspage.json");
const pages = require("../../../locators/Pages.json");

describe("RichTextEditor Widget Functionality", function() {
before(() => {
cy.addDsl(dsl);
});

beforeEach(() => {
cy.openPropertyPane("richtexteditorwidget");
});

it("RichTextEditor-Edit Text area with HTML body functionality", function() {
//changing the Text Name
cy.widgetText(
this.data.RichTextEditorName,
formWidgetsPage.richTextEditorWidget,
formWidgetsPage.richTextEditorWidget + " " + commonlocators.widgetNameTag,
);

//Edit the text area with Html
cy.testJsontext("defaulttext", this.data.HtmlText);

//Validate Html
cy.validateHTMLText(
formWidgetsPage.richTextEditorWidget,
"h1",
"This is a Heading",
);

// validate after reload
cy.reload(true);
cy.wait(2000);
cy.validateHTMLText(
formWidgetsPage.richTextEditorWidget,
"h1",
"This is a Heading",
);

cy.PublishtheApp();
cy.validateHTMLText(
publishPage.richTextEditorWidget,
"h1",
"This is a Heading",
);
});

it("RichTextEditor-Enable Validation", function() {
//Uncheck the Disabled checkbox
cy.UncheckWidgetProperties(formWidgetsPage.disableJs);
cy.validateEnableWidget(
formWidgetsPage.richTextEditorWidget,
commonlocators.disabledBtn,
);

cy.PublishtheApp();
cy.validateEnableWidget(
publishPage.richTextEditorWidget,
commonlocators.disabledBtn,
);
});

it("RichTextEditor-Disable Validation", function() {
//Check the Disabled checkbox
cy.CheckWidgetProperties(formWidgetsPage.disableJs);
cy.validateDisableWidget(
formWidgetsPage.richTextEditorWidget,
commonlocators.disabledBtn,
);

cy.PublishtheApp();
cy.validateDisableWidget(
publishPage.richTextEditorWidget,
commonlocators.disabledBtn,
);
});

it("RichTextEditor-check Visible field validation", function() {
// Uncheck the visible checkbox
cy.UncheckWidgetProperties(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publishPage.richTextEditorWidget).should("not.exist");
});

it("RichTextEditor-uncheck Visible field validation", function() {
// Check the visible checkbox
cy.CheckWidgetProperties(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publishPage.richTextEditorWidget).should("be.visible");
});

afterEach(() => {
cy.get(publishPage.backToEditor).click({ force: true });
});
});
// const commonlocators = require("../../../locators/commonlocators.json");
// const formWidgetsPage = require("../../../locators/FormWidgets.json");
// const dsl = require("../../../fixtures/formdsl1.json");
// const publishPage = require("../../../locators/publishWidgetspage.json");
// const pages = require("../../../locators/Pages.json");
//
// describe("RichTextEditor Widget Functionality", function() {
// before(() => {
// cy.addDsl(dsl);
// });
//
// beforeEach(() => {
// cy.openPropertyPane("richtexteditorwidget");
// });
//
// it("RichTextEditor-Edit Text area with HTML body functionality", function() {
// //changing the Text Name
// cy.widgetText(
// this.data.RichTextEditorName,
// formWidgetsPage.richTextEditorWidget,
// formWidgetsPage.richTextEditorWidget + " " + commonlocators.widgetNameTag,
// );
//
// //Edit the text area with Html
// cy.testJsontext("defaulttext", this.data.HtmlText);
//
// //Validate Html
// cy.validateHTMLText(
// formWidgetsPage.richTextEditorWidget,
// "h1",
// "This is a Heading",
// );
//
// // validate after reload
// cy.reload(true);
// cy.wait(2000);
// cy.validateHTMLText(
// formWidgetsPage.richTextEditorWidget,
// "h1",
// "This is a Heading",
// );
//
// cy.PublishtheApp();
// cy.validateHTMLText(
// publishPage.richTextEditorWidget,
// "h1",
// "This is a Heading",
// );
// });
//
// it("RichTextEditor-Enable Validation", function() {
// //Uncheck the Disabled checkbox
// cy.UncheckWidgetProperties(formWidgetsPage.disableJs);
// cy.validateEnableWidget(
// formWidgetsPage.richTextEditorWidget,
// commonlocators.disabledBtn,
// );
//
// cy.PublishtheApp();
// cy.validateEnableWidget(
// publishPage.richTextEditorWidget,
// commonlocators.disabledBtn,
// );
// });
//
// it("RichTextEditor-Disable Validation", function() {
// //Check the Disabled checkbox
// cy.CheckWidgetProperties(formWidgetsPage.disableJs);
// cy.validateDisableWidget(
// formWidgetsPage.richTextEditorWidget,
// commonlocators.disabledBtn,
// );
//
// cy.PublishtheApp();
// cy.validateDisableWidget(
// publishPage.richTextEditorWidget,
// commonlocators.disabledBtn,
// );
// });
//
// it("RichTextEditor-check Visible field validation", function() {
// // Uncheck the visible checkbox
// cy.UncheckWidgetProperties(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publishPage.richTextEditorWidget).should("not.exist");
// });
//
// it("RichTextEditor-uncheck Visible field validation", function() {
// // Check the visible checkbox
// cy.CheckWidgetProperties(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publishPage.richTextEditorWidget).should("be.visible");
// });
//
// afterEach(() => {
// cy.get(publishPage.backToEditor).click({ force: true });
// });
// });

0 comments on commit ee985af

Please sign in to comment.