File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
describe ( 'keyboardAttach directive' , function ( ) {
2
2
beforeEach ( module ( 'ionic' ) ) ;
3
-
3
+
4
4
function setup ( ) {
5
5
var el , content ;
6
6
inject ( function ( $compile , $rootScope ) {
@@ -12,7 +12,7 @@ describe('keyboardAttach directive', function() {
12
12
} ) ;
13
13
return { el : el , content : content } ;
14
14
}
15
-
15
+
16
16
it ( 'should move up when window fires native.showkeyboard event' , function ( ) {
17
17
var el = setup ( ) . el ;
18
18
ionic . Platform . isFullScreen = true ;
@@ -38,13 +38,14 @@ describe('keyboardAttach directive', function() {
38
38
39
39
it ( 'should do nothing if Android and not fullscreen' , function ( ) {
40
40
var el = setup ( ) . el ;
41
+ ionic . Platform . setPlatform ( 'android' ) ;
41
42
ionic . Platform . isFullScreen = false ;
42
43
expect ( el . css ( 'bottom' ) ) . toEqual ( '' ) ;
43
44
ionic . trigger ( 'native.showkeyboard' , { target : window , keyboardHeight : 33 } ) ;
44
45
expect ( el . css ( 'bottom' ) ) . toEqual ( '' ) ;
45
46
el . scope ( ) . $destroy ( ) ;
46
47
} ) ;
47
-
48
+
48
49
it ( 'should remove listeners on destroy' , function ( ) {
49
50
spyOn ( ionic , 'off' ) ;
50
51
var el = setup ( ) . el ;
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ describe('Ionic Tap', function() {
94
94
95
95
deregisterTap = ionic . tap . register ( document . createElement ( 'div' ) ) ;
96
96
ionic . scroll = { isScrolling : false } ;
97
+ ionic . Platform . setPlatform ( null ) ;
98
+ ionic . Platform . _checkPlatforms ( ) ;
97
99
} ) ;
98
100
99
101
afterEach ( function ( ) {
@@ -1270,7 +1272,6 @@ describe('Ionic Tap', function() {
1270
1272
expect ( ionic . tap . isKeyboardElement ( null ) ) . toEqual ( false ) ;
1271
1273
1272
1274
ionic . Platform . setPlatform ( 'ios' ) ;
1273
- ionic . Platform . ua = 'iPhone' ;
1274
1275
1275
1276
var ele = document . createElement ( 'input' ) ;
1276
1277
ele . type = 'date' ;
You can’t perform that action at this time.
0 commit comments