Skip to content

Commit 858282c

Browse files
authored
Fixing default value of type in file input (#1441)
1 parent f37527f commit 858282c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@
7070
fieldLabel="Data type of submitted value"
7171
fieldDescription="Selecting the String data type option would increase the upload size by 30%."
7272
required="{Boolean}true"
73-
name="./type"
74-
key="File"
75-
value="file">
73+
name="./type">
7674
<items jcr:primaryType="nt:unstructured">
7775
<string jcr:primaryType="nt:unstructured" text="String" value="string"/>
78-
<boolean jcr:primaryType="nt:unstructured" text="File" value="file"/>
76+
<file jcr:primaryType="nt:unstructured" text="File" value="file" selected="true"/>
7977
</items>
8078
</type>
8179
<showComment

ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ describe('Page - Authoring', function () {
5555
.should("exist");
5656
cy.get("[name='./fd:dragDropText']").should("exist");
5757
cy.get("[name='./type']").should("exist");
58+
cy.get("[name='./type'] coral-select-item:selected").first().should(
59+
"have.text",
60+
"File"
61+
);
5862
cy.contains("Validation").should("exist");
5963

6064
// Checking some dynamic behaviours

0 commit comments

Comments
 (0)