Skip to content

Commit 6f0aaac

Browse files
committed
Merge pull request #61 from IgniteUI/zdrawku-patch-1
Zdrawku patch 1
2 parents 28d45a7 + c1d41a0 commit 6f0aaac

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/igniteui-angular.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,4 +667,4 @@
667667
module.directive(control, igniteElementDirectiveConstructor);
668668
}
669669
}
670-
}(angular, jQuery));
670+
}(angular, jQuery));

test/app/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ <h1>igCombo</h1>
8989
<ig-combo id="combo2" data-source="northwind" value-key-type="number" value-key="ProductID" text-key-type="string" text-Key="ProductName" ng-model="combo.value2">
9090
<multi-selection enabled="true"></multi-selection>
9191
</ig-combo>
92+
<ig-combo id="combo3" data-source="northwind" allow-custom-value="true" value-key="ProductID" text-key="ProductName" ng-model="combo.value1">
93+
</ig-combo>
9294
<br/>
9395
<ul id="combomodel">
9496
<li ng-repeat="record in northwind">

test/e2e/scenarios.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)