import XCTest final class CardsNativeUITests: XCTestCase { func testAppLaunches() { let app = XCUIApplication() app.launch() // App ist gestartet, sobald entweder das LoginView "Cardecky" // oder das DeckListView mit "Decks" sichtbar ist. Welcher // von beiden hängt davon ab, ob der Simulator-Keychain noch // eine Session hält. let loginTitle = app.staticTexts["Cardecky"] let decksTitle = app.staticTexts["Decks"] let exploreTab = app.staticTexts["Entdecken"] let deadline = Date().addingTimeInterval(5) var found = false while Date() < deadline { if loginTitle.exists || decksTitle.exists || exploreTab.exists { found = true break } usleep(100_000) } XCTAssertTrue(found, "Erwartete App-Surface (Cardecky | Decks | Entdecken) erschien nicht innerhalb 5 s") } }