Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d9a76ca

Browse files
committed
Fix iOS integration test
1 parent 76e3e92 commit d9a76ca

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,14 @@ - (void)testOneOverlayAndTwoIntersectingOverlays {
158158

159159
XCUIElement* overlay1 = app.otherElements[@"platform_view[0].overlay[0]"];
160160
XCTAssertTrue(overlay1.exists);
161-
XCTAssertEqual(overlay1.frame.origin.x, 150);
161+
XCTAssertEqual(overlay1.frame.origin.x, 75);
162162
XCTAssertEqual(overlay1.frame.origin.y, 150);
163-
XCTAssertEqual(overlay1.frame.size.width, 75);
164-
XCTAssertEqual(overlay1.frame.size.height, 75);
163+
XCTAssertEqual(overlay1.frame.size.width, 150);
164+
XCTAssertEqual(overlay1.frame.size.height, 100);
165165

166-
XCUIElement* overlay2 = app.otherElements[@"platform_view[0].overlay[1]"];
167-
XCTAssertTrue(overlay2.exists);
168-
XCTAssertEqual(overlay2.frame.origin.x, 75);
169-
XCTAssertEqual(overlay2.frame.origin.y, 225);
170-
XCTAssertEqual(overlay2.frame.size.width, 50);
171-
XCTAssertEqual(overlay2.frame.size.height, 25);
166+
// There are three non overlapping rects above platform view, which
167+
// FlutterPlatformViewsController merges into one.
168+
XCTAssertFalse(app.otherElements[@"platform_view[0].overlay[1]"].exists);
172169

173170
XCUIElement* overlayView0 = app.otherElements[@"platform_view[0].overlay_view[0]"];
174171
XCTAssertTrue(overlayView0.exists);
@@ -178,15 +175,6 @@ - (void)testOneOverlayAndTwoIntersectingOverlays {
178175
XCTAssertEqualWithAccuracy(overlayView0.frame.size.width, app.frame.size.width, kCompareAccuracy);
179176
XCTAssertEqualWithAccuracy(overlayView0.frame.size.height, app.frame.size.height,
180177
kCompareAccuracy);
181-
182-
XCUIElement* overlayView1 = app.otherElements[@"platform_view[0].overlay_view[1]"];
183-
XCTAssertTrue(overlayView1.exists);
184-
// Overlay should always be the same frame as the app.
185-
XCTAssertEqualWithAccuracy(overlayView1.frame.origin.x, app.frame.origin.x, kCompareAccuracy);
186-
XCTAssertEqualWithAccuracy(overlayView1.frame.origin.y, app.frame.origin.x, kCompareAccuracy);
187-
XCTAssertEqualWithAccuracy(overlayView1.frame.size.width, app.frame.size.width, kCompareAccuracy);
188-
XCTAssertEqualWithAccuracy(overlayView1.frame.size.height, app.frame.size.height,
189-
kCompareAccuracy);
190178
}
191179

192180
// A is the layer, which z index is higher than the platform view.

0 commit comments

Comments
 (0)