import { SafariViewController } from '@ionic-native/safari-view-controller' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface SafariViewControllerOptions { animated ? : boolean ; barColor ? : string ; controlTintColor ? : string ; enterReaderModeIfAvailable ? : boolean ; hidden ? : boolean ; showDefaultShareMenuItem ? : boolean ; tintColor ? : string ; toolbarColor ? : string ; transition ? : string ; url ? : string ; } export class SafariViewControllerMock extends SafariViewController { returns { Promise < boolean > } isAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; param options { SafariViewControllerOptions } returns { Observable < any > } show ( options ? ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; /**
     * Hides Safari View Controller
     */ hide ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } connectToService ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } warmUp ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param url { string } returns { Promise < any > } mayLaunchUrl ( url ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }