-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
98 additions
and
98 deletions.
There are no files selected for viewing
196 changes: 98 additions & 98 deletions
196
app/client/cypress/integration/Smoke_TestSuite/FormWidgets/RichTextEditor_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); | ||
// }); | ||
// }); |