File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11describe ( 'keyboardAttach directive' , function ( ) {
22 beforeEach ( module ( 'ionic' ) ) ;
3-
3+
44 function setup ( ) {
55 var el , content ;
66 inject ( function ( $compile , $rootScope ) {
@@ -12,7 +12,7 @@ describe('keyboardAttach directive', function() {
1212 } ) ;
1313 return { el : el , content : content } ;
1414 }
15-
15+
1616 it ( 'should move up when window fires native.showkeyboard event' , function ( ) {
1717 var el = setup ( ) . el ;
1818 ionic . Platform . isFullScreen = true ;
@@ -38,13 +38,14 @@ describe('keyboardAttach directive', function() {
3838
3939 it ( 'should do nothing if Android and not fullscreen' , function ( ) {
4040 var el = setup ( ) . el ;
41+ ionic . Platform . setPlatform ( 'android' ) ;
4142 ionic . Platform . isFullScreen = false ;
4243 expect ( el . css ( 'bottom' ) ) . toEqual ( '' ) ;
4344 ionic . trigger ( 'native.showkeyboard' , { target : window , keyboardHeight : 33 } ) ;
4445 expect ( el . css ( 'bottom' ) ) . toEqual ( '' ) ;
4546 el . scope ( ) . $destroy ( ) ;
4647 } ) ;
47-
48+
4849 it ( 'should remove listeners on destroy' , function ( ) {
4950 spyOn ( ionic , 'off' ) ;
5051 var el = setup ( ) . el ;
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ describe('Ionic Tap', function() {
9494
9595 deregisterTap = ionic . tap . register ( document . createElement ( 'div' ) ) ;
9696 ionic . scroll = { isScrolling : false } ;
97+ ionic . Platform . setPlatform ( null ) ;
98+ ionic . Platform . _checkPlatforms ( ) ;
9799 } ) ;
98100
99101 afterEach ( function ( ) {
@@ -1270,7 +1272,6 @@ describe('Ionic Tap', function() {
12701272 expect ( ionic . tap . isKeyboardElement ( null ) ) . toEqual ( false ) ;
12711273
12721274 ionic . Platform . setPlatform ( 'ios' ) ;
1273- ionic . Platform . ua = 'iPhone' ;
12741275
12751276 var ele = document . createElement ( 'input' ) ;
12761277 ele . type = 'date' ;
You can’t perform that action at this time.
0 commit comments