From 48e239a2a8f7a7bb8a60cb4cdec3490e81e3cba4 Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Thu, 1 Aug 2024 21:11:11 +0200 Subject: [PATCH] Wait for the values that might change --- Tests/UITests/TestAppUITests/LifecycleHandlerTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/UITests/TestAppUITests/LifecycleHandlerTests.swift b/Tests/UITests/TestAppUITests/LifecycleHandlerTests.swift index a7b032b7..28f860db 100644 --- a/Tests/UITests/TestAppUITests/LifecycleHandlerTests.swift +++ b/Tests/UITests/TestAppUITests/LifecycleHandlerTests.swift @@ -48,8 +48,8 @@ final class LifecycleHandlerTests: XCTestCase { XCTAssertTrue(app.wait(for: .runningForeground, timeout: 2.0)) XCTAssert(app.staticTexts["WillFinishLaunchingWithOptions: 1"].waitForExistence(timeout: 2)) - XCTAssert(app.staticTexts["SceneWillEnterForeground: 2"].exists) - XCTAssert(app.staticTexts["SceneDidBecomeActive: 2"].exists) + XCTAssert(app.staticTexts["SceneWillEnterForeground: 2"].waitForExistence(timeout: 2)) + XCTAssert(app.staticTexts["SceneDidBecomeActive: 2"].waitForExistence(timeout: 2)) XCTAssert(app.staticTexts["SceneWillResignActive: 1"].exists) XCTAssert(app.staticTexts["SceneDidEnterBackground: 1"].exists) XCTAssert(app.staticTexts["ApplicationWillTerminate: 0"].exists)