@@ -73,6 +73,7 @@ const createCheckboxInput = (inputContainer, section, key, value) => {
7373 checkbox . classList . add ( 'form-check-input' ) ;
7474 checkbox . style . marginRight = '10px' ;
7575 checkbox . dataset . key = key ;
76+ checkbox . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -checkbox` ) ;
7677 checkbox . checked = value ;
7778 checkbox . addEventListener ( 'change' , ( ) => setChanged ( section . id ) ) ;
7879 inputContainer . appendChild ( checkbox ) ;
@@ -84,12 +85,14 @@ const createToggableFeeInput = (inputContainer, label, section, key, value) => {
8485 checkbox . classList . add ( 'form-check-input' ) ;
8586 checkbox . style . marginRight = '10px' ;
8687 checkbox . dataset . key = `${ key } _enabled` ;
88+ checkbox . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -checkbox` ) ;
8789
8890 const input = document . createElement ( 'input' ) ;
8991 input . type = 'text' ;
9092 input . style . width = '40%' ;
9193 input . classList . add ( 'form-control' ) ;
9294 input . dataset . key = key ;
95+ input . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -input` ) ;
9396 input . dataset . originalValue = value ;
9497
9598 if ( value === '0' || value === 0 ) {
@@ -128,6 +131,7 @@ const createFeeInput = (inputContainer, label, section, key, value) => {
128131 input . style . width = '40%' ;
129132 input . classList . add ( 'form-control' ) ;
130133 input . dataset . key = key ;
134+ input . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -input` ) ;
131135 input . value = isFeeKey ( key ) ? weiToEther ( value ) : value ;
132136 input . addEventListener ( 'input' , ( ) => setChanged ( section . id ) ) ;
133137 inputContainer . appendChild ( input ) ;
@@ -141,6 +145,7 @@ const createFeePercentageInput = (inputContainer, section, key, value) => {
141145 input . style . width = '40%' ;
142146 input . classList . add ( 'form-control' ) ;
143147 input . dataset . key = key ;
148+ input . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -input` ) ;
144149 input . value = typeof value === 'number' ? value . toString ( ) : value ;
145150 input . addEventListener ( 'input' , ( ) => setChanged ( section . id ) ) ;
146151 inputContainer . appendChild ( input ) ;
@@ -152,6 +157,7 @@ const createDefaultInput = (inputContainer, section, key, value) => {
152157 input . style . width = '40%' ;
153158 input . classList . add ( 'form-control' ) ;
154159 input . dataset . key = key ;
160+ input . setAttribute ( 'data-testid' , `config-${ section . id . replace ( 'Config' , '' ) } -${ key } -input` ) ;
155161 input . value = value ;
156162 input . addEventListener ( 'input' , ( ) => setChanged ( section . id ) ) ;
157163 inputContainer . appendChild ( input ) ;
@@ -270,6 +276,7 @@ const createConfirmationEntry = (container, configKey, index, amount = '', confi
270276 confirmationInput . dataset . field = 'confirmation' ;
271277 confirmationInput . dataset . index = index ;
272278 confirmationInput . style . maxWidth = fieldWidth ;
279+ confirmationInput . setAttribute ( 'data-testid' , `config-${ configKey } -${ index } ` ) ;
273280
274281 const confirmationInputAppend = document . createElement ( 'span' ) ;
275282 confirmationInputAppend . classList . add ( 'input-group-text' , 'input-group-text-sm' ) ;
0 commit comments