Skip to content

Commit 72f243a

Browse files
author
dgurjar
committed
[RTL] Add auto direction prop on text-area component
1 parent b411b58 commit 72f243a

File tree

3 files changed

+26
-1
lines changed
  • it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/textinput/basic
  • ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput
  • ui.tests/test-module/specs/textinput

3 files changed

+26
-1
lines changed

it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/textinput/basic/.content.xml

+17
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,23 @@
213213
validationStatus="valid"/>
214214
<fd:events jcr:primaryType="nt:unstructured"/>
215215
</textinput_1477533951>
216+
<textinput_278740740
217+
jcr:created="{Date}2024-06-03T16:41:36.206+05:30"
218+
jcr:createdBy="admin"
219+
jcr:lastModified="{Date}2024-06-03T16:41:55.103+05:30"
220+
jcr:lastModifiedBy="admin"
221+
jcr:primaryType="nt:unstructured"
222+
jcr:title="Text Input with multiple line"
223+
sling:resourceType="forms-components-examples/components/form/textinput"
224+
enabled="{Boolean}true"
225+
fieldType="text-input"
226+
hideTitle="false"
227+
multiLine="true"
228+
name="textinput_2787407401717413096406"
229+
readOnly="{Boolean}false"
230+
textIsRich="[true,true,true]"
231+
unboundFormElement="{Boolean}false"
232+
visible="{Boolean}true"/>
216233
</guideContainer>
217234
</jcr:content>
218235
</jcr:root>

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput/textinput.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
placeholder="${text.placeHolder}"
4949
autocomplete="${text.autoComplete}"
5050
minlength="${text.minLength}"
51-
maxlength="${text.maxLength}"></textarea>
51+
maxlength="${text.maxLength}"
52+
dir="auto"></textarea>
5253
<input data-sly-test="${!useTextarea}"
5354
title="${text.tooltipVisible ? '' : text.tooltipText}"
5455
class="cmp-adaptiveform-textinput__widget"

ui.tests/test-module/specs/textinput/textinput.runtime.spec.js

+7
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ describe("Form Runtime with Text Input", () => {
299299
})
300300
}
301301
});
302+
303+
// check for dir attribute in text area
304+
it("should have dir attribute in text area", () => {
305+
const [id, fieldView] = Object.entries(formContainer._fields)[11]
306+
cy.get(`#${id}`).find("textarea").invoke('attr', 'dir').should('eq', 'auto');
307+
});
302308
})
303309

304310
describe("Form Runtime with Text Input For Different locale", () => {
@@ -361,5 +367,6 @@ describe("setFocus on text field via rules", () => {
361367
cy.get(`#${id}`).should('have.class', 'cmp-adaptiveform-textinput--filled');
362368
});
363369
});
370+
364371
})
365372

0 commit comments

Comments
 (0)