2023-12-06 18:40:48 -04:00
|
|
|
//
|
|
|
|
// BlueWalletUITests.swift
|
|
|
|
// BlueWalletUITests
|
|
|
|
//
|
|
|
|
// Created by Marcos Rodriguez on 12/6/23.
|
|
|
|
// Copyright © 2023 BlueWallet. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
|
|
|
|
class BlueWalletUITests: XCTestCase {
|
|
|
|
|
2024-02-19 13:02:55 -04:00
|
|
|
var app: XCUIApplication!
|
|
|
|
|
2023-12-06 18:40:48 -04:00
|
|
|
override func setUp() {
|
|
|
|
super.setUp()
|
|
|
|
continueAfterFailure = false
|
2024-02-19 13:02:55 -04:00
|
|
|
|
|
|
|
// Initialize the XCUIApplication instance
|
|
|
|
app = XCUIApplication()
|
|
|
|
|
|
|
|
// Add a launch argument to differentiate between Mac Catalyst and iOS
|
|
|
|
#if targetEnvironment(macCatalyst)
|
|
|
|
app.launchArguments.append("--macCatalyst")
|
|
|
|
#else
|
|
|
|
app.launchArguments.append("--iOS")
|
|
|
|
#endif
|
|
|
|
|
|
|
|
app.launch()
|
2023-12-06 18:40:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func testAppLaunchesSuccessfully() {
|
2024-02-19 13:02:55 -04:00
|
|
|
XCTAssertEqual(app.state, .runningForeground, "App should be running in the foreground")
|
|
|
|
|
|
|
|
#if targetEnvironment(macCatalyst)
|
|
|
|
XCTAssertTrue(app.windows.count > 0, "There should be at least one window in Mac Catalyst")
|
|
|
|
#else
|
|
|
|
XCTAssertTrue(app.buttons.count > 0, "There should be at least one button on iOS")
|
|
|
|
#endif
|
2023-12-06 18:40:48 -04:00
|
|
|
}
|
|
|
|
}
|