@@ -433,6 +433,29 @@ describe("'change' event firing", () => {
433
433
assert . strictEqual ( await siMinMax . getProperty ( "value" ) , 0 , "Value is increased correctly to 1" ) ;
434
434
assert . strictEqual ( Number ( await changeResult . getProperty ( "value" ) ) , 2 , "'change' event is fired 2 times" ) ;
435
435
} ) ;
436
+
437
+ it ( "'change' event should be fired after changing value programatically and then manual entry of the previous value and focus out" , async ( ) => {
438
+ await browser . url ( `test/pages/StepInput.html` ) ;
439
+ const siChange1 = await browser . $ ( "#stepInputChange1" ) ;
440
+ const siChange2 = await browser . $ ( "#stepInputChange2" ) ;
441
+ const incButton = await siChange1 . shadow$ ( ".ui5-step-inc" ) ;
442
+ const initValue1 = await siChange1 . getProperty ( "value" ) ;
443
+ const initValue2 = await siChange2 . getProperty ( "value" ) ;
444
+ const changeResult = await browser . $ ( "#changeResult" ) ;
445
+
446
+ await incButton . click ( ) ;
447
+ const newValue1 = await siChange1 . getProperty ( "value" ) ;
448
+ assert . strictEqual ( await siChange1 . getProperty ( "value" ) , initValue1 + 1000 , "Value of the first step input is increased correctly to " + ( initValue1 + 1000 ) ) ;
449
+ assert . strictEqual ( await siChange2 . getProperty ( "value" ) , newValue1 + 999 , "Value of the second step input is increased correctly to " + ( newValue1 + 999 ) ) ;
450
+ assert . strictEqual ( Number ( await changeResult . getProperty ( "value" ) ) , 1 , "'change' event is fired 1 time" ) ;
451
+
452
+ await siChange2 . doubleClick ( ) ;
453
+ await siChange2 . keys ( initValue2 . toString ( ) ) ;
454
+ await siChange2 . keys ( "Tab" ) ;
455
+ assert . strictEqual ( await siChange2 . getProperty ( "value" ) , initValue2 , "Value of the second step input is set correctly to " + initValue2 ) ;
456
+ assert . strictEqual ( Number ( await changeResult . getProperty ( "value" ) ) , 2 , "'change' event is fired 2 times" ) ;
457
+ } ) ;
458
+
436
459
} ) ;
437
460
438
461
describe ( "Accessibility related parameters" , async ( ) => {
@@ -457,4 +480,4 @@ describe("Accessibility related parameters", async () => {
457
480
assert . strictEqual ( await siInner . getAttribute ( "aria-label" ) , "test-aria-label" , "'aria-label' attribute exists and has correct value 'test-aria-label'" ) ;
458
481
} ) ;
459
482
460
- } ) ;
483
+ } ) ;
0 commit comments