Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll for typeahead #1195

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b9c5adc
initial
arins Oct 25, 2016
1c70e3d
Fix scrollable autocomplete
arins Oct 25, 2016
d1829fa
change lineending to unix style and passed lint test
arins Oct 26, 2016
5cd1d03
Change name of package to symbrio-ng2-bootstrap
Oct 26, 2016
4bddb0b
Merge branch 'development' of https://github.com/arins/ng2-bootstrap …
Oct 26, 2016
c1231e7
build error
arins Oct 26, 2016
275c9ba
Merge branch 'development' of https://github.com/arins/ng2-bootstrap …
arins Oct 26, 2016
db0c9f5
fixed scroll in most common browsers
arins Oct 26, 2016
d64d774
fixed so that scroll disapears on elements match less than scrollsize
arins Oct 26, 2016
9586760
fixing unit test and checking in new version
arins Oct 27, 2016
0c4c5c4
fixed unittests and lint errors
arins Oct 27, 2016
52c0b37
change version back and fixed binaries
arins Oct 27, 2016
2e990ff
fixed .gitattributes
arins Oct 27, 2016
e88608f
name chagned back!
arins Oct 27, 2016
aebe206
Merge branch 'development' of https://github.com/valor-software/ng2-b…
arins Oct 31, 2016
004cdcd
added more covare to unittests
arins Oct 31, 2016
8bcb34c
ignore unittest for height
arins Oct 31, 2016
fcc1254
added unittests for position spec to increase code coverage
arins Oct 31, 2016
070f395
fixed unittesting
arins Oct 31, 2016
e83e396
fxied lint error
arins Oct 31, 2016
111d6c7
more unittests
arins Oct 31, 2016
c74e26a
more branch testing
arins Nov 1, 2016
8647c81
fixed empty block tslint error
arins Nov 1, 2016
c3990a5
tried to fix more unittests
arins Nov 1, 2016
ca0b8cc
more unittests
arins Nov 1, 2016
835d648
added even more unittest
arins Nov 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more branch testing
arins committed Nov 1, 2016
commit c74e26ad983d3f84da3d15af0c82ee074831f792
22 changes: 16 additions & 6 deletions components/typeahead/typeahead.directive.spec.ts
Original file line number Diff line number Diff line change
@@ -148,23 +148,33 @@ describe('Directive: Typeahead', () => {
expect(directive.matches.length).toBe(0);
}));

it('should prevent default on enter', ()=>{
let event:any = {keyCode: 13, preventDefault: ()=> {}};
it('should prevent default on enter', () => {
let event: any = {
keyCode: 13,
preventDefault: () => {
let t = 0;
t++;
}
};
let preventDefaultSpy = spyOn(event, 'preventDefault').and.callThrough();
expect(directive.container).toBeTruthy();
directive.onKeydown(event as KeyboardEvent);
expect(preventDefaultSpy.calls.count()).toBe(1);

});

it('should hide typeahead-conteiner', ()=>{
let event:any = {keyCode: 9, preventDefault: ()=> {}};
it('should hide typeahead-conteiner', () => {
let event: any = {
keyCode: 9,
preventDefault: () => {
let t = 0;
t++;
}
};
let hideSpy = spyOn(directive, 'hide').and.callThrough();
directive.onKeydown(event as KeyboardEvent);
expect(hideSpy.calls.count()).toBe(1);

});


});