Created
March 20, 2025 09:50
-
-
Save KhayalSuleymani/b6051183f5028db1a9a605d41825f350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WalletAppTests: QuickSpec { | |
override class func spec() { | |
let app = WalletApp() | |
describe("staring to connect app for testing...") { | |
it ("will start from application didFinishLaunchingWithOptions...") { | |
expect(app.application(.shared)).to(beTrue()) | |
expect(app.applicationDidBecomeActive(.shared)).to(beVoid()) | |
expect(app.applicationDidEnterBackground(.shared)).to(beVoid()) | |
} | |
it ("will open deeplink page when url is valid...") { | |
let url1 = URL(string: "demoapp://select/tab/1")! | |
let url2 = URL(string: "demoapp://show/photo?name=cat")! | |
expect(app.application(.shared, open: url1)).to(beTrue()) | |
expect(app.application(.shared, open: url2)).to(beTrue()) | |
} | |
it ("will not open page, when url is not valid...") { | |
if #available(iOS 16.0, *) { | |
expect(app.application(.shared, open: .picturesDirectory)).to(beFalse()) | |
} else { | |
// Fallback on earlier versions | |
} | |
} | |
it ("has to override app connection property...") { | |
expect(app.connection.connections).to(haveCount(5)) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment