Skip to content

Commit

Permalink
Merge branch 'dev' into password-comp
Browse files Browse the repository at this point in the history
  • Loading branch information
devgurjar authored Sep 26, 2024
2 parents fdcdfb9 + 1b4ad3b commit 9432b5c
Show file tree
Hide file tree
Showing 346 changed files with 10,413 additions and 3,990 deletions.
4 changes: 2 additions & 2 deletions .circleci/ci/it-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ try {

//todo: remove this later, once aem image is released, since sites rotary aem base image has "2.25.4"
//let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true);
let wcmVersion = WCM_COMPONENTS ? WCM_COMPONENTS : "2.25.4";
let wcmVersion = "2.26.0";
ci.stage("Integration Tests");
ci.dir(qpPath, () => {
// Connect to QP
Expand Down Expand Up @@ -146,7 +146,7 @@ try {
let testSuites = params.join(',');
if (CORE_COMPONENTS) {
// we run only some test suites for older core components
testSuites = "specs/prefill/customprefill.spec.js,specs/prefill/repeatableprefillwithzerooccurrencefortabaccordionwizard.spec.js,specs/actions/submit/submit.runtime.spec.js,specs/actions/render/render_with_openapi.spec.js";
testSuites = "specs/prefill/customprefill.cy.js,specs/prefill/repeatableprefillwithzerooccurrencefortabaccordionwizard.cy.js,specs/actions/submit/submit.runtime.cy.js,specs/actions/render/render_with_openapi.cy.js";
}
// start running the tests
ci.dir('ui.tests', () => {
Expand Down
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ common:
# Supports 'Re-run failed tests only'. See this for more info: https://circleci.com/docs/rerun-failed-tests-only/
command: |
cd ui.tests/test-module
TESTFILES=$(circleci tests glob "specs/**/*.spec.js")
TESTFILES=$(circleci tests glob "specs/**/*.cy.js")
cd ../../
echo "false" >> TEST_EXECUTION_STATUS.txt
echo $TESTFILES | circleci tests run --command="xargs node .circleci/ci/it-tests.js" --verbose --split-by=timings
Expand Down Expand Up @@ -107,6 +107,13 @@ common:
# Save test results as artifacts
- store_artifacts:
path: ui.tests/test-module/target
- run:
name: Move .cy.json files to target directory of cypress
command: |
mkdir -p ui.tests/test-module/target/cy-json
find ui.tests/test-module -name "*.cy.json" -exec mv {} ui.tests/test-module/target/cy-json/ \;
- store_artifacts:
path: ui.tests/test-module/target/cy-json
# Save AEM logs as artifacts
- store_artifacts:
path: logs
Expand Down Expand Up @@ -222,7 +229,6 @@ jobs:
PRERELEASE: 'true'
FT: 'true'
CORE_COMPONENTS: '3.0.0'
WCM_COMPONENTS: '2.25.4'
resource_class: xlarge
working_directory: /home/circleci/build
parallelism: 8
Expand Down
2 changes: 1 addition & 1 deletion .circleci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
entrypoint: tail -f /dev/null # Keeps the container running

circleci-aem-cloudready:
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:3f4b114b96-openjdk11
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:17689-rel-openjdk11
depends_on:
- circleci-qp
# Add any additional configurations or environment variables if needed
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ ui.tests/test-module/reports
ui.tests/test-module/cypress

.java-version

# Ignore Cypress runtime JSON files
ui.tests/test-module/**/*.cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Button;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractBaseImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down Expand Up @@ -87,6 +88,11 @@ public String getButtonType() {
return buttonType;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.BUTTON);
}

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_DOR_EXCLUSION)
@Default(booleanValues = false)
protected boolean dorExclusion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.CheckBox;
import com.adobe.cq.forms.core.components.models.form.CheckBoxGroup;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down Expand Up @@ -83,4 +84,9 @@ public Integer getMaxItems() {
public Type getType() {
return super.getType(); // check box group always has type array // we always return boolean[], string[] or number[]
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CHECKBOX_GROUP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.ConstraintType;
import com.adobe.cq.forms.core.components.models.form.DatePicker;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;

Expand Down Expand Up @@ -83,6 +84,11 @@ public Date getExclusiveMinimumDate() {
return ComponentUtils.clone(exclusiveMinimumVaue);
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.DATE_INPUT);
}

public @NotNull Map<ConstraintType, String> getConstraintMessages() {
Map<ConstraintType, String> res = super.getConstraintMessages();
String msg = getConstraintMessage(ConstraintType.MINIMUM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.DropDown;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;

@Model(
Expand Down Expand Up @@ -56,4 +57,9 @@ public Integer getMaxItems() {
public Boolean isMultiSelect() {
return multiSelect;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.DROP_DOWN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FileInput;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;

Expand Down Expand Up @@ -79,6 +80,11 @@ public Type getType() {
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.FILE_INPUT);
}

@Override
public Boolean isMultiple() {
return multiSelection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.NumberInput;
import com.adobe.cq.forms.core.components.util.AbstractFieldImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;
Expand Down Expand Up @@ -129,6 +130,11 @@ public Type getType() {
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.NUMBER_INPUT);
}

@PostConstruct
private void initNumberInput() {
Object tempExclusiveMaximumValue = ComponentUtils.getExclusiveValue(exclusiveMaximum, maximumAsStr != null ? maximumAsStr : maximum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.Panel;
import com.adobe.cq.forms.core.components.util.AbstractContainerImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -107,6 +108,11 @@ public Type getType() {
return null;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PANEL);
}

@Override
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.RadioButton;
import com.adobe.cq.forms.core.components.util.AbstractOptionsFieldImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -68,4 +69,9 @@ private void initRadioButtonModel() {
public Orientation getOrientation() {
return orientation;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.RADIO_GROUP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.StaticImage;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.day.cq.wcm.foundation.Image;
Expand Down Expand Up @@ -138,4 +139,9 @@ public String getLinkUrl() {
}
return properties;
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.IMAGE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.Text;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.fasterxml.jackson.annotation.JsonIgnore;
Expand Down Expand Up @@ -69,4 +70,9 @@ public boolean isRichText() {
public String getText() {
return getValue();
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PLAIN_TEXT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ public boolean isMultiLine() {
public String getFieldType() {
if (isMultiLine()) {
return FieldType.MULTILINE_INPUT.getValue();
} else {
return super.getFieldType();
}
return super.getFieldType(FieldType.TEXT_INPUT);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import com.adobe.cq.forms.core.components.internal.models.v1.form.FormMetaDataImpl;
import com.adobe.cq.forms.core.components.models.form.AutoSaveConfiguration;
import com.adobe.cq.forms.core.components.models.form.Container;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FormClientLibManager;
import com.adobe.cq.forms.core.components.models.form.FormContainer;
import com.adobe.cq.forms.core.components.models.form.FormMetaData;
Expand Down Expand Up @@ -124,6 +125,11 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
@Self(injectionStrategy = InjectionStrategy.OPTIONAL)
private AutoSaveConfiguration autoSaveConfig;

@Override
public String getFieldType() {
return super.getFieldType(FieldType.FORM);
}

@PostConstruct
protected void initFormContainerModel() {
if (request != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.adobe.cq.forms.core.components.internal.Heading;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.adobe.cq.forms.core.components.models.form.FormTitle;
import com.adobe.cq.forms.core.components.util.AbstractFormComponentImpl;
import com.adobe.cq.forms.core.components.util.ComponentUtils;
Expand Down Expand Up @@ -69,6 +70,11 @@ public class TitleImplV2 extends AbstractFormComponentImpl implements FormTitle

private Heading heading;

@Override
public String getFieldType() {
return super.getFieldType(FieldType.PLAIN_TEXT);
}

/**
* Translation of the title property
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public enum FieldType {
FORM("form"),
CHECKBOX_GROUP("checkbox-group"),
IMAGE("image"),
PASSWORD("password");
TELEPHONE("tel"),
PASSWORD("password"),
RANGE("range");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public interface FormContainer extends Container {
*/
String PN_CLIENT_LIB_REF = GuideConstants.CLIENT_LIB_REF;

String DEFAULT_FORMS_SPEC_VERSION = "0.14.0";
String DEFAULT_FORMS_SPEC_VERSION = "0.14.1";

/**
* Returns form metadata {@link FormMetaData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ public String getScreenReaderText() {
if (AssistPriority.LABEL.equals(assistPriority)) {
Label label = getLabel();
if (label != null) {
screenReaderText = "$label.$value";
screenReaderText = label.getValue();
}
} else if (AssistPriority.NAME.equals(assistPriority)) {
screenReaderText = "$name";
screenReaderText = getName();
} else if (AssistPriority.DESCRIPTION.equals(assistPriority)) {
screenReaderText = "$description";
screenReaderText = getDescription();
} else if (AssistPriority.CUSTOM.equals(assistPriority)) {
screenReaderText = "'" + customAssistPriorityMsg + "'"; // json formula string literal
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.adobe.aemds.guide.service.GuideException;
import com.adobe.cq.forms.core.components.models.form.Captcha;
import com.adobe.cq.forms.core.components.models.form.FieldType;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
Expand All @@ -31,6 +32,11 @@ public abstract class AbstractCaptchaImpl extends AbstractFieldImpl implements C
@JsonIgnore
public abstract String getProvider();

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CAPTCHA);
}

public abstract Map<String, Object> getCaptchaProperties();

public Map<String, Object> getProperties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Base;
import com.adobe.cq.forms.core.components.models.form.FieldType;

/**
* Abstract class which can be used as base class for {@link Base} implementations.
Expand Down Expand Up @@ -57,4 +58,9 @@ public Object[] getEnums() {
return ComponentUtils.coerce(type, enums);
}
}

@Override
public String getFieldType() {
return super.getFieldType(FieldType.CHECKBOX);
}
}
Loading

0 comments on commit 9432b5c

Please sign in to comment.