@@ -158,17 +158,14 @@ - (void)testOneOverlayAndTwoIntersectingOverlays {
158
158
159
159
XCUIElement* overlay1 = app.otherElements [@" platform_view[0].overlay[0]" ];
160
160
XCTAssertTrue (overlay1.exists );
161
- XCTAssertEqual (overlay1.frame .origin .x , 150 );
161
+ XCTAssertEqual (overlay1.frame .origin .x , 75 );
162
162
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 );
165
165
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 );
172
169
173
170
XCUIElement* overlayView0 = app.otherElements [@" platform_view[0].overlay_view[0]" ];
174
171
XCTAssertTrue (overlayView0.exists );
@@ -178,15 +175,6 @@ - (void)testOneOverlayAndTwoIntersectingOverlays {
178
175
XCTAssertEqualWithAccuracy (overlayView0.frame .size .width , app.frame .size .width , kCompareAccuracy );
179
176
XCTAssertEqualWithAccuracy (overlayView0.frame .size .height , app.frame .size .height ,
180
177
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 );
190
178
}
191
179
192
180
// A is the layer, which z index is higher than the platform view.
0 commit comments