diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/clientlibs/editor/js/editDialog.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/clientlibs/editor/js/editDialog.js index 23ac0dd0f6..0451eb633b 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/clientlibs/editor/js/editDialog.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/clientlibs/editor/js/editDialog.js @@ -32,6 +32,7 @@ BASE_WRAPPER_VALUE_RICH_TEXT_TITLE = "[data-cq-richtext-editable='true'][data-wrapperclass='" + BASE_RICH_TEXT_TITLE_NAME + "']", BASE_IS_TITLE_RICH_TEXT = ".cmp-adaptiveform-base__istitlerichtext", BASE_RICH_TEXT_ENUMNAMES_NAME = "cmp-adaptiveform-base__richTextEnumNames", + BASE_RICH_TEXT_ENUMNAMES = "." + BASE_RICH_TEXT_ENUMNAMES_NAME, BASE_WRAPPER_INPUT_RICH_TEXT_ENUMNAMES = "[data-cq-richtext-input='true'][data-wrapperclass='" + BASE_RICH_TEXT_ENUMNAMES_NAME + "']", BASE_WRAPPER_VALUE_RICH_TEXT_ENUMNAMES = "[data-cq-richtext-editable='true'][data-wrapperclass='" + BASE_RICH_TEXT_ENUMNAMES_NAME + "']", BASE_ARE_OPTIONS_RICH_TEXT = ".cmp-adaptiveform-base__areOptionsRichText", @@ -200,7 +201,7 @@ */ function resolveRichTextOptions(dialog, areOptionsRichText, isToggled) { let enumNames = dialog.find(BASE_ENUMNAMES_VISIBLE), - richTextEnumNames = dialog.find(BASE_WRAPPER_INPUT_RICH_TEXT_ENUMNAMES), + richTextEnumNames = dialog.find(BASE_RICH_TEXT_ENUMNAMES), richTextEnumNamesDiv = dialog.find("[data-cq-richtext-editable='true'][data-wrapperclass='cmp-adaptiveform-base__richTextEnumNames']"); if(areOptionsRichText != null && areOptionsRichText.checked){ for (let i = 0; i < richTextEnumNames.length; i++) { @@ -298,7 +299,7 @@ channel.on("click", BASE_ENUM_MULTIFIELD_ADD_BUTTON, function (e) { let areOptionsRichText = $(BASE_ARE_OPTIONS_RICH_TEXT)[0], enumNames = $(BASE_ENUMNAMES_VISIBLE), - richTextEnumNames = $(BASE_WRAPPER_INPUT_RICH_TEXT_ENUMNAMES); + richTextEnumNames = $(BASE_RICH_TEXT_ENUMNAMES); if(areOptionsRichText != null && areOptionsRichText.checked){ for (let i = 0; i < richTextEnumNames.length; i++) { Utils.hideComponent(enumNames[i], "div"); diff --git a/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js b/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js index 7eb3bdeb1f..24fe51fc59 100644 --- a/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js +++ b/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js @@ -174,11 +174,13 @@ describe('Page - Authoring', function () { cy.get("div[name='richTextTitle']").should('be.visible'); // check rich text selector and see if RTE is visible for enum names. + cy.get(".cmp-adaptiveform-base__richTextEnumNames").first().should('not.be.visible'); cy.get('.cmp-adaptiveform-base__areOptionsRichText').should('exist').click(); cy.get("div[name='richTextEnumNames']").then(($el) => { $el[0].scrollIntoView(); }) cy.get("div[name='richTextEnumNames']").first().should('be.visible'); + cy.get(".cmp-adaptiveform-base__richTextEnumNames").first().should('be.visible'); cy.get('.cq-dialog-submit').click(); }); diff --git a/ui.tests/test-module/specs/switch/switch.authoring.spec.js b/ui.tests/test-module/specs/switch/switch.authoring.spec.js index 46ab5d88f8..d9baa28e6f 100644 --- a/ui.tests/test-module/specs/switch/switch.authoring.spec.js +++ b/ui.tests/test-module/specs/switch/switch.authoring.spec.js @@ -74,7 +74,6 @@ describe('Page - Authoring', function () { }); it('when enableUnchecked is false hides off field', function () { - // todo: Fix edit dialog bug before enabling this test dropSwitchInContainer(); const pagePath = "/content/forms/af/core-components-it/blank", switchEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/switch", @@ -112,7 +111,6 @@ describe('Page - Authoring', function () { }); it('when enableUnchecked is false hides off field', function () { - // todo: Fix edit dialog bug before enabling this test dropSwitchInSites(); cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + switchEditPathSelector); cy.invokeEditableAction("[data-action='CONFIGURE']"); // this line is causing frame busting which is causing cypress to fail