diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/textinput.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/textinput.html
index 1cd354c995..54671cb4ed 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/textinput.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/textinput.html
@@ -33,7 +33,7 @@
data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[text.id, 'widget']}">
-
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/.content.xml
deleted file mode 100644
index 3977155bee..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/.content.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/.content.xml
deleted file mode 100644
index 69774ca1cc..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/.content.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/.content.xml
deleted file mode 100644
index 0d0d725d7c..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/.content.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_dialog/.content.xml
deleted file mode 100644
index 9bbce859e2..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_dialog/.content.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_template.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_template.xml
deleted file mode 100644
index dbdb9ae264..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/_cq_template.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/widget.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/widget.html
deleted file mode 100644
index 052452aecc..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/toggleablelink/v1/toggleablelink/widget.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/verticaltabs/v1/verticaltabs/_cq_editConfig.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/verticaltabs/v1/verticaltabs/_cq_editConfig.xml
index 2e503a491a..ad687a1ee9 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/verticaltabs/v1/verticaltabs/_cq_editConfig.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/verticaltabs/v1/verticaltabs/_cq_editConfig.xml
@@ -36,10 +36,5 @@
jcr:primaryType="nt:unstructured"
handler="CQ.FormsCoreComponents.editorhooks.replace"
text="Replace"/>
-
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/_cq_editConfig.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/_cq_editConfig.xml
index e288e7d1a8..076570341c 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/_cq_editConfig.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/_cq_editConfig.xml
@@ -37,10 +37,5 @@
handler="CQ.FormsCoreComponents.editorhooks.replace"
icon="shuffle"
text="Replace"/>
-
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/wizard.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/wizard.html
index c7b1bb63fa..664ba4d52c 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/wizard.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/wizard/v1/wizard/wizard.html
@@ -32,7 +32,7 @@
data-placeholder-text="${'Please drag Wizard components here' @ i18n}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[wizard.id, 'widget']}">
diff --git a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v1/aemform/iframe.html b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v1/aemform/iframe.html
index d0346766c5..1f5e531965 100644
--- a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v1/aemform/iframe.html
+++ b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v1/aemform/iframe.html
@@ -14,10 +14,10 @@
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-
-
-
-
+
+
+
${af.formTitle @ context='html'}
diff --git a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v2/aemform/iframe.html b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v2/aemform/iframe.html
index 69a4e8d12e..fd4a044aea 100644
--- a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v2/aemform/iframe.html
+++ b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v2/aemform/iframe.html
@@ -14,10 +14,10 @@
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-
-
-
-
+
+
+
${af.formTitle @ context='html'}
diff --git a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/formsportal/link/v1/link/clientlibs/editor/js/linkcomponent.js b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/formsportal/link/v1/link/clientlibs/editor/js/linkcomponent.js
index 96e2b13be5..dc7082966a 100644
--- a/ui.apps/src/main/content/jcr_root/apps/core/fd/components/formsportal/link/v1/link/clientlibs/editor/js/linkcomponent.js
+++ b/ui.apps/src/main/content/jcr_root/apps/core/fd/components/formsportal/link/v1/link/clientlibs/editor/js/linkcomponent.js
@@ -13,8 +13,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-/* global jQuery, Coral, Granite */
-(function ($, Coral, Granite) {
+/* global jQuery, Coral */
+(function ($, Coral) {
var initQueryParametersTab = function () {
var btn = $('.cmp-formsportal-link--editor-parameters > ._coral-Button')[0];
var multifield = $('.cmp-formsportal-link--editor-parameters')[0];
@@ -25,7 +25,7 @@
// overrides the default multi-field button
btn.set({
label: {
- innerHTML: Granite.I18n.get("Add Item")
+ innerHTML: "Add Item"
},
icon: "add"
});
@@ -48,4 +48,4 @@
$(document).on("dialog-ready", function () {
initQueryParametersTab();
});
-}(jQuery, Coral, Granite));
+}(jQuery, Coral));
diff --git a/ui.frontend/src/index.js b/ui.frontend/src/index.js
index 3158145bbf..99eed1aac0 100644
--- a/ui.frontend/src/index.js
+++ b/ui.frontend/src/index.js
@@ -15,8 +15,8 @@
******************************************************************************/
import Utils from "./utils.js";
import LanguageUtils from "./LanguageUtils.js";
-import {createFormInstance, FileObject, extractFileInfo, Click, Change, Submit, Blur, AddItem, RemoveItem, CustomEvent} from "@aemforms/af-core";
-import {FormField, FormContainer, FormFieldBase, FormPanel, FormTabs, FormCheckBox} from "./view/index.js";
+import {createFormInstance, FileObject, extractFileInfo, Click, Change, Submit, Blur, AddItem, RemoveItem} from "@aemforms/af-core";
+import {FormField, FormContainer, FormFieldBase, FormPanel, FormTabs} from "./view/index.js";
import {Constants} from "./constants.js";
import GuideBridge from "./GuideBridge.js";
import HTTPAPILayer from "./HTTPAPILayer.js";
@@ -47,7 +47,7 @@ window.guideBridge = new GuideBridge();
* @property {string} RemoveItem - The action for removing an item.
*/
const Actions = {
- Click, Change, Submit, Blur, AddItem, RemoveItem, CustomEvent
+ Click, Change, Submit, Blur, AddItem, RemoveItem
}
/**
@@ -77,4 +77,4 @@ const FileAttachmentUtils = {
*/
-export {createFormInstance, FormTabs, FormField, FormFieldBase, FormPanel, FormContainer, Constants, Utils, Actions, HTTPAPILayer, FileAttachmentUtils, Formatters, LanguageUtils, FunctionRuntime, FormCheckBox};
+export {createFormInstance, FormTabs, FormField, FormFieldBase, FormPanel, FormContainer, Constants, Utils, Actions, HTTPAPILayer, FileAttachmentUtils, Formatters, LanguageUtils, FunctionRuntime};
diff --git a/ui.frontend/src/utils.js b/ui.frontend/src/utils.js
index f66990099f..4d0b447ce7 100644
--- a/ui.frontend/src/utils.js
+++ b/ui.frontend/src/utils.js
@@ -117,10 +117,8 @@ class Utils {
static #createFormContainerFields(fieldElements, fieldCreator, formContainer) {
for (let i = 0; i < fieldElements.length; i++) {
const elementId = fieldElements[i].id;
- const formPathInField = fieldElements[i].getAttribute('data-cmp-adaptiveformcontainer-path');
- const formPath = formContainer.getFormElement().getAttribute('data-cmp-path');
//check if field is already created, to avoid creating a new field for same id
- if (formContainer.getField(elementId) == null && formPathInField == formPath) {
+ if (formContainer.getField(elementId) == null) {
let field = fieldCreator({
"element" : fieldElements[i],
"formContainer" : formContainer
diff --git a/ui.frontend/src/view/FormCheckBox.js b/ui.frontend/src/view/FormCheckBox.js
deleted file mode 100644
index bfcff396eb..0000000000
--- a/ui.frontend/src/view/FormCheckBox.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright 2023 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-import FormFieldBase from "./FormFieldBase.js";
-
-/**
- * Class representing components based on CheckBox.
- * @extends module:FormView~FormCheckBox
- */
-class FormCheckBox extends FormFieldBase {
-
- constructor(params) {
- super(params);
- }
-
- updateValue(modelValue) {
- if (modelValue === this._model._jsonModel.enum[0]) {
- this.widget.checked = true
- this.widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED)
- this.widget.setAttribute(FormView.Constants.ARIA_CHECKED, true);
- } else {
- this.widget.checked = false
- this.widget.removeAttribute(FormView.Constants.HTML_ATTRS.CHECKED);
- this.widget.setAttribute(FormView.Constants.ARIA_CHECKED, false);
- }
- this.widget.value = modelValue;
- super.updateEmptyStatus();
- }
-
- setModel(model) {
- super.setModel(model);
- this._onValue = this._model._jsonModel.enum[0];
- this._offValue = this._model._jsonModel.enum[1];
- this.widget.addEventListener('change', (e) => {
- if (this.widget.checked) {
- this._model.value = this._onValue;
- } else {
- this._model.value = this._offValue;
- }
- })
-
- }
-}
-
-export default FormCheckBox;
\ No newline at end of file
diff --git a/ui.frontend/src/view/FormField.js b/ui.frontend/src/view/FormField.js
index a4b9d9c7d7..c079e35e23 100644
--- a/ui.frontend/src/view/FormField.js
+++ b/ui.frontend/src/view/FormField.js
@@ -77,11 +77,9 @@ class FormField {
setActive() {
if (!this.isActive()) {
this.element.setAttribute(Constants.DATA_ATTRIBUTE_ACTIVE, true);
- this.element.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
if (this.parentView && this.parentView.setActive) {
this.parentView.setActive();
- this.element.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}
diff --git a/ui.frontend/src/view/index.js b/ui.frontend/src/view/index.js
index 01e9d297fc..23320876e5 100644
--- a/ui.frontend/src/view/index.js
+++ b/ui.frontend/src/view/index.js
@@ -17,8 +17,7 @@ import FormContainer from "./FormContainer.js";
import FormField from "./FormField.js";
import FormFieldBase from "./FormFieldBase.js";
import FormPanel from "./FormPanel.js";
-import FormTabs from "./FormTabs.js";
-import FormCheckBox from "./FormCheckBox.js";
+import FormTabs from "./FormTabs";
-export {FormField, FormContainer, FormFieldBase, FormPanel, FormTabs, FormCheckBox}
+export {FormField, FormContainer, FormFieldBase, FormPanel, FormTabs}
diff --git a/ui.tests/test-module/libs/commons/formsConstants.js b/ui.tests/test-module/libs/commons/formsConstants.js
index b12316f0ef..a54b572f16 100644
--- a/ui.tests/test-module/libs/commons/formsConstants.js
+++ b/ui.tests/test-module/libs/commons/formsConstants.js
@@ -44,10 +44,8 @@ var formsConstants = {
"wizard": "/apps/forms-components-examples/components/form/wizard",
"title": "/apps/forms-components-examples/components/form/title",
"checkbox": "/apps/forms-components-examples/components/form/checkbox",
- "switch": "/apps/forms-components-examples/components/form/switch",
"fragment": "/apps/forms-components-examples/components/form/fragment",
"fragmentcontainer": "/apps/forms-components-examples/components/form/fragmentcontainer",
- "termsandconditions": "/apps/forms-components-examples/components/form/termsandconditions"
}
},
resourceType : {
diff --git a/ui.tests/test-module/libs/commons/localeDataSets.js b/ui.tests/test-module/libs/commons/localeDataSets.js
index 317249caf7..c8fe10f4c5 100644
--- a/ui.tests/test-module/libs/commons/localeDataSets.js
+++ b/ui.tests/test-module/libs/commons/localeDataSets.js
@@ -1,10 +1,8 @@
const selectors = {
ACCORDION: '.cmp-accordion > .cmp-accordion__label-container > label',
BUTTON: '.button.base:not(.submit):not(.reset) span',
- CHECK_BOX1: '.cmp-adaptiveform-checkboxgroup:has(.checkboxgroup1) .cmp-adaptiveform-checkboxgroup__label-container > label',
- CHECK_BOX1_ITEM1: '.cmp-adaptiveform-checkboxgroup:has(.checkboxgroup1) > div > div > label > span',
- CHECK_BOX2: '.cmp-adaptiveform-checkboxgroup:has(.checkboxgroup2) .cmp-adaptiveform-checkboxgroup__label-container > label',
- CHECK_BOX2_ITEM1: '.cmp-adaptiveform-checkboxgroup:has(.checkboxgroup2) > div > div > label > span',
+ CHECK_BOX: '.cmp-adaptiveform-checkboxgroup .cmp-adaptiveform-checkboxgroup__label-container > label',
+ CHECK_BOX_ITEM1: '.cmp-adaptiveform-checkboxgroup > div > div > label > span',
DATE_INPUT: '.cmp-adaptiveform-datepicker label',
DROPDOWN: '.cmp-adaptiveform-dropdown label',
EMAIL_INPUT: '.cmp-adaptiveform-emailinput__label',
@@ -28,10 +26,8 @@ const languages = [
TRANSLATION: {
ACCORDION: 'Accordion',
BUTTON: 'Button',
- CHECK_BOX1: 'Check Box Group',
- CHECK_BOX1_ITEM1: 'Item 1',
- CHECK_BOX2: 'Select Animal',
- CHECK_BOX2_ITEM1: 'Dog',
+ CHECK_BOX: 'Check Box Group',
+ CHECK_BOX_ITEM1: 'Item 1',
DATE_INPUT: 'Date Input',
DROPDOWN: 'Dropdown',
EMAIL_INPUT: 'Email Input',
@@ -58,10 +54,8 @@ const languages = [
LANGUAGE: 'German', LOCALE: 'de', TRANSLATION: {
ACCORDION: 'Akkordeon',
BUTTON: 'Knopf',
- CHECK_BOX1: 'Kontrollkästchengruppe',
- CHECK_BOX1_ITEM1: 'Punkt 1',
- CHECK_BOX2: 'Tier auswählen',
- CHECK_BOX2_ITEM1: 'Hund',
+ CHECK_BOX: 'Kontrollkästchengruppe',
+ CHECK_BOX_ITEM1: 'Punkt 1',
DATE_INPUT: 'Datumseingabe',
DROPDOWN: 'Dropdown-Menü',
EMAIL_INPUT: 'E-Mail-Eingabe',
@@ -88,10 +82,8 @@ const languages = [
LANGUAGE: 'Japanese', LOCALE: 'ja', TRANSLATION: {
ACCORDION: 'アコーディオン',
BUTTON: 'ボタン',
- CHECK_BOX1: 'チェック ボックス グループ',
- CHECK_BOX1_ITEM1: 'アイテム1',
- CHECK_BOX2: '動物を選択',
- CHECK_BOX2_ITEM1: '犬',
+ CHECK_BOX: 'チェック ボックス グループ',
+ CHECK_BOX_ITEM1: 'アイテム1',
DATE_INPUT: '日付入力',
DROPDOWN: 'ドロップダウン',
EMAIL_INPUT: 'メール入力',
@@ -118,10 +110,8 @@ const languages = [
LANGUAGE: 'Italian', LOCALE: 'it', TRANSLATION: {
ACCORDION: 'Fisarmonica',
BUTTON: 'Bottone',
- CHECK_BOX1: 'Gruppo di caselle di controllo',
- CHECK_BOX1_ITEM1: 'Articolo 1',
- CHECK_BOX2: 'Seleziona animale',
- CHECK_BOX2_ITEM1: 'Cane',
+ CHECK_BOX: 'Gruppo di caselle di controllo',
+ CHECK_BOX_ITEM1: 'Articolo 1',
DATE_INPUT: 'Inserimento data',
DROPDOWN: 'Menù a discesa',
EMAIL_INPUT: 'Inserisci e-mail',
@@ -148,10 +138,8 @@ const languages = [
LANGUAGE: 'French', LOCALE: 'fr', TRANSLATION: {
ACCORDION: 'Accordéon',
BUTTON: 'Bouton',
- CHECK_BOX1: 'Groupe de cases à cocher',
- CHECK_BOX1_ITEM1: 'Point 1 de l’ordre du jour',
- CHECK_BOX2: 'Sélectionner un animal',
- CHECK_BOX2_ITEM1: 'Chien',
+ CHECK_BOX: 'Groupe de cases à cocher',
+ CHECK_BOX_ITEM1: 'Point 1 de l’ordre du jour',
DATE_INPUT: 'Saisie de la date',
DROPDOWN: 'Liste déroulante',
EMAIL_INPUT: 'Saisie par e-mail',
@@ -178,10 +166,8 @@ const languages = [
LANGUAGE: 'Spanish', LOCALE: 'es', TRANSLATION: {
ACCORDION: 'Acordeón',
BUTTON: 'Botón',
- CHECK_BOX1: 'Grupo de casillas de verificación',
- CHECK_BOX1_ITEM1: 'Tema 1',
- CHECK_BOX2: 'Seleccionar animal',
- CHECK_BOX2_ITEM1: 'Perro',
+ CHECK_BOX: 'Grupo de casillas de verificación',
+ CHECK_BOX_ITEM1: 'Tema 1',
DATE_INPUT: 'Entrada de fecha',
DROPDOWN: 'Menú desplegable',
EMAIL_INPUT: 'Entrada de correo electrónico',
@@ -208,10 +194,8 @@ const languages = [
LANGUAGE: 'Korean', LOCALE: 'ko-kr', TRANSLATION: {
ACCORDION: '아코디언',
BUTTON: '단추',
- CHECK_BOX1: '확인란 그룹',
- CHECK_BOX1_ITEM1: '항목 1',
- CHECK_BOX2: '동물 선택',
- CHECK_BOX2_ITEM1: '개',
+ CHECK_BOX: '확인란 그룹',
+ CHECK_BOX_ITEM1: '항목 1',
DATE_INPUT: '날짜 입력',
DROPDOWN: '드롭다운',
EMAIL_INPUT: '이메일 입력',
@@ -238,10 +222,8 @@ const languages = [
LANGUAGE: 'Chinese Traditional', LOCALE: 'zh-tw', TRANSLATION: {
ACCORDION: '手風琴',
BUTTON: '按鈕',
- CHECK_BOX1: '複選框組',
- CHECK_BOX1_ITEM1: '專案1',
- CHECK_BOX2: '選擇動物',
- CHECK_BOX2_ITEM1: '狗',
+ CHECK_BOX: '複選框組',
+ CHECK_BOX_ITEM1: '專案1',
DATE_INPUT: '日期輸入',
DROPDOWN: '下拉清單',
EMAIL_INPUT: '電子郵件輸入',
@@ -269,10 +251,8 @@ const languages = [
LANGUAGE: 'Chinese Simplified', LOCALE: 'zh-cn', TRANSLATION: {
ACCORDION: '手风琴',
BUTTON: '按钮',
- CHECK_BOX1: '复选框组',
- CHECK_BOX1_ITEM1: '项目1',
- CHECK_BOX2: '选择动物',
- CHECK_BOX2_ITEM1: '狗',
+ CHECK_BOX: '复选框组',
+ CHECK_BOX_ITEM1: '项目1',
DATE_INPUT: '日期输入',
DROPDOWN: '下拉列表',
EMAIL_INPUT: '电子邮件输入',
@@ -299,10 +279,8 @@ const languages = [
LANGUAGE: 'Portuguese', LOCALE: 'pt-br', TRANSLATION: {
ACCORDION: 'Acordeão',
BUTTON: 'Botão',
- CHECK_BOX1: 'Grupo de caixas de seleção',
- CHECK_BOX1_ITEM1: 'Ponto 1',
- CHECK_BOX2: 'Selecione Animal',
- CHECK_BOX2_ITEM1: 'Cão',
+ CHECK_BOX: 'Grupo de caixas de seleção',
+ CHECK_BOX_ITEM1: 'Ponto 1',
DATE_INPUT: 'Entrada de data',
DROPDOWN: 'Menu suspenso',
EMAIL_INPUT: 'Entrada de e-mail',
@@ -330,10 +308,8 @@ const languages = [
LANGUAGE: 'Russian - Custom Locale added via overlay', LOCALE: 'ru-ru', TRANSLATION: {
ACCORDION: 'Аккордеон',
BUTTON: 'Пуговица',
- CHECK_BOX1: 'Группа флажков',
- CHECK_BOX1_ITEM1: 'Пункт 1',
- CHECK_BOX2: 'Выберите животное',
- CHECK_BOX2_ITEM1: 'Собака',
+ CHECK_BOX: 'Группа флажков',
+ CHECK_BOX_ITEM1: 'Пункт 1',
DATE_INPUT: 'Ввод даты',
DROPDOWN: 'Выпадающий список',
EMAIL_INPUT: 'Ввод электронной почты',
@@ -361,10 +337,8 @@ const languages = [
LANGUAGE: 'Hindi - Custom Locale added via clientlib', LOCALE: 'hi', TRANSLATION: {
ACCORDION: 'अकॉर्डियन',
BUTTON: 'बटन',
- CHECK_BOX1: 'चेक बॉक्स समूह',
- CHECK_BOX1_ITEM1: 'आइटम 1',
- CHECK_BOX2: 'पशु का चयन करें',
- CHECK_BOX2_ITEM1: 'कुत्ता',
+ CHECK_BOX: 'चेक बॉक्स समूह',
+ CHECK_BOX_ITEM1: 'आइटम 1',
DATE_INPUT: 'दिनांक इनपुट',
DROPDOWN: 'ड्रॉपडाउन',
EMAIL_INPUT: 'ईमेल इनपुट',
diff --git a/ui.tests/test-module/libs/support/commands.js b/ui.tests/test-module/libs/support/commands.js
index 2659356df7..5bd01451ce 100644
--- a/ui.tests/test-module/libs/support/commands.js
+++ b/ui.tests/test-module/libs/support/commands.js
@@ -668,13 +668,3 @@ Cypress.Commands.add("expectNoConsoleErrors", () => {
});
});
-Cypress.Commands.add("isElementInViewport", { prevSubject: true }, (subject) => {
- const rect = subject[0].getBoundingClientRect();
-
- return (
- rect.top >= 0 &&
- rect.left >= 0 &&
- rect.bottom <= Cypress.config("viewportHeight") &&
- rect.right <= Cypress.config("viewportWidth")
- );
- });
diff --git a/ui.tests/test-module/specs/LocaleTest.spec.js b/ui.tests/test-module/specs/LocaleTest.spec.js
index 99913c4ea4..1dcf13889c 100644
--- a/ui.tests/test-module/specs/LocaleTest.spec.js
+++ b/ui.tests/test-module/specs/LocaleTest.spec.js
@@ -47,7 +47,7 @@ describe('Verify constants are changing for each language', function () {
cy.openPage(languageUrl + currentLang).then(waitForLangDataToLoad);
}
Object.entries(currLanguage.TRANSLATION).forEach(component => {
- if(component[0] === 'CHECK_BOX1_ITEM1' || component[0] === 'CHECK_BOX2_ITEM1') {
+ if(component[0] === 'CHECK_BOX_ITEM1') {
cy.get(dataSet.selectors[component[0]]).eq(0).invoke('text').should('eq', component[1]);
}
else {
diff --git a/ui.tests/test-module/specs/accordion/accordion.runtime.spec.js b/ui.tests/test-module/specs/accordion/accordion.runtime.spec.js
index 503431c590..964e930da2 100644
--- a/ui.tests/test-module/specs/accordion/accordion.runtime.spec.js
+++ b/ui.tests/test-module/specs/accordion/accordion.runtime.spec.js
@@ -200,7 +200,6 @@ describe("Form with Accordion Layout Container with focus", () => {
cy.get(`#${firstChildComponentButtonId}`).then(() => {
formContainer.setFocus(id);
- cy.get(`#${firstChildComponentButtonId}`).isElementInViewport().should("eq", true);
cy.get(`#${firstChildComponentButtonId}`).then(() => {
// panel 1 active
cy.get(`#${firstChildComponentButtonId}`).should('have.class', 'cmp-accordion__button--expanded');
diff --git a/ui.tests/test-module/specs/actions/viewQualifiedName/viewQualifiedName.authoring.spec.js b/ui.tests/test-module/specs/actions/viewQualifiedName/viewQualifiedName.authoring.spec.js
deleted file mode 100644
index df55aa6c90..0000000000
--- a/ui.tests/test-module/specs/actions/viewQualifiedName/viewQualifiedName.authoring.spec.js
+++ /dev/null
@@ -1,239 +0,0 @@
-const afConstants = require("../../../libs/commons/formsConstants");
-const sitesSelectors = require("../../../libs/commons/sitesSelectors");
-/*******************************************************************************
- * Copyright 2023 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-describe("View Qualified Name Tests", () => {
- if (cy.af.isLatestAddon()) {
- const pagePath = "/content/forms/af/core-components-it/blank",
- buttonEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/button",
- buttonEditPathSelector = "[data-path='" + buttonEditPath + "']",
- buttonDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formbutton.split("/").pop(),
- checkboxEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/checkboxgroup",
- checkboxEditPathSelector = "[data-path='" + checkboxEditPath + "']",
- checkboxDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formcheckboxgroup.split("/").pop(),
- emailinputEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/emailinput",
- emailinputEditPathSelector = "[data-path='" + emailinputEditPath + "']",
- emailinputDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formemailinput.split("/").pop();
-
- const fileInputEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/fileinput",
- fileInputEditPathSelector = "[data-path='" + fileInputEditPath + "']",
- fileInputDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formfileinput.split("/").pop();
-
- const containerEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/panelcontainer",
- containerEditPathSelector = "[data-path='" + containerEditPath + "']",
- containerDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/panelcontainer";
-
- const accordionEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/accordion",
- accordionEditPathSelector = "[data-path='" + accordionEditPath + "']",
- accordionDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/accordion";
-
- const wizardEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/wizard",
- wizardEditPathSelector = "[data-path='" + wizardEditPath + "']",
- wizardDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/wizard";
-
- const verticaltabsEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/verticaltabs",
- verticaltabsEditPathSelector = "[data-path='" + verticaltabsEditPath + "']",
- verticaltabsDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/verticaltabs";
-
- const tabsontopEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/tabsontop",
- tabsontopEditPathSelector = "[data-path='" + tabsontopEditPath + "']",
- tabsontopDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/tabsontop";
-
- const imageEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/image",
- imageEditPathSelector = "[data-path='" + imageEditPath + "']",
- imageDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formimage.split("/").pop();
-
-
- const dropComponent = function (componentEditPathSelector, dataPath) {
- const responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- switch (componentEditPathSelector) {
- case buttonEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Button", afConstants.components.forms.resourceType.formbutton);
- break;
- case checkboxEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form CheckBox Group", afConstants.components.forms.resourceType.formcheckboxgroup);
- break;
- case emailinputEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Email Input", afConstants.components.forms.resourceType.formemailinput);
- break;
- case fileInputEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form File Attachment", afConstants.components.forms.resourceType.formfileinput);
- break;
- case containerEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Panel", afConstants.components.forms.resourceType.panelcontainer);
- break;
- case accordionEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Accordion", afConstants.components.forms.resourceType.accordion);
- break;
- case wizardEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Wizard", afConstants.components.forms.resourceType.wizard);
- break;
- case verticaltabsEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Vertical Tabs", afConstants.components.forms.resourceType.verticaltabs);
- break;
- case tabsontopEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Horizontal Tabs", afConstants.components.forms.resourceType.tabsontop);
- break;
- case imageEditPathSelector:
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Image", afConstants.components.forms.resourceType.formimage);
- break;
- }
- cy.get('body').click(0, 0);
- }
- const sitesDataPath = "/content/core-components-examples/library/adaptive-form/image/jcr:content/root/responsivegrid/demo/component/guideContainer/*";
- const containerDataPath = "/content/forms/af/core-components-it/blank/jcr:content/guideContainer/*";
- const submitBtnSelector = ".cq-dialog-submit";
-
- const dropComponentAndSetName = function (componentEditPathSelector, name, isSites = false) {
- if (isSites) {
- dropComponent(componentEditPathSelector, sitesDataPath);
- } else {
- dropComponent(componentEditPathSelector, containerDataPath);
- }
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + componentEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get(".cq-dialog").should("be.visible");
- cy.get("[name='./name']").click().clear().type(name);
- cy.get(submitBtnSelector).click({force: true});
- }
-
- const testQualifiedName = (componentEditPathSelector, componentDrop, isSites) => {
- const name = "abc"
- const qualifiedName = `$form.${name}`;
- dropComponentAndSetName(componentEditPathSelector, name, isSites);
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + componentEditPathSelector);
- cy.invokeEditableAction("[data-action='qualifiedName']");
- cy.get('#getQualifiedNameDialog').should('be.visible');
- cy.get("coral-dialog[id='getQualifiedNameDialog'] coral-dialog-content").contains(qualifiedName)
-
- cy.get("#getQualifiedNameDialog button[handle='closeButton']").click();
- cy.deleteComponentByPath(componentDrop);
- }
-
- context('Open Forms Editor', function () {
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- cy.on('uncaught:exception', () => {
- return false
- });
- });
-
- it('Test Qualified name for Button', {retries: 3}, function () {
- cy.cleanTest(buttonEditPath).then(function () {
- testQualifiedName(buttonEditPathSelector, buttonDrop);
- });
- });
-
- it('Test Qualified for Checkbox', {retries: 3}, function () {
- cy.cleanTest(checkboxEditPath).then(function () {
- testQualifiedName(checkboxEditPathSelector, checkboxDrop);
- });
- });
-
- it('Test Qualified for Email', {retries: 3}, function () {
- cy.cleanTest(emailinputEditPath).then(function () {
- testQualifiedName(emailinputEditPathSelector, emailinputDrop);
- });
- });
-
- it('Test Qualified for Panel', {retries: 3}, function () {
- cy.cleanTest(containerEditPath).then(function () {
- testQualifiedName(containerEditPathSelector, containerDrop);
- });
- });
-
- it('Test Qualified for Accordion', {retries: 3}, function () {
- cy.cleanTest(accordionEditPath).then(function () {
- testQualifiedName(accordionEditPathSelector, accordionDrop);
- })
- });
-
- it('Test Qualified for Wizard', {retries: 3}, function () {
- cy.cleanTest(wizardEditPath).then(function () {
- testQualifiedName(wizardEditPathSelector, wizardDrop);
- })
- });
-
- it('Test Qualified for Vertical tabs', {retries: 3}, function () {
- cy.cleanTest(verticaltabsEditPath).then(function () {
- testQualifiedName(verticaltabsEditPathSelector, verticaltabsDrop);
- });
- });
-
- it('Test Qualified for Tabs on top', {retries: 3}, function () {
- cy.cleanTest(tabsontopEditPath).then(() => {
- testQualifiedName(tabsontopEditPathSelector, tabsontopDrop);
- });
- });
-
- it('Test Qualified for Image', {retries: 3}, function () {
- cy.cleanTest(imageEditPath).then(() => {
- testQualifiedName(imageEditPathSelector, imageDrop);
- })
- });
-
- it('Test Qualified for File Input', {retries: 3}, function () {
- cy.cleanTest(fileInputEditPath).then(() => {
- testQualifiedName(fileInputEditPathSelector, fileInputDrop);
- })
- });
- })
-
- context('Open Sites Editor', function () {
- const pagePath = "/content/core-components-examples/library/adaptive-form/accordion",
- accordionEditPath = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + "/guideContainer/accordion",
- accordionEditPathSelector = "[data-path='" + accordionEditPath + "']";
-
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- });
- const dropAccordionInSites = function () {
- const dataPath = "/content/core-components-examples/library/adaptive-form/accordion/jcr:content/root/responsivegrid/demo/component/guideContainer/*",
- responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Accordion", afConstants.components.forms.resourceType.accordion);
- cy.get('body').click(0, 0);
- }
-
- it('Test Qualified name is sites', {retries: 3}, function () {
- cy.cleanTest(accordionEditPath).then(function () {
- const name = "abc"
- const qualifiedName = `$form.${name}`;
-
- dropAccordionInSites();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + accordionEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get(".cq-dialog").should("be.visible");
- cy.get("[name='./name']").click().clear().type(name);
- cy.get(submitBtnSelector).click({force: true});
-
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + accordionEditPathSelector);
- cy.invokeEditableAction("[data-action='qualifiedName']");
- cy.get('#getQualifiedNameDialog').should('be.visible');
- cy.get("coral-dialog[id='getQualifiedNameDialog'] coral-dialog-content").contains(qualifiedName)
-
- cy.get("#getQualifiedNameDialog button[handle='closeButton']").click();
-
- cy.deleteComponentByPath(accordionEditPath);
- });
- });
-
- });
- }
-})
\ No newline at end of file
diff --git a/ui.tests/test-module/specs/button/button.authoring.spec.js b/ui.tests/test-module/specs/button/button.authoring.spec.js
index eab78f089c..4f296c882d 100644
--- a/ui.tests/test-module/specs/button/button.authoring.spec.js
+++ b/ui.tests/test-module/specs/button/button.authoring.spec.js
@@ -48,7 +48,7 @@ describe('Button - Authoring', function () {
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)
}
-
+
const testButtonBehaviour = function(buttonEditPathSelector, buttonDrop, isSites) {
if (isSites) {
dropButtonInSites();
@@ -115,28 +115,8 @@ describe('Button - Authoring', function () {
testButtonBehaviourInilineEdit(buttonEditPathSelector, buttonDrop);
cy.deleteComponentByPath(buttonDrop);
});
- });
-
- it('check rich text support for label', function(){
- dropButtonInContainer();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + buttonEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("div[name='richTextTitle']").should('not.be.visible');
-
- // check rich text selector and see if RTE is visible.
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('be.visible').click();
- cy.get("div[name='richTextTitle']").should('be.visible');
- cy.get('.cq-dialog-submit').click();
- });
-
- it('check rich text inline editor is present', function(){
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + buttonEditPathSelector);
- cy.invokeEditableAction("[data-action='EDIT']");
- cy.get(".rte-toolbar").should('be.visible');
- cy.get('.rte-toolbar-item[title="Close"]').should('be.visible').click();
- cy.deleteComponentByPath(buttonDrop);
- });
- });
+ })
+ })
context('Open Sites Editor', function () {
const pagePath = "/content/core-components-examples/library/adaptive-form/button",
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 24fe51fc59..cfe2586070 100644
--- a/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js
+++ b/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.authoring.spec.js
@@ -162,36 +162,8 @@ describe('Page - Authoring', function () {
cy.deleteComponentByPath(checkBoxGroupDrop);
});
- it('check rich text support for label', function(){
- dropCheckBoxGroupInContainer();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + checkBoxGroupEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("div[name='richTextTitle']").should('not.be.visible');
-
- // check rich text selector and see if RTE is visible for title.
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('exist').click();
- cy.get("div[name='richTextTitle']").scrollIntoView();
- 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();
- });
- it('check rich text inline editor is present', function(){
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + checkBoxGroupEditPathSelector);
- cy.invokeEditableAction("[data-action='EDIT']");
- cy.get(".rte-toolbar").should('be.visible');
- cy.get('.rte-toolbar-item[title="Close"]').should('be.visible').click();
- cy.deleteComponentByPath(checkBoxGroupDrop);
- });
- });
+ })
/*
context('Open Sites Editor', function () {
const pagePath = "/content/core-components-examples/library/adaptive-form/textinput",
diff --git a/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.runtime.spec.js b/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.runtime.spec.js
index aac3d003c6..def53c1af7 100644
--- a/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.runtime.spec.js
+++ b/ui.tests/test-module/specs/checkboxgroup/checkboxgroup.runtime.spec.js
@@ -190,14 +190,6 @@ describe("Form Runtime with CheckBoxGroup Input", () => {
})
- it("rich text should render correctly", () => {
- const [checkBox7, checkBox7FieldView] = Object.entries(formContainer._fields)[6];
- cy.get(`#${checkBox7}`).find(".cmp-adaptiveform-checkboxgroup-item").should('have.length', 2);
- cy.get(`#${checkBox7}`).find(".cmp-adaptiveform-checkboxgroup__label").contains('Select Animal').should('have.css', 'font-weight', '700');
- cy.get(`#${checkBox7}`).find(".cmp-adaptiveform-checkboxgroup__option-label span").contains('Dog').should('have.css', 'font-style', 'italic');
- cy.get(`#${checkBox7}`).find(".cmp-adaptiveform-checkboxgroup__option-label span").contains('Cat').should('have.css', 'text-decoration', 'underline solid rgb(50, 50, 50)');
- });
-
it("decoration element should not have same class name", () => {
expect(formContainer, "formcontainer is initialized").to.not.be.null;
cy.wrap().then(() => {
diff --git a/ui.tests/test-module/specs/emailinput/emailinput.runtime.spec.js b/ui.tests/test-module/specs/emailinput/emailinput.runtime.spec.js
index d353dbb2a2..b74ec05cca 100644
--- a/ui.tests/test-module/specs/emailinput/emailinput.runtime.spec.js
+++ b/ui.tests/test-module/specs/emailinput/emailinput.runtime.spec.js
@@ -84,17 +84,9 @@ describe("Form Runtime with Email Input", () => {
it(" Invalid email ID generates error message ", () => {
const [id, fieldView] = Object.entries(formContainer._fields)[0]
- const notAllowed = "invalidEmail"
- cy.get(`#${id}`).find("input").clear().type(notAllowed).blur().then(x => {
- cy.get('.cmp-adaptiveform-emailinput__errormessage').should('be.visible');
- })
- const invalidEmailPattern = "invalidEmail@domain"
- cy.get(`#${id}`).find("input").clear().type(invalidEmailPattern).blur().then(x => {
- cy.get('.cmp-adaptiveform-emailinput__errormessage').should('be.visible');
- })
- const validEmailPattern = "validEmail@domain.com"
- cy.get(`#${id}`).find("input").clear().type(validEmailPattern).blur().then(x => {
- cy.get('.cmp-adaptiveform-emailinput__errormessage').should('not.be.visible');
+ const input = "invalidEmail"
+ cy.get(`#${id}`).find("input").clear().type(input).blur().then(x => {
+ cy.get('.cmp-adaptiveform-emailinput__errormessage').should('exist');
})
});
diff --git a/ui.tests/test-module/specs/embedFormsInSite/embedFormsInSite.runtime.spec.js b/ui.tests/test-module/specs/embedFormsInSite/embedFormsInSite.runtime.spec.js
deleted file mode 100644
index 5c762033f9..0000000000
--- a/ui.tests/test-module/specs/embedFormsInSite/embedFormsInSite.runtime.spec.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright 2023 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-describe("Embed multiple form in site", () => {
-
- context('Forms inside site', function () {
-
- before(() => {
- cy.attachConsoleErrorSpy();
- });
-
- const pagePath = "/content/forms/sites/core-components-it/aemembedmutipleform.html";
- let formContainer = [];
-
- beforeEach(function () {
- cy.previewForm(pagePath, {multipleContainers: true}).then(p => {
- formContainer = p;
- })
- })
-
- const checkHTML = (id, state) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- const passDisabledAttributeCheck = `${state.enabled === false ? "" : "not."}have.attr`;
- const value = state.value == null ? '' : state.value;
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
- return cy.get(`#${id}`).within((root) => {
- cy.get('*').should(passVisibleCheck)
- cy.get('input')
- .should(passDisabledAttributeCheck, 'disabled');
- cy.get('input').should('have.value', value)
- })
- }
-
- it("should render three form", () => {
- expect(formContainer.length).to.equal(3);
- });
-
- it("form 1 model initialized properly", () => {
- expect(formContainer[0], "formcontainer is initialized").to.not.be.null;
- expect(Object.keys(formContainer[0]._fields).length).to.equal(11);
- });
-
- it("form 2 model initialized properly", () => {
- expect(formContainer[1], "formcontainer is initialized").to.not.be.null;
- expect(Object.keys(formContainer[1]._fields).length).to.equal(4);
- });
-
- it(" model's changes are reflected in the html for form1", () => {
- const [id, fieldView] = Object.entries(formContainer[0]._fields)[0]
- const model = formContainer[0]._model.getElement(id)
- model.value = "some other value"
- checkHTML(model.id, model.getState()).then(() => {
- model.visible = false
- return checkHTML(model.id, model.getState())
- }).then(() => {
- model.enabled = false
- return checkHTML(model.id, model.getState())
- })
- cy.expectNoConsoleErrors();
- });
-
- it(" model's changes are reflected in the html for form 2", () => {
- const [id, fieldView] = Object.entries(formContainer[1]._fields)[0]
- const model = formContainer[1]._model.getElement(id)
- model.value = "some other value"
- checkHTML(model.id, model.getState()).then(() => {
- model.visible = false
- return checkHTML(model.id, model.getState())
- }).then(() => {
- model.enabled = false
- return checkHTML(model.id, model.getState())
- })
- });
-
- it("testing add/remove instance for wizard", () => {
- cy.get(".cmp-adaptiveform-wizard__tab").should('have.length', 4);
- cy.get(".cmp-adaptiveform-wizard__wizardpanel").should('have.length', 4);
- cy.get("button").contains("+R1").click().then(() => {
- cy.get(".cmp-adaptiveform-wizard__tab").should('have.length', 5);
- cy.get(".cmp-adaptiveform-wizard__wizardpanel").should('have.length', 5);
- cy.get("button").contains("-R1").click().then(() => {
- cy.get(".cmp-adaptiveform-wizard__tab").should('have.length', 4);
- cy.get(".cmp-adaptiveform-wizard__wizardpanel").should('have.length', 4);
- cy.get("button").contains("-R1").click().then(() => {
- cy.get(".cmp-adaptiveform-wizard__tab").should('have.length', 3);
- cy.get(".cmp-adaptiveform-wizard__wizardpanel").should('have.length', 3);
- })
- })
- })
- cy.expectNoConsoleErrors();
- })
-
-})
-})
\ No newline at end of file
diff --git a/ui.tests/test-module/specs/image/image.authoring.spec.js b/ui.tests/test-module/specs/image/image.authoring.spec.js
index ea120cdb9a..47ec438a7b 100644
--- a/ui.tests/test-module/specs/image/image.authoring.spec.js
+++ b/ui.tests/test-module/specs/image/image.authoring.spec.js
@@ -77,19 +77,8 @@ describe('Page - Authoring', function () {
it ('open edit dialog of Image', function(){
testImageBehaviour(imageEditPathSelector, imageDrop);
- });
-
- it('check rich text support for label', function(){
- dropImageInContainer();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + imageEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- //rich text shouldn't be present in image component
- cy.get("div[name='richTextTitle']").should('not.exist');
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('not.exist');
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(imageDrop);
- });
- });
+ })
+ })
context('Open Sites Editor', function () {
const pagePath = "/content/core-components-examples/library/adaptive-form/image",
diff --git a/ui.tests/test-module/specs/panelcontainer/panelcontainer.authoring.spec.js b/ui.tests/test-module/specs/panelcontainer/panelcontainer.authoring.spec.js
index b1473b7167..ef37b396f4 100644
--- a/ui.tests/test-module/specs/panelcontainer/panelcontainer.authoring.spec.js
+++ b/ui.tests/test-module/specs/panelcontainer/panelcontainer.authoring.spec.js
@@ -94,20 +94,7 @@ describe('Page - Authoring', function () {
it('open edit dialog of Panel', function () {
testPanelBehaviour(panelContainerPathSelector, panelEditPath);
- });
-
- it('check rich text support for label', function(){
- dropPanelInContainer();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + panelContainerPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("div[name='richTextTitle']").should('not.be.visible');
-
- // check rich text selector and see if RTE is visible.
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('be.visible').click();
- cy.get("div[name='richTextTitle']").should('be.visible');
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(panelEditPath);
- });
+ })
})
context('Open Sites Editor', function () {
diff --git a/ui.tests/test-module/specs/radiobutton/radiobutton.authoring.spec.js b/ui.tests/test-module/specs/radiobutton/radiobutton.authoring.spec.js
index 84e97b2bd3..07fed297b8 100644
--- a/ui.tests/test-module/specs/radiobutton/radiobutton.authoring.spec.js
+++ b/ui.tests/test-module/specs/radiobutton/radiobutton.authoring.spec.js
@@ -103,26 +103,6 @@ describe('Page - Authoring', function () {
});
});
- it('check rich text support for label', function(){
- dropRadioButtonInGuideContainer();
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + radioButtonEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("div[name='richTextTitle']").should('not.be.visible');
-
- // check rich text selector and see if RTE is visible.
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('be.visible').click();
- cy.get("div[name='richTextTitle']").scrollIntoView().should('be.visible');
- cy.get('.cq-dialog-submit').click();
- });
-
- it('check rich text inline editor is present', function(){
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + radioButtonEditPathSelector);
- cy.invokeEditableAction("[data-action='EDIT']");
- cy.get(".rte-toolbar").should('be.visible');
- cy.get('.rte-toolbar-item[title="Close"]').should('be.visible').click();
- cy.deleteComponentByPath(radioButtonDrop);
- });
-
it ('check value type validations', function() {
cy.cleanTest(radioButtonDrop).then(function() {
// For Number Type
diff --git a/ui.tests/test-module/specs/replaceaction/replacelayout-container.authoring.spec.js b/ui.tests/test-module/specs/replaceaction/replacelayout-container.authoring.spec.js
index 1a25f58d59..299b6d6fb4 100644
--- a/ui.tests/test-module/specs/replaceaction/replacelayout-container.authoring.spec.js
+++ b/ui.tests/test-module/specs/replaceaction/replacelayout-container.authoring.spec.js
@@ -21,7 +21,7 @@ const sitesSelectors = require('../../libs/commons/sitesSelectors'),
* Testing Form Component replace behaviour in authoring
*/
describe('component replace - Authoring', function () {
- const fieldTypes = {TEXT: 'text', SELECT: 'select', NON_INPUT: 'nonInputReadOnly', CHECKBOX: 'checkbox'}
+ const fieldTypes = {TEXT: 'text', SELECT: 'select', NON_INPUT: 'nonInputReadOnly'}
const typeMap = {
"formbutton": fieldTypes.NON_INPUT,
"formcheckboxgroup": fieldTypes.SELECT,
@@ -34,9 +34,7 @@ describe('component replace - Authoring', function () {
"formtext": fieldTypes.NON_INPUT,
"formtextinput": fieldTypes.TEXT,
"title": fieldTypes.NON_INPUT,
- "formimage": fieldTypes.NON_INPUT,
- "checkbox": fieldTypes.CHECKBOX,
- "switch": fieldTypes.CHECKBOX
+ "formimage": fieldTypes.NON_INPUT
}
const pagePath = "/content/forms/af/core-components-it/blank",
buttonEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/button",
@@ -45,6 +43,7 @@ describe('component replace - Authoring', function () {
checkboxEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/checkboxgroup",
checkboxEditPathSelector = "[data-path='" + checkboxEditPath + "']",
checkboxDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formcheckboxgroup.split("/").pop(),
+ dataPath = "/content/core-components-examples/library/adaptive-form/emailinput/jcr:content/root/responsivegrid/demo/component/guideContainer/*",
emailinputEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/emailinput",
emailinputEditPathSelector = "[data-path='" + emailinputEditPath + "']",
emailinputDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.formemailinput.split("/").pop();
@@ -160,7 +159,7 @@ describe('component replace - Authoring', function () {
testComponentReplaceBehaviour(buttonEditPathSelector, buttonDrop);
})
- it('replace checkbox with switch', function () {
+ it('replace checkbox with radio button', function () {
testComponentReplaceBehaviour(checkboxEditPathSelector, checkboxDrop);
})
diff --git a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js b/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
deleted file mode 100644
index d96a8ae034..0000000000
--- a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2023 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-describe("Form with multipe components", () => {
-
- const pagePath = "content/forms/af/core-components-it/samples/setfocus.html";
- let formContainer = null
-
-
- beforeEach(() => {
- cy.previewForm(pagePath).then(p => {
- formContainer = p;
- })
- });
-
- const checkHTML = (id, state, view, count) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
- expect(state.items.length, "model has children equal to count").to.equal(count);
- if (count == 0) {
- return cy.get(`.${childBemBlock}`).should('not.exist');
- } else {
- return cy.get(`.${childBemBlock}`).should('have.length', count);
- }
- };
-
- it("check if first tab activated if focus call from other tab", () => {
- const firstChildComponentId = formContainer._model.items[7].items[1].items[0].id;
- const firstChildComponentButtonId = formContainer._model.items[0].id ;
- cy.get(`#${firstChildComponentButtonId}`).click();
- cy.get(`#${firstChildComponentId}`).isElementInViewport().should("eq", true);
- })
-
-
-})
\ No newline at end of file
diff --git a/ui.tests/test-module/specs/switch/switch.authoring.spec.js b/ui.tests/test-module/specs/switch/switch.authoring.spec.js
deleted file mode 100644
index be8670934b..0000000000
--- a/ui.tests/test-module/specs/switch/switch.authoring.spec.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 2023 Adobe Systems Incorporated
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-const sitesSelectors = require('../../libs/commons/sitesSelectors'),
- afConstants = require('../../libs/commons/formsConstants');
-
-/**
- * Testing Switch with Sites Editor
- */
-describe('Page - Authoring', function () {
-
-
- const dropSwitchInSites = function() {
- const dataPath = "/content/core-components-examples/library/adaptive-form/switch/jcr:content/root/responsivegrid/demo/component/guideContainer/*",
- responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Switch", afConstants.components.forms.resourceType.switch);
- cy.get('body').click( 0,0);
- };
-
- const dropSwitchInContainer = function() {
- const dataPath = "/content/forms/af/core-components-it/blank/jcr:content/guideContainer/*",
- responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Switch", afConstants.components.forms.resourceType.switch);
- cy.get('body').click(0, 0);
- }
-
- const testSwitchBehaviour = function (switchEditPathSelector, switchDrop, isSites) {
- if (isSites) {
- dropSwitchInSites();
- } else {
- dropSwitchInContainer();
- }
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + switchEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("[name='./name']")
- .should("exist");
-
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(switchDrop);
- }
-
- context('Open Forms Editor', function() {
- const pagePath = "/content/forms/af/core-components-it/blank",
-
- switchEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/switch",
- switchEditPathSelector = "[data-path='" + switchEditPath + "']",
- switchDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.switch.split("/").pop();
-
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- });
-
- it('insert Switch in form container', function () {
- dropSwitchInContainer();
- cy.deleteComponentByPath(switchDrop);
- });
-
- it('when enableUnchecked is false hides off field', {retries: 3}, function () {
- cy.cleanTest(switchDrop).then(() => {
- dropSwitchInContainer();
- const pagePath = "/content/forms/af/core-components-it/blank",
- switchEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/switch",
- switchEditPathSelector = "[data-path='" + switchEditPath + "']";
- cy.get(switchEditPathSelector).click();
- cy.invokeEditableAction("[data-action='CONFIGURE']"); // this line is causing frame busting which is causing cypress to fail
- cy.get(".cmp-adaptiveform-switch__enums coral-multifield-item").eq(1).should('not.be.visible')
- const enableUnchecked = '[name="./enableUncheckedValue"]';
- cy.get(enableUnchecked).eq(0).click().then(() => {
- cy.get(".cmp-adaptiveform-switch__enums coral-multifield-item-content label").eq(3).scrollIntoView().should('be.visible');
- })
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(switchDrop);
- });
- });
-
- it('open edit dialog of aem forms Switch', {retries: 3}, function() {
- cy.cleanTest(switchDrop).then(() => {
- testSwitchBehaviour(switchEditPathSelector, switchDrop, false);
- });
- });
- })
-
- context('Open Sites Editor', function() {
- const pagePath = "/content/core-components-examples/library/adaptive-form/switch",
- switchEditPath = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + "/guideContainer/switch",
- switchDrop = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + '/guideContainer/' + afConstants.components.forms.resourceType.switch.split("/").pop(),
- switchEditPathSelector = "[data-path='" + switchEditPath + "']";
-
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- });
-
- it('insert aem forms Switch', function () {
- dropSwitchInSites();
- cy.deleteComponentByPath(switchDrop);
- });
-
- it('when enableUnchecked is false hides off field', {retries: 3}, function () {
- cy.cleanTest(switchDrop).then(() => {
- 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
- cy.get(".cmp-adaptiveform-switch__enums coral-multifield-item").eq(1).should('not.be.visible');
- const enableUnchecked = '[name="./enableUncheckedValue"]';
- cy.get(enableUnchecked).eq(0).click().then(() => {
- cy.get(".cmp-adaptiveform-switch__enums coral-multifield-item-content label").eq(3).scrollIntoView().should('be.visible');
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(switchDrop);
- })
-
- })
- });
-
- it('open edit dialog of aem forms switch', {retries: 3}, function() {
- cy.cleanTest(switchDrop).then(() => {
- testSwitchBehaviour(switchEditPathSelector, switchDrop, true);
- });
- });
- })
-});
diff --git a/ui.tests/test-module/specs/switch/switch.runtime.spec.js b/ui.tests/test-module/specs/switch/switch.runtime.spec.js
deleted file mode 100644
index b4bf6b7135..0000000000
--- a/ui.tests/test-module/specs/switch/switch.runtime.spec.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright 2023 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-describe("Form Runtime with Switch Input", () => {
-
- const pagePath = "content/forms/af/core-components-it/samples/switch/basic.html"
- const bemBlock = "cmp-adaptiveform-switch"
-
- let formContainer = null
-
- beforeEach(() => {
- cy.previewForm(pagePath).then(p => {
- formContainer = p;
- })
- });
-
- const checkHTML = (id, state) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- const passDisabledAttributeCheck = `${state.enabled === false || state.readOnly === true ? "" : "not."}have.attr`;
- const value = state.value
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
-
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
-
- return cy.get(`#${id}`).within((root) => {
- cy.get('*').should(passVisibleCheck)
- cy.get('input')
- .should('have.length', 1)
- cy.get('input')
- .should(passDisabledAttributeCheck, 'disabled');
- cy.get('input').should('be.checked');
- })
- }
-
- it(" should get model and view initialized properly ", () => {
- expect(formContainer, "formcontainer is initialized").to.not.be.null;
- expect(formContainer._model.items.length, "model and view elements match").to.equal(Object.keys(formContainer._fields).length);
- Object.entries(formContainer._fields).forEach(([id, field]) => {
- expect(field.getId()).to.equal(id)
- expect(formContainer._model.getElement(id), `model and view are in sync`).to.equal(field.getModel())
- });
- })
-
- it(" model's changes are reflected in the html ", () => {
- const id = formContainer._model.items[0].id;
- const model = formContainer._model.getElement(id)
- model.value = '0'
-
- checkHTML(model.id, model.getState()).then(() => {
- return checkHTML(model.id, model.getState())
- }).then(() => {
- model.enable = false
- return checkHTML(model.id, model.getState())
- })
- });
-
- it('should have initial value "undefined" if no default set', () => {
- const id = formContainer._model.items[0].id;
- const model = formContainer._model.getElement(id)
- expect(model.getState().value).eq(undefined)
- })
-
- it ('should have value set to false if checked and then unchecked', () => {
- const id = formContainer._model.items[0].id;
- const model = formContainer._model.getElement(id)
- cy.get(`#${id}`).find("input").click().then(() => {
- cy.get(`#${id}`).find("input").click().then(() => {
- expect(model.getState().value).eq(undefined)
- })
- })
-
- })
-
- it('should have value set to default during initial render', () => {
- const id = formContainer._model.items[1].id;
- const model = formContainer._model.getElement(id)
- expect(model.getState().value).to.contain('0');
- cy.get(`#${id}`).get('input').should('be.checked');
- })
-
- it(" html changes are reflected in model ", () => {
-
- const id = formContainer._model.items[0].id;
- const model = formContainer._model.getElement(id)
- cy.get(`#${id}`).find("input").click().then(x => {
- expect(model.getState().value).to.contain('0');
- })
-
- cy.get(`#${id}`).find("input").click().then(x => {
- expect(model.getState().value).equal(undefined);
- })
- });
-
- it(" should show error messages in the HTML ", () => {
- const id = formContainer._model.items[2].id;
- const model = formContainer._model.getElement(id)
-
- cy.get(`#${id}`).find("input").click().then(x => {
- expect(model.getState().value).to.contain('0');
- })
-
- cy.get(`#${id}`).find("input").click().then(x => {
- cy.get(`#${id}`).find(".cmp-adaptiveform-switch__errormessage").should('have.text',"This is a custom required switch")
- })
-
- cy.get(`#${id}`).find("input").click().then(x => {
- cy.get(`#${id}`).find(".cmp-adaptiveform-switch__errormessage").should('have.text',"")
- })
- });
-
- it("should toggle description and tooltip", () => {
- const id = formContainer._model.items[0].id;
- cy.toggleDescriptionTooltip(bemBlock, id);
- })
-
- it("should show and hide components on certain switch input", () => {
- // Rule on switch4: When switch4 is ON => Show switch5 and
- // hide switch5 when switch4 is OFF
-
- const ruleSwitch = formContainer._model.items[3].id;
- const hiddenCB = formContainer._model.items[4].id;
-
- cy.get(`#${hiddenCB}`).should('not.be.visible');
-
- cy.get(`#${ruleSwitch}`).find('input').click().then(x => {
- cy.get(`#${hiddenCB}`).should('be.visible');
- cy.get(`#${ruleSwitch}`).find('input').click().then(x => {
- cy.get(`#${hiddenCB}`).should('not.be.visible')
- });
- });
-
- })
-
- it("should enable and disable components on certain switch input", () => {
- // Rule on switch enabledisable: When switch 'enabledisable' is ON => Enable switch cb5
- // and hide cb5 when enabledisable is OFF
-
- const enabledisablecb = formContainer._model.items[5].id;
- const cbUnderTest = formContainer._model.items[6].id;
-
- // Initially cb should be disabled
- cy.get(`#${cbUnderTest}`).find("input").should('not.be.enabled')
-
- // check to enable cb
- cy.get(`#${enabledisablecb}`).find("input").click().then(x => {
- cy.get(`#${cbUnderTest}`).find("input").should('be.enabled')
- // uncheck to disable cb
- cy.get(`#${enabledisablecb}`).find("input").click().then(x => {
- cy.get(`#${cbUnderTest}`).find("input").should('not.be.enabled')
-
- })
- })
- })
-})
diff --git a/ui.tests/test-module/specs/termsandconditions/tnc.authoring.spec.js b/ui.tests/test-module/specs/termsandconditions/tnc.authoring.spec.js
deleted file mode 100644
index e18919fb8b..0000000000
--- a/ui.tests/test-module/specs/termsandconditions/tnc.authoring.spec.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2022 Adobe Systems Incorporated
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-const sitesSelectors = require('../../libs/commons/sitesSelectors'),
- afConstants = require('../../libs/commons/formsConstants');
-
-/**
- * Testing Terms and Conditions with Sites Editor
- */
-describe('Page - Authoring', function () {
-
-
- const dropTnCInSites = function() {
- const dataPath = "/content/core-components-examples/library/adaptive-form/termsandconditions/jcr:content/root/responsivegrid/demo/component/guideContainer/*",
- responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Terms And Conditions", afConstants.components.forms.resourceType.termsandconditions);
- cy.get('body').click( 0,0);
- };
-
- const dropTncInContainer = function() {
- const dataPath = "/content/forms/af/core-components-it/blank/jcr:content/guideContainer/*",
- responsiveGridDropZoneSelector = sitesSelectors.overlays.overlay.component + "[data-path='" + dataPath + "']";
- cy.selectLayer("Edit");
- cy.insertComponent(responsiveGridDropZoneSelector, "Adaptive Form Terms And Conditions", afConstants.components.forms.resourceType.termsandconditions);
- cy.get('body').click(0, 0);
- }
-
- const testTncBehaviour = function (tncEditPathSelector, tncDrop, isSites) {
- if (isSites) {
- dropTnCInSites();
- } else {
- dropTncInContainer();
- }
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + tncEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']"); // this line is causing frame busting which is causing cypress to fail
- cy.get("[name='./name']")
- .should("exist");
-
- cy.get("coral-checkbox[name='./showApprovalOption']")
- .should('have.attr', 'checked');
-
- cy.get("input[name='./showApprovalOption']")
- .click().then(e => {
- cy.get("input[name='./showAsPopup']").click()
- .then(e => {
- cy.get("coral-checkbox[name='./showApprovalOption']")
- .should('have.attr', 'checked');
- })
- });
-
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('be.visible').click();
- cy.get("div[name='richTextTitle']").should('be.visible');
-
- cy.get('.cq-dialog-cancel').click();
- cy.deleteComponentByPath(tncDrop);
- }
-
- // ***** //
-
- context('Open Forms Editor', function() {
- const pagePath = "/content/forms/af/core-components-it/blank",
- tncEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/termsandconditions",
- tncEditPathSelector = "[data-path='" + tncEditPath + "']",
- tncDrop = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/" + afConstants.components.forms.resourceType.termsandconditions.split("/").pop();
-
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- });
-
- it('insert TnC in form container', function () {
- dropTncInContainer();
- cy.deleteComponentByPath(tncDrop);
- });
-
- it('Test TnC authoring behaviour', function() {
- testTncBehaviour(tncEditPathSelector, tncDrop, false);
- });
- })
-
- context('Open Sites Editor', function() {
- const pagePath = "/content/core-components-examples/library/adaptive-form/termsandconditions",
- tncEditPath = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + "/guideContainer/termsandconditions",
- tncDrop = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + '/guideContainer/' + afConstants.components.forms.resourceType.termsandconditions.split("/").pop(),
- tncEditPathSelector = "[data-path='" + tncEditPath + "']";
-
- beforeEach(function () {
- // this is done since cypress session results in 403 sometimes
- cy.openAuthoring(pagePath);
- });
-
- it('insert aem forms TnC', function () {
- dropTnCInSites();
- cy.deleteComponentByPath(tncDrop);
- });
-
- it('Test TnC authoring behaviour', function() {
- testTncBehaviour(tncEditPathSelector, tncDrop, true);
- });
- })
-});
diff --git a/ui.tests/test-module/specs/termsandconditions/tnc.runtime.spec.js b/ui.tests/test-module/specs/termsandconditions/tnc.runtime.spec.js
deleted file mode 100644
index 017b060a3f..0000000000
--- a/ui.tests/test-module/specs/termsandconditions/tnc.runtime.spec.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright 2022 Adobe
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-describe("Form Runtime with Terms and Conditions", () => {
-
- const pagePath = "content/forms/af/core-components-it/samples/termsandconditions/basic.html",
- externalPagePathSubmit="content/forms/af/core-components-it/samples/termsandconditions/submissiontest.html"
- const bemBlock = 'cmp-adaptiveform-termsandcondition'
- const IS = "adaptiveFormTermsAndConditions"
- const selectors = {
- tnc : `[data-cmp-is="${IS}"]`
- }
-
- let formContainer = null
-
- beforeEach(() => {
- cy.previewForm(pagePath).then(p => {
- formContainer = p;
- })
- });
-
- const checkHTML = (id, state, view, count) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
- expect(state.items.length, "model has children equal to count").to.equal(2);
- expect(view.children.length, "tab has children equal to count").to.equal(2); // this is because at any given point, either links are shown or text content is shown
- return cy.get(`#${id}`);
- };
-
- it(" should get model and view initialized properly and parent child relationship is set ", () => {
- expect(formContainer, "formcontainer is initialized").to.not.be.null;
- const fields = formContainer.getAllFields();
- Object.entries(fields).forEach(([id, field]) => {
- expect(field.getId()).to.equal(id);
- expect(formContainer._model.getElement(id), `model and view are in sync`).to.equal(field.getModel());
- });
- });
-
- it(" model's changes are reflected in the html ", () => {
- const tncId = formContainer._model.items[0].id
- const model = formContainer._model.getElement(tncId)
- const tabView = formContainer.getAllFields()[tncId];
- const count = 2;
- checkHTML(model.id, model.getState(), tabView, count).then(() => {
- model.visible = false;
- return checkHTML(model.id, model.getState(), tabView, count);
- }).then(() => {
- model.enable = false;
- return checkHTML(model.id, model.getState(), tabView, count);
- });
- });
-
-
- it("OOTB behaviour -> should enable approval checkbox only if links visited", () => {
- const tncWithLinksID = formContainer._model.items[1].id;
- const model = formContainer._model.getElement(tncWithLinksID)
- expect(model.getState().items[0].enabled).to.equal(false);
- cy.get(`#${tncWithLinksID}`).get('a').click()
- .then(() => {
- expect(model.getState().items[0].enabled).to.equal(true);
- })
-
- });
-
- it("OOTB behaviour -> should have show popup", () => {
- const tncWithPopup = formContainer._model.items[2].id;
- const model = formContainer._model.getElement(tncWithPopup)
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-termsandcondition__content-container`)
- .should('have.class', 'cmp-adaptiveform-termsandcondition__content-container--modal')
- .invoke('attr', 'data-cmp-visible').should('eq', 'false')
- expect(model.getState().items[1].enabled).to.equal(false);
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-checkbox__widget-container label`).click()
- .then(() => {
- // this test will also verify scrollDone scenario
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-checkbox`).invoke('attr', 'data-cmp-enabled')
- .should('eq', 'true')
-
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-termsandcondition__content-container`)
- .invoke('attr', 'data-cmp-visible').should('not.exist');
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-termsandcondition__close-button`).click()
- .then(() => {
- cy.get(`#${tncWithPopup} .cmp-adaptiveform-termsandcondition__content-container`)
- .invoke('attr', 'data-cmp-visible').should('eq', 'false', );
- })
- })
- });
-})
-
diff --git a/ui.tests/test-module/specs/textinput/textinput.authoring.spec.js b/ui.tests/test-module/specs/textinput/textinput.authoring.spec.js
index f8799b436d..e2a6490d7e 100644
--- a/ui.tests/test-module/specs/textinput/textinput.authoring.spec.js
+++ b/ui.tests/test-module/specs/textinput/textinput.authoring.spec.js
@@ -65,29 +65,6 @@ describe('Page - Authoring', function () {
})
}
- const testRichTextDialog = function (textInputEditPathSelector, textInputDrop, isSites) {
- if (isSites) {
- dropTextInputInSites();
- } else {
- dropTextInputInContainer();
- }
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + textInputEditPathSelector);
- cy.invokeEditableAction("[data-action='CONFIGURE']");
- cy.get("div[name='richTextTitle']").should('not.be.visible');
-
- // check rich text selector and see if RTE is visible.
- cy.get('.cmp-adaptiveform-base__istitlerichtext').should('be.visible').click();
- cy.get("div[name='richTextTitle']").scrollIntoView().should('be.visible');
- cy.get('.cq-dialog-submit').click();
- cy.reload();
-
- cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + textInputEditPathSelector);
- cy.invokeEditableAction("[data-action='EDIT']");
- cy.get(".rte-toolbar").should('be.visible');
- cy.get('.rte-toolbar-item[title="Close"]').scrollIntoView().should('be.visible').click();
- cy.deleteComponentByPath(textInputDrop);
- };
-
const testCopyPasteComponent = function (textInputEditPathSelector, textInputEditPathSelectorCopy, textInputDrop) {
dropTextInputInContainer();
cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + textInputEditPathSelector);
@@ -143,15 +120,11 @@ describe('Page - Authoring', function () {
it('open edit dialog of TextInput', function () {
testTextInputBehaviour(textInputEditPathSelector, textInputDrop);
- });
+ })
it.skip('pasted component should have unique name', function () {
testCopyPasteComponent(textInputEditPathSelector, textInputEditPathSelectorCopy, textInputDrop);
- });
-
- it('check rich text support for label', function(){
- testRichTextDialog(textInputEditPathSelector, textInputDrop);
- });
+ })
})
context('Open Sites Editor', function () {
@@ -176,10 +149,6 @@ describe('Page - Authoring', function () {
testTextInputBehaviour(textInputEditPathSelector, textInputDrop, true);
});
- it('check rich text support for label in sites', function(){
- testRichTextDialog(textInputEditPathSelector, textInputDrop, true);
- });
-
// conditionally run the test on latest addon
//if (cy.af.isLatestAddon()) {
it('Test z-index of Rule editor iframe', function () {