keyboard-attach test for Android not fullscreen

This commit is contained in:
Tim Lancina
2014-05-20 14:08:54 -05:00
parent 73eb37ae0c
commit 3192c77821

View File

@@ -15,6 +15,7 @@ describe('keyboardAttach directive', function() {
it('should move up when window fires native.showkeyboard event', function() {
var el = setup().el;
ionic.Platform.isFullScreen = true;
expect(el.css('bottom')).toEqual('');
ionic.trigger('native.showkeyboard', { target: window, keyboardHeight: 33 });
expect(el.css('bottom')).toEqual('33px');
@@ -34,6 +35,15 @@ describe('keyboardAttach directive', function() {
ionic.trigger('native.showkeyboard', { target: window, keyboardHeight: 33 });
expect(content.css('bottom')).toEqual(keyboardHeight + elHeight + 'px');
});
it('should do nothing if Android and not fullscreen', function() {
var el = setup().el;
ionic.Platform.isFullScreen = false;
expect(el.css('bottom')).toEqual('');
ionic.trigger('native.showkeyboard', { target: window, keyboardHeight: 33 });
expect(el.css('bottom')).toEqual('');
el.scope().$destroy();
});
it('should remove listeners on destroy', function() {
spyOn(window, 'removeEventListener');