@@ -131,10 +131,10 @@ test('BooleanControl static', t => {
131131 t . true ( className . indexOf ( 'root_properties_foo' ) !== - 1 ) ;
132132 t . true ( className . indexOf ( 'control' ) !== - 1 ) ;
133133 t . is ( result . childNodes . length , 3 ) ;
134- const label = result . children [ 0 ] as HTMLLabelElement ;
134+ const label = result . children [ 1 ] as HTMLLabelElement ;
135135 t . is ( label . tagName , 'LABEL' ) ;
136136 t . is ( label . textContent , 'Foo' ) ;
137- const input = result . children [ 1 ] as HTMLInputElement ;
137+ const input = result . children [ 0 ] as HTMLInputElement ;
138138 t . is ( input . tagName , 'INPUT' ) ;
139139 t . is ( input . type , 'checkbox' ) ;
140140 t . is ( input . checked , true ) ;
@@ -159,10 +159,10 @@ test('BooleanControl static no label', t => {
159159 const result = renderer . render ( ) ;
160160 t . true ( result . className . indexOf ( 'control' ) !== - 1 ) ;
161161 t . is ( result . childNodes . length , 3 ) ;
162- const label = result . children [ 0 ] as HTMLLabelElement ;
162+ const label = result . children [ 1 ] as HTMLLabelElement ;
163163 t . is ( label . tagName , 'LABEL' ) ;
164164 t . is ( label . textContent , '' ) ;
165- const input = result . children [ 1 ] as HTMLInputElement ;
165+ const input = result . children [ 0 ] as HTMLInputElement ;
166166 t . is ( input . tagName , 'INPUT' ) ;
167167 t . is ( input . type , 'checkbox' ) ;
168168 t . is ( input . checked , false ) ;
@@ -177,7 +177,7 @@ test('BooleanControl inputChange', t => {
177177 renderer . setDataSchema ( t . context . schema ) ;
178178 renderer . setUiSchema ( t . context . uiSchema ) ;
179179 const result = renderer . render ( ) ;
180- const input = result . children [ 1 ] as HTMLInputElement ;
180+ const input = result . children [ 0 ] as HTMLInputElement ;
181181 input . checked = false ;
182182 input . onchange ( null ) ;
183183 t . is ( t . context . data . foo , false ) ;
@@ -191,7 +191,7 @@ test('BooleanControl dataService notification', t => {
191191 renderer . setDataSchema ( t . context . schema ) ;
192192 renderer . setUiSchema ( t . context . uiSchema ) ;
193193 renderer . connectedCallback ( ) ;
194- const input = renderer . children [ 1 ] as HTMLInputElement ;
194+ const input = renderer . children [ 0 ] as HTMLInputElement ;
195195 dataService . notifyAboutDataChange ( { scope : { $ref : '#/properties/foo' } } , true ) ;
196196 t . is ( input . checked , true ) ;
197197} ) ;
@@ -203,7 +203,7 @@ test('BooleanControl dataService notification value undefined', t => {
203203 renderer . setDataSchema ( t . context . schema ) ;
204204 renderer . setUiSchema ( t . context . uiSchema ) ;
205205 renderer . connectedCallback ( ) ;
206- const input = renderer . children [ 1 ] as HTMLInputElement ;
206+ const input = renderer . children [ 0 ] as HTMLInputElement ;
207207 dataService . notifyAboutDataChange (
208208 {
209209 scope : {
@@ -222,7 +222,7 @@ test('BooleanControl dataService notification value null', t => {
222222 renderer . setDataSchema ( t . context . schema ) ;
223223 renderer . setUiSchema ( t . context . uiSchema ) ;
224224 renderer . connectedCallback ( ) ;
225- const input = renderer . children [ 1 ] as HTMLInputElement ;
225+ const input = renderer . children [ 0 ] as HTMLInputElement ;
226226 dataService . notifyAboutDataChange ( { scope : { $ref : '#/properties/foo' } } , null ) ;
227227 t . is ( input . checked , false ) ;
228228} ) ;
@@ -234,7 +234,7 @@ test('BooleanControl dataService notification wrong ref', t => {
234234 renderer . setDataSchema ( t . context . schema ) ;
235235 renderer . setUiSchema ( t . context . uiSchema ) ;
236236 renderer . connectedCallback ( ) ;
237- const input = renderer . children [ 1 ] as HTMLInputElement ;
237+ const input = renderer . children [ 0 ] as HTMLInputElement ;
238238 dataService . notifyAboutDataChange ( { scope : { $ref : '#/properties/bar' } } , 'Bar' ) ;
239239 t . is ( input . checked , true ) ;
240240} ) ;
@@ -246,7 +246,7 @@ test('BooleanControl dataService notification null ref', t => {
246246 renderer . setDataSchema ( t . context . schema ) ;
247247 renderer . setUiSchema ( t . context . uiSchema ) ;
248248 renderer . connectedCallback ( ) ;
249- const input = renderer . children [ 1 ] as HTMLInputElement ;
249+ const input = renderer . children [ 0 ] as HTMLInputElement ;
250250 dataService . notifyAboutDataChange ( null , false ) ;
251251 t . is ( input . checked , true ) ;
252252} ) ;
@@ -258,7 +258,7 @@ test('BooleanControl dataService notification undefined ref', t => {
258258 renderer . setDataSchema ( t . context . schema ) ;
259259 renderer . setUiSchema ( t . context . uiSchema ) ;
260260 renderer . connectedCallback ( ) ;
261- const input = renderer . children [ 1 ] as HTMLInputElement ;
261+ const input = renderer . children [ 0 ] as HTMLInputElement ;
262262 dataService . notifyAboutDataChange ( undefined , false ) ;
263263 t . is ( input . checked , true ) ;
264264} ) ;
@@ -271,7 +271,7 @@ test('BooleanControl dataService no notification after disconnect', t => {
271271 renderer . setUiSchema ( t . context . uiSchema ) ;
272272 renderer . connectedCallback ( ) ;
273273 renderer . disconnectedCallback ( ) ;
274- const input = renderer . children [ 1 ] as HTMLInputElement ;
274+ const input = renderer . children [ 0 ] as HTMLInputElement ;
275275 dataService . notifyAboutDataChange ( { scope : { $ref : '#/properties/foo' } } , 'Bar' ) ;
276276 t . is ( input . checked , true ) ;
277277} ) ;
@@ -285,11 +285,11 @@ test('BooleanControl notify visible true', t => {
285285} ) ;
286286
287287test ( 'BooleanControl notify disabled' , t => {
288- testDisable ( t , new BooleanControl ( ) ) ;
288+ testDisable ( t , new BooleanControl ( ) , 0 ) ;
289289} ) ;
290290
291291test ( 'BooleanControl notify enabled' , t => {
292- testEnable ( t , new BooleanControl ( ) ) ;
292+ testEnable ( t , new BooleanControl ( ) , 0 ) ;
293293} ) ;
294294
295295test ( 'BooleanControl notify one error' , t => {
@@ -318,7 +318,7 @@ test('BooleanControl disconnected no notify visible', t => {
318318} ) ;
319319
320320test ( 'BooleanControl disconnected no notify enabled' , t => {
321- testNotifyAboutEnablementWhenDisconnected ( t , new BooleanControl ( ) ) ;
321+ testNotifyAboutEnablementWhenDisconnected ( t , new BooleanControl ( ) , 0 ) ;
322322} ) ;
323323
324324test ( 'BooleanControl disconnected no notify error' , t => {
0 commit comments