diff --git a/it/config/src/main/content/jcr_root/apps/system/config/com.adobe.granite.toggle.impl.dev.DynamicToggleProviderImpl.cfg.json b/it/config/src/main/content/jcr_root/apps/system/config/com.adobe.granite.toggle.impl.dev.DynamicToggleProviderImpl.cfg.json index 8842ce8f0c..079d4e6db7 100644 --- a/it/config/src/main/content/jcr_root/apps/system/config/com.adobe.granite.toggle.impl.dev.DynamicToggleProviderImpl.cfg.json +++ b/it/config/src/main/content/jcr_root/apps/system/config/com.adobe.granite.toggle.impl.dev.DynamicToggleProviderImpl.cfg.json @@ -21,6 +21,8 @@ "FT_SITES-19631", "FT_FORMS-14255", "FT_FORMS-14068", - "FT_FORMS-16351" + "FT_FORMS-16351", + "FT_FORMS-16858", + "FT_FORMS-2447" ] } diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/_cq_dialog/.content.xml index 86a74c94e2..d20f88dc2a 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/_cq_dialog/.content.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/base/v1/base/_cq_dialog/.content.xml @@ -783,6 +783,25 @@ ignoreData="{Boolean}true" name="dorExclusion@TypeHint" value="Boolean"/> + + + + + + + + + + { + const formPath = "/content/forms/af/core-components-it/samples/document-of-record/dor-form", + textInputEditPath = formPath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/textinput", + textInputEditPathSelector = "[data-path='" + textInputEditPath + "']", + formContainerEditPath = formPath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX, + formContainerPathSelector = "[data-path='" + formContainerEditPath + "']"; + + let toggle_array = []; + + before(() => { + cy.fetchFeatureToggles().then((response) => { + if (response.status === 200) { + toggle_array = response.body.enabled; + } + }) + }); + + beforeEach(() => { + cy.openAuthoring(formPath); + }); + + it('select a custom template', () => { + if (cy.af.isLatestAddon() && toggle_array.includes('FT_FORMS-16858')) { + cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + formContainerPathSelector); + cy.invokeEditableAction("[data-action='dor']"); + cy.get('coral-select[name="template"]').click(); + cy.get('coral-popover:visible').within(() => { + cy.get('coral-selectlist-item').contains('Custom').click(); + }); + cy.get('foundation-autocomplete[name="./metaTemplateRef"] input[is="coral-textfield"]').type('/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/customTemplate', {force: true}); + } + }); + + it('dropdown for custom XFA style exist in the field', () => { + if (cy.af.isLatestAddon() && toggle_array.includes('FT_FORMS-16858')) { + cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + textInputEditPathSelector); + cy.invokeEditableAction("[data-action='CONFIGURE']"); + cy.get(".cmp-adaptiveform-textinput__editdialog coral-tab-label:contains('Document of Record')").click(); + cy.get('coral-select[name="./dorFieldStyling"]').should('exist'); + } + }); + +}); \ No newline at end of file