@@ -562,7 +562,8 @@ describe("my app", function() {
562562 describe ( "Combo" , function ( ) {
563563 var scope = 'angular.element("#combo1").scope()' ,
564564 combo = '$("#combo1")' ,
565- combo2 = '$("#combo2")' ;
565+ combo2 = '$("#combo2")' ,
566+ combo3 = '$("#combo3")' ;
566567
567568 it ( "should be initialized" , function ( ) {
568569 util . resetNorthwindScope ( ) ;
@@ -609,6 +610,14 @@ describe("my app", function() {
609610 expect ( browser . driver . sleep ( 250 ) ) . toBe ( undefined ) ; //util.getResult(combo + '.igCombo("option", "delayInputChangeProcessing");')
610611 expect ( util . getResult ( scope + ".combo.value1" ) ) . toBe ( 2 ) ;
611612 } ) ;
613+
614+ it ( "should update combo value when allowCustomValue is true" , function ( ) {
615+ util . executeScript ( combo3 + ".focus();" ) ;
616+ expect ( util . getResult ( 'typeInInputWrap("customValue1", ' + combo3 + ', "combo.value1");' ) ) . toBe ( false ) ;
617+ expect ( browser . driver . sleep ( 250 ) ) . toBe ( undefined ) ;
618+ util . executeScript ( combo3 + ".igCombo('comboWrapper').find('.ui-igcombo-button').click();" ) ;
619+ expect ( util . getResult ( combo3 + '.igCombo("value")[0]' ) ) . toBe ( "customValue1" ) ;
620+ } ) ;
612621
613622 it ( "should update the ng-model when the data has been changed" , function ( ) {
614623 util . executeScript ( scope + ".northwind = [{'ProductID': 21, 'ProductName': 'Strawberry'}];" ) ;
@@ -705,4 +714,4 @@ describe("my app", function() {
705714 expect ( util . getResult ( textInModel ) ) . toBe ( "newText" ) ;
706715 } ) ;
707716 } ) ;
708- } ) ;
717+ } ) ;
0 commit comments