From 842e330db3c38e5723a6d4e152839bb26a7d6b3a Mon Sep 17 00:00:00 2001 From: Paul Li Date: Sat, 2 Apr 2022 23:33:14 +0800 Subject: [PATCH] feat: Internal property to detect changes in a form -- Change updateCodeInput command to testJsontext --- .../FormWidgets/RichTextEditor_spec.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/RichTextEditor_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/RichTextEditor_spec.js index c43a0b0a1a..dddcbb27b2 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/RichTextEditor_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/RichTextEditor_spec.js @@ -136,13 +136,7 @@ describe("RichTextEditor Widget Functionality", function() { ); // Change defaultText cy.openPropertyPane("richtexteditorwidget"); - cy.updateCodeInput(".t--property-control-defaulttext", "a"); - cy.closePropertyPane(); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); + cy.testJsontext("defaulttext", "a"); // Check if isDirty has been changed into false cy.get(".t--widget-textwidget").should("contain", "false"); // Interact with UI @@ -151,13 +145,7 @@ describe("RichTextEditor Widget Functionality", function() { cy.get(".t--widget-textwidget").should("contain", "true"); // Change defaultText cy.openPropertyPane("richtexteditorwidget"); - cy.updateCodeInput(".t--property-control-defaulttext", "b"); - cy.closePropertyPane(); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); + cy.testJsontext("defaulttext", "b"); // Check if isDirty is reset to false cy.get(".t--widget-textwidget").should("contain", "false"); });