import XCTest final class CardsNativeUITests: XCTestCase { func testAppLaunches() throws { let app = XCUIApplication() app.launch() // App ist gestartet, sobald entweder das LoginView "Cards" // 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["Cards"] 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 (Cards | Decks | Entdecken) erschien nicht innerhalb 5 s") } }