feat: Internal property to detect changes in a form

-- Change updateCodeInput command to testJsontext
This commit is contained in:
Paul Li 2022-04-02 23:33:14 +08:00
parent cc9db789b2
commit 842e330db3

View File

@ -136,13 +136,7 @@ describe("RichTextEditor Widget Functionality", function() {
); );
// Change defaultText // Change defaultText
cy.openPropertyPane("richtexteditorwidget"); cy.openPropertyPane("richtexteditorwidget");
cy.updateCodeInput(".t--property-control-defaulttext", "a"); cy.testJsontext("defaulttext", "a");
cy.closePropertyPane();
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// Check if isDirty has been changed into false // Check if isDirty has been changed into false
cy.get(".t--widget-textwidget").should("contain", "false"); cy.get(".t--widget-textwidget").should("contain", "false");
// Interact with UI // Interact with UI
@ -151,13 +145,7 @@ describe("RichTextEditor Widget Functionality", function() {
cy.get(".t--widget-textwidget").should("contain", "true"); cy.get(".t--widget-textwidget").should("contain", "true");
// Change defaultText // Change defaultText
cy.openPropertyPane("richtexteditorwidget"); cy.openPropertyPane("richtexteditorwidget");
cy.updateCodeInput(".t--property-control-defaulttext", "b"); cy.testJsontext("defaulttext", "b");
cy.closePropertyPane();
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// Check if isDirty is reset to false // Check if isDirty is reset to false
cy.get(".t--widget-textwidget").should("contain", "false"); cy.get(".t--widget-textwidget").should("contain", "false");
}); });