@@ -254,6 +254,12 @@ describe('vaadin-range-slider', () => {
254254 await sendKeys ( { press : 'ArrowLeft' } ) ;
255255 expect ( spy ) . to . be . calledOnce ;
256256 } ) ;
257+
258+ it ( 'should not change value on arrow key when readonly' , async ( ) => {
259+ slider . readonly = true ;
260+ await sendKeys ( { press : 'ArrowRight' } ) ;
261+ expect ( slider . value ) . to . deep . equal ( [ 0 , 100 ] ) ;
262+ } ) ;
257263 } ) ;
258264 } ) ;
259265
@@ -357,6 +363,18 @@ describe('vaadin-range-slider', () => {
357363
358364 expect ( slider . value ) . to . deep . equal ( [ 0 , 100 ] ) ;
359365 } ) ;
366+
367+ it ( 'should not update value property on thumb pointermove when readonly' , async ( ) => {
368+ slider . readonly = true ;
369+
370+ const { x, y } = middleOfThumb ( 0 ) ;
371+
372+ await sendMouseToElement ( { type : 'move' , element : thumbs [ 0 ] } ) ;
373+ await sendMouse ( { type : 'down' } ) ;
374+ await sendMouse ( { type : 'move' , position : [ x + 20 , y ] } ) ;
375+
376+ expect ( slider . value ) . to . deep . equal ( [ 0 , 100 ] ) ;
377+ } ) ;
360378 } ) ;
361379
362380 describe ( 'track' , ( ) => {
@@ -439,6 +457,17 @@ describe('vaadin-range-slider', () => {
439457
440458 expect ( slider . value ) . to . deep . equal ( [ 20 , 80 ] ) ;
441459 } ) ;
460+
461+ it ( 'should not update value property on track pointerdown when readonly' , async ( ) => {
462+ slider . readonly = true ;
463+
464+ const { x, y } = middleOfThumb ( 0 ) ;
465+
466+ await sendMouse ( { type : 'move' , position : [ x - 20 , y ] } ) ;
467+ await sendMouse ( { type : 'down' } ) ;
468+
469+ expect ( slider . value ) . to . deep . equal ( [ 20 , 80 ] ) ;
470+ } ) ;
442471 } ) ;
443472
444473 describe ( 'thumbs limits' , ( ) => {
0 commit comments