From 1e23309a386ec5ffb7b69e746795b18175d46cb6 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 13 Jul 2020 16:21:40 -0700 Subject: [PATCH] Wait for platform view to appear in iOS UI tests (#19725) --- .../UnobstructedPlatformViewTests.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m index 2d3db20b4..73186b0ba 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m @@ -25,7 +25,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -47,7 +47,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -72,7 +72,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -100,7 +100,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -129,7 +129,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -163,7 +163,7 @@ [app launch]; XCUIElement* platform_view1 = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view1.exists); + XCTAssertTrue([platform_view1 waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view1.frame.origin.x, 25); XCTAssertEqual(platform_view1.frame.origin.y, 325); XCTAssertEqual(platform_view1.frame.size.width, 250); @@ -193,7 +193,7 @@ [app launch]; XCUIElement* platform_view1 = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view1.exists); + XCTAssertTrue([platform_view1 waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view1.frame.origin.x, 25); XCTAssertEqual(platform_view1.frame.origin.y, 325); XCTAssertEqual(platform_view1.frame.size.width, 250); @@ -235,7 +235,7 @@ [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); -- GitLab