Skip to content

Commit 6d3cbc9

Browse files
committed
Add unit test for fix
Fix "No events fired when custom value is entered" #58
1 parent 22220c8 commit 6d3cbc9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

614623
describe("HTML Editor", function() {
@@ -698,4 +707,4 @@ describe("my app", function() {
698707
expect(util.getResult(textInModel)).toBe("newText");
699708
});
700709
});
701-
});
710+
});

0 commit comments

Comments
 (0)