mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
keyboard-attach test for Android not fullscreen
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user