Skip to content

Commit

Permalink
Wait for platform view to appear in iOS UI tests (flutter#19725)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmagman authored Jul 13, 2020
1 parent 91f80ef commit 1e23309
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ - (void)testNoOverlay {
[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);
Expand All @@ -47,7 +47,7 @@ - (void)testOneOverlay {
[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);
Expand All @@ -72,7 +72,7 @@ - (void)testOneOverlayPartialIntersection {
[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);
Expand Down Expand Up @@ -100,7 +100,7 @@ - (void)testTwoIntersectingOverlays {
[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);
Expand Down Expand Up @@ -129,7 +129,7 @@ - (void)testOneOverlayAndTwoIntersectingOverlays {
[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);
Expand Down Expand Up @@ -163,7 +163,7 @@ - (void)testMultiplePlatformViewsWithoutOverlays {
[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);
Expand Down Expand Up @@ -193,7 +193,7 @@ - (void)testMultiplePlatformViewsWithOverlays {
[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);
Expand Down Expand Up @@ -235,7 +235,7 @@ - (void)testPlatformViewsMaxOverlays {
[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);
Expand Down

0 comments on commit 1e23309

Please sign in to comment.