File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ export class LionInput extends LionField {
2525 } ;
2626 }
2727
28+ get delegations ( ) {
29+ return {
30+ ...super . delegations ,
31+ properties : [ ...super . delegations . properties , 'step' ] ,
32+ attributes : [ ...super . delegations . attributes , 'step' ] ,
33+ } ;
34+ }
35+
2836 get slots ( ) {
2937 return {
3038 ...super . slots ,
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ describe('<lion-input>', () => {
1414 expect ( el . inputElement . readOnly ) . to . equal ( false ) ;
1515 } ) ;
1616
17+ it ( 'delegates "step" attribute and property' , async ( ) => {
18+ const el = await fixture ( `<lion-input step="0.01"></lion-input>` ) ;
19+ expect ( el . inputElement . step ) . to . equal ( '0.01' ) ;
20+ // TODO: activate when DelegateMixin is refactored
21+ // const el2 = await fixture(`<lion-input .step="${'0.02'}"></lion-input>`);
22+ // expect(el2.inputElement.step).to.equal('0.02');
23+ } ) ;
24+
1725 it ( 'automatically creates an <input> element if not provided by user' , async ( ) => {
1826 const el = await fixture ( `<lion-input></lion-input>` ) ;
1927 expect ( el . querySelector ( 'input' ) ) . to . equal ( el . inputElement ) ;
You can’t perform that action at this time.
0 commit comments