diff --git a/test/unit/angular/directive/keyboardAttach.unit.js b/test/unit/angular/directive/keyboardAttach.unit.js index 4a28e1e1f7..22fe3e4b8e 100644 --- a/test/unit/angular/directive/keyboardAttach.unit.js +++ b/test/unit/angular/directive/keyboardAttach.unit.js @@ -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');